ent

package
v5.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: AGPL-3.0 Imports: 34 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.
	TypeAccessToken = "AccessToken"
	TypeCacheLock   = "CacheLock"
	TypeChangelog   = "Changelog"
	TypeDBCache     = "DBCache"
	TypeEvent       = "Event"
	TypeFavorite    = "Favorite"
	TypeFile        = "File"
	TypeMember      = "Member"
	TypeNamespace   = "Namespace"
	TypeProject     = "Project"
	TypeRepo        = "Repo"
)

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 AccessToken

type AccessToken struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Token holds the value of the "token" field.
	Token string `json:"token,omitempty"`
	// Usage holds the value of the "usage" field.
	Usage string `json:"usage,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// ExpiredAt holds the value of the "expired_at" field.
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// UserInfo holds the value of the "user_info" field.
	UserInfo schematype.UserInfo `json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

AccessToken is the model entity for the AccessToken schema.

func (*AccessToken) String

func (at *AccessToken) String() string

String implements the fmt.Stringer.

func (*AccessToken) Unwrap

func (at *AccessToken) Unwrap() *AccessToken

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

func (at *AccessToken) Update() *AccessTokenUpdateOne

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

func (*AccessToken) Value

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

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

type AccessTokenClient

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

AccessTokenClient is a client for the AccessToken schema.

func NewAccessTokenClient

func NewAccessTokenClient(c config) *AccessTokenClient

NewAccessTokenClient returns a client for the AccessToken from the given config.

func (*AccessTokenClient) Create

func (c *AccessTokenClient) Create() *AccessTokenCreate

Create returns a builder for creating a AccessToken entity.

func (*AccessTokenClient) CreateBulk

func (c *AccessTokenClient) CreateBulk(builders ...*AccessTokenCreate) *AccessTokenCreateBulk

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

func (*AccessTokenClient) Delete

func (c *AccessTokenClient) Delete() *AccessTokenDelete

Delete returns a delete builder for AccessToken.

func (*AccessTokenClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AccessTokenClient) DeleteOneID

func (c *AccessTokenClient) DeleteOneID(id int) *AccessTokenDeleteOne

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

func (*AccessTokenClient) Get

func (c *AccessTokenClient) Get(ctx context.Context, id int) (*AccessToken, error)

Get returns a AccessToken entity by its id.

func (*AccessTokenClient) GetX

func (c *AccessTokenClient) GetX(ctx context.Context, id int) *AccessToken

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

func (*AccessTokenClient) Hooks

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

Hooks returns the client hooks.

func (*AccessTokenClient) Intercept

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

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

func (*AccessTokenClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AccessTokenClient) MapCreateBulk

func (c *AccessTokenClient) MapCreateBulk(slice any, setFunc func(*AccessTokenCreate, int)) *AccessTokenCreateBulk

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

func (c *AccessTokenClient) Query() *AccessTokenQuery

Query returns a query builder for AccessToken.

func (*AccessTokenClient) Update

func (c *AccessTokenClient) Update() *AccessTokenUpdate

Update returns an update builder for AccessToken.

func (*AccessTokenClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccessTokenClient) UpdateOneID

func (c *AccessTokenClient) UpdateOneID(id int) *AccessTokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AccessTokenClient) Use

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

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

type AccessTokenCreate

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

AccessTokenCreate is the builder for creating a AccessToken entity.

func (*AccessTokenCreate) Exec

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

Exec executes the query.

func (*AccessTokenCreate) ExecX

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

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

func (*AccessTokenCreate) Mutation

func (atc *AccessTokenCreate) Mutation() *AccessTokenMutation

Mutation returns the AccessTokenMutation object of the builder.

func (*AccessTokenCreate) OnConflict

func (atc *AccessTokenCreate) OnConflict(opts ...sql.ConflictOption) *AccessTokenUpsertOne

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

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

func (*AccessTokenCreate) OnConflictColumns

func (atc *AccessTokenCreate) OnConflictColumns(columns ...string) *AccessTokenUpsertOne

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

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

func (*AccessTokenCreate) Save

func (atc *AccessTokenCreate) Save(ctx context.Context) (*AccessToken, error)

Save creates the AccessToken in the database.

func (*AccessTokenCreate) SaveX

func (atc *AccessTokenCreate) SaveX(ctx context.Context) *AccessToken

SaveX calls Save and panics if Save returns an error.

func (*AccessTokenCreate) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AccessTokenCreate) SetDeletedAt

func (atc *AccessTokenCreate) SetDeletedAt(t time.Time) *AccessTokenCreate

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenCreate) SetEmail

func (atc *AccessTokenCreate) SetEmail(s string) *AccessTokenCreate

SetEmail sets the "email" field.

func (*AccessTokenCreate) SetExpiredAt

func (atc *AccessTokenCreate) SetExpiredAt(t time.Time) *AccessTokenCreate

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenCreate) SetLastUsedAt

func (atc *AccessTokenCreate) SetLastUsedAt(t time.Time) *AccessTokenCreate

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenCreate) SetNillableCreatedAt

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

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

func (*AccessTokenCreate) SetNillableDeletedAt

func (atc *AccessTokenCreate) SetNillableDeletedAt(t *time.Time) *AccessTokenCreate

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

func (*AccessTokenCreate) SetNillableEmail

func (atc *AccessTokenCreate) SetNillableEmail(s *string) *AccessTokenCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*AccessTokenCreate) SetNillableExpiredAt

func (atc *AccessTokenCreate) SetNillableExpiredAt(t *time.Time) *AccessTokenCreate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*AccessTokenCreate) SetNillableLastUsedAt

func (atc *AccessTokenCreate) SetNillableLastUsedAt(t *time.Time) *AccessTokenCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*AccessTokenCreate) SetNillableUpdatedAt

func (atc *AccessTokenCreate) SetNillableUpdatedAt(t *time.Time) *AccessTokenCreate

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

func (*AccessTokenCreate) SetNillableUserInfo

func (atc *AccessTokenCreate) SetNillableUserInfo(si *schematype.UserInfo) *AccessTokenCreate

SetNillableUserInfo sets the "user_info" field if the given value is not nil.

func (*AccessTokenCreate) SetToken

func (atc *AccessTokenCreate) SetToken(s string) *AccessTokenCreate

SetToken sets the "token" field.

func (*AccessTokenCreate) SetUpdatedAt

func (atc *AccessTokenCreate) SetUpdatedAt(t time.Time) *AccessTokenCreate

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenCreate) SetUsage

func (atc *AccessTokenCreate) SetUsage(s string) *AccessTokenCreate

SetUsage sets the "usage" field.

func (*AccessTokenCreate) SetUserInfo

SetUserInfo sets the "user_info" field.

type AccessTokenCreateBulk

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

AccessTokenCreateBulk is the builder for creating many AccessToken entities in bulk.

func (*AccessTokenCreateBulk) Exec

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

Exec executes the query.

func (*AccessTokenCreateBulk) ExecX

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

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

func (*AccessTokenCreateBulk) OnConflict

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

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

func (*AccessTokenCreateBulk) OnConflictColumns

func (atcb *AccessTokenCreateBulk) OnConflictColumns(columns ...string) *AccessTokenUpsertBulk

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

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

func (*AccessTokenCreateBulk) Save

func (atcb *AccessTokenCreateBulk) Save(ctx context.Context) ([]*AccessToken, error)

Save creates the AccessToken entities in the database.

func (*AccessTokenCreateBulk) SaveX

func (atcb *AccessTokenCreateBulk) SaveX(ctx context.Context) []*AccessToken

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

type AccessTokenDelete

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

AccessTokenDelete is the builder for deleting a AccessToken entity.

func (*AccessTokenDelete) Exec

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

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

func (*AccessTokenDelete) ExecX

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

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

func (*AccessTokenDelete) Where

Where appends a list predicates to the AccessTokenDelete builder.

type AccessTokenDeleteOne

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

AccessTokenDeleteOne is the builder for deleting a single AccessToken entity.

func (*AccessTokenDeleteOne) Exec

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

Exec executes the deletion query.

func (*AccessTokenDeleteOne) ExecX

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

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

func (*AccessTokenDeleteOne) Where

Where appends a list predicates to the AccessTokenDelete builder.

type AccessTokenGroupBy

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

AccessTokenGroupBy is the group-by builder for AccessToken entities.

func (*AccessTokenGroupBy) Aggregate

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

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

func (*AccessTokenGroupBy) Bool

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

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

func (*AccessTokenGroupBy) BoolX

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

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

func (*AccessTokenGroupBy) Bools

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

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

func (*AccessTokenGroupBy) BoolsX

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

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

func (*AccessTokenGroupBy) Float64

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

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

func (*AccessTokenGroupBy) Float64X

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

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

func (*AccessTokenGroupBy) Float64s

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

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

func (*AccessTokenGroupBy) Float64sX

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

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

func (*AccessTokenGroupBy) Int

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

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

func (*AccessTokenGroupBy) IntX

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

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

func (*AccessTokenGroupBy) Ints

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

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

func (*AccessTokenGroupBy) IntsX

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

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

func (*AccessTokenGroupBy) Scan

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

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

func (*AccessTokenGroupBy) ScanX

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

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

func (*AccessTokenGroupBy) String

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

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

func (*AccessTokenGroupBy) StringX

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

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

func (*AccessTokenGroupBy) Strings

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

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

func (*AccessTokenGroupBy) StringsX

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

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

type AccessTokenMutation

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

AccessTokenMutation represents an operation that mutates the AccessToken nodes in the graph.

func (*AccessTokenMutation) AddField

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

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

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

func (*AccessTokenMutation) AddedField

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

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

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

func (*AccessTokenMutation) AddedIDs

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

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

func (*AccessTokenMutation) ClearDeletedAt

func (m *AccessTokenMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccessTokenMutation) ClearEdge

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) ClearExpiredAt

func (m *AccessTokenMutation) ClearExpiredAt()

ClearExpiredAt clears the value of the "expired_at" field.

func (*AccessTokenMutation) ClearField

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) ClearLastUsedAt

func (m *AccessTokenMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*AccessTokenMutation) ClearUserInfo

func (m *AccessTokenMutation) ClearUserInfo()

ClearUserInfo clears the value of the "user_info" field.

func (*AccessTokenMutation) ClearedEdges

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

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

func (*AccessTokenMutation) ClearedFields

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

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

func (AccessTokenMutation) Client

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

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

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

func (*AccessTokenMutation) DeletedAt

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

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

func (*AccessTokenMutation) DeletedAtCleared

func (m *AccessTokenMutation) DeletedAtCleared() bool

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

func (*AccessTokenMutation) EdgeCleared

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

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

func (*AccessTokenMutation) Email

func (m *AccessTokenMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*AccessTokenMutation) ExpiredAt

func (m *AccessTokenMutation) ExpiredAt() (r time.Time, exists bool)

ExpiredAt returns the value of the "expired_at" field in the mutation.

func (*AccessTokenMutation) ExpiredAtCleared

func (m *AccessTokenMutation) ExpiredAtCleared() bool

ExpiredAtCleared returns if the "expired_at" field was cleared in this mutation.

func (*AccessTokenMutation) Field

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

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

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

func (*AccessTokenMutation) Fields

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

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

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) LastUsedAt

func (m *AccessTokenMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*AccessTokenMutation) LastUsedAtCleared

func (m *AccessTokenMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*AccessTokenMutation) OldCreatedAt

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

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

func (*AccessTokenMutation) OldDeletedAt

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

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

func (*AccessTokenMutation) OldEmail

func (m *AccessTokenMutation) OldEmail(ctx context.Context) (v string, err error)

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

func (*AccessTokenMutation) OldExpiredAt

func (m *AccessTokenMutation) OldExpiredAt(ctx context.Context) (v time.Time, err error)

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

func (*AccessTokenMutation) OldField

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) OldLastUsedAt

func (m *AccessTokenMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

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

func (*AccessTokenMutation) OldToken

func (m *AccessTokenMutation) OldToken(ctx context.Context) (v string, err error)

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

func (*AccessTokenMutation) OldUpdatedAt

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

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

func (*AccessTokenMutation) OldUsage

func (m *AccessTokenMutation) OldUsage(ctx context.Context) (v string, err error)

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

func (*AccessTokenMutation) OldUserInfo

func (m *AccessTokenMutation) OldUserInfo(ctx context.Context) (v schematype.UserInfo, err error)

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

func (*AccessTokenMutation) Op

func (m *AccessTokenMutation) Op() Op

Op returns the operation name.

func (*AccessTokenMutation) RemovedEdges

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

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

func (*AccessTokenMutation) RemovedIDs

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

func (m *AccessTokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AccessTokenMutation) ResetDeletedAt

func (m *AccessTokenMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AccessTokenMutation) ResetEdge

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) ResetEmail

func (m *AccessTokenMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*AccessTokenMutation) ResetExpiredAt

func (m *AccessTokenMutation) ResetExpiredAt()

ResetExpiredAt resets all changes to the "expired_at" field.

func (*AccessTokenMutation) ResetField

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) ResetLastUsedAt

func (m *AccessTokenMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*AccessTokenMutation) ResetToken

func (m *AccessTokenMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*AccessTokenMutation) ResetUpdatedAt

func (m *AccessTokenMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AccessTokenMutation) ResetUsage

func (m *AccessTokenMutation) ResetUsage()

ResetUsage resets all changes to the "usage" field.

func (*AccessTokenMutation) ResetUserInfo

func (m *AccessTokenMutation) ResetUserInfo()

ResetUserInfo resets all changes to the "user_info" field.

func (*AccessTokenMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AccessTokenMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenMutation) SetEmail

func (m *AccessTokenMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*AccessTokenMutation) SetExpiredAt

func (m *AccessTokenMutation) SetExpiredAt(t time.Time)

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenMutation) SetField

func (m *AccessTokenMutation) 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 (*AccessTokenMutation) SetLastUsedAt

func (m *AccessTokenMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenMutation) SetOp

func (m *AccessTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AccessTokenMutation) SetToken

func (m *AccessTokenMutation) SetToken(s string)

SetToken sets the "token" field.

func (*AccessTokenMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenMutation) SetUsage

func (m *AccessTokenMutation) SetUsage(s string)

SetUsage sets the "usage" field.

func (*AccessTokenMutation) SetUserInfo

func (m *AccessTokenMutation) SetUserInfo(si schematype.UserInfo)

SetUserInfo sets the "user_info" field.

func (*AccessTokenMutation) Token

func (m *AccessTokenMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (AccessTokenMutation) Tx

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

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

func (*AccessTokenMutation) Type

func (m *AccessTokenMutation) Type() string

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

func (*AccessTokenMutation) UpdatedAt

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

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

func (*AccessTokenMutation) Usage

func (m *AccessTokenMutation) Usage() (r string, exists bool)

Usage returns the value of the "usage" field in the mutation.

func (*AccessTokenMutation) UserInfo

func (m *AccessTokenMutation) UserInfo() (r schematype.UserInfo, exists bool)

UserInfo returns the value of the "user_info" field in the mutation.

func (*AccessTokenMutation) UserInfoCleared

func (m *AccessTokenMutation) UserInfoCleared() bool

UserInfoCleared returns if the "user_info" field was cleared in this mutation.

func (*AccessTokenMutation) Where

func (m *AccessTokenMutation) Where(ps ...predicate.AccessToken)

Where appends a list predicates to the AccessTokenMutation builder.

func (*AccessTokenMutation) WhereP

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

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

type AccessTokenQuery

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

AccessTokenQuery is the builder for querying AccessToken entities.

func (*AccessTokenQuery) Aggregate

func (atq *AccessTokenQuery) Aggregate(fns ...AggregateFunc) *AccessTokenSelect

Aggregate returns a AccessTokenSelect configured with the given aggregations.

func (*AccessTokenQuery) All

func (atq *AccessTokenQuery) All(ctx context.Context) ([]*AccessToken, error)

All executes the query and returns a list of AccessTokens.

func (*AccessTokenQuery) AllX

func (atq *AccessTokenQuery) AllX(ctx context.Context) []*AccessToken

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

func (*AccessTokenQuery) Clone

func (atq *AccessTokenQuery) Clone() *AccessTokenQuery

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

func (*AccessTokenQuery) Count

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

Count returns the count of the given query.

func (*AccessTokenQuery) CountX

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

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

func (*AccessTokenQuery) Exist

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

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

func (*AccessTokenQuery) ExistX

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

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

func (*AccessTokenQuery) First

func (atq *AccessTokenQuery) First(ctx context.Context) (*AccessToken, error)

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

func (*AccessTokenQuery) FirstID

func (atq *AccessTokenQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AccessTokenQuery) FirstIDX

func (atq *AccessTokenQuery) FirstIDX(ctx context.Context) int

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

func (*AccessTokenQuery) FirstX

func (atq *AccessTokenQuery) FirstX(ctx context.Context) *AccessToken

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

func (*AccessTokenQuery) ForShare

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

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

func (*AccessTokenQuery) ForUpdate

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

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

func (*AccessTokenQuery) GroupBy

func (atq *AccessTokenQuery) GroupBy(field string, fields ...string) *AccessTokenGroupBy

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

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AccessToken.Query().
	GroupBy(accesstoken.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AccessTokenQuery) IDs

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

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

func (*AccessTokenQuery) IDsX

func (atq *AccessTokenQuery) IDsX(ctx context.Context) []int

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

func (*AccessTokenQuery) Limit

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

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

func (*AccessTokenQuery) Offset

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

Offset to start from.

func (*AccessTokenQuery) Only

func (atq *AccessTokenQuery) Only(ctx context.Context) (*AccessToken, error)

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

func (*AccessTokenQuery) OnlyID

func (atq *AccessTokenQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AccessTokenQuery) OnlyIDX

func (atq *AccessTokenQuery) OnlyIDX(ctx context.Context) int

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

func (*AccessTokenQuery) OnlyX

func (atq *AccessTokenQuery) OnlyX(ctx context.Context) *AccessToken

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

func (*AccessTokenQuery) Order

Order specifies how the records should be ordered.

func (*AccessTokenQuery) Select

func (atq *AccessTokenQuery) Select(fields ...string) *AccessTokenSelect

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

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.AccessToken.Query().
	Select(accesstoken.FieldCreatedAt).
	Scan(ctx, &v)

func (*AccessTokenQuery) Unique

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

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

Where adds a new predicate for the AccessTokenQuery builder.

type AccessTokenSelect

type AccessTokenSelect struct {
	*AccessTokenQuery
	// contains filtered or unexported fields
}

AccessTokenSelect is the builder for selecting fields of AccessToken entities.

func (*AccessTokenSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*AccessTokenSelect) Bool

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

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

func (*AccessTokenSelect) BoolX

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

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

func (*AccessTokenSelect) Bools

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

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

func (*AccessTokenSelect) BoolsX

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

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

func (*AccessTokenSelect) Float64

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

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

func (*AccessTokenSelect) Float64X

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

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

func (*AccessTokenSelect) Float64s

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

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

func (*AccessTokenSelect) Float64sX

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

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

func (*AccessTokenSelect) Int

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

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

func (*AccessTokenSelect) IntX

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

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

func (*AccessTokenSelect) Ints

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

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

func (*AccessTokenSelect) IntsX

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

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

func (*AccessTokenSelect) Scan

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

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

func (*AccessTokenSelect) ScanX

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

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

func (*AccessTokenSelect) String

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

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

func (*AccessTokenSelect) StringX

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

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

func (*AccessTokenSelect) Strings

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

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

func (*AccessTokenSelect) StringsX

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

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

type AccessTokenUpdate

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

AccessTokenUpdate is the builder for updating AccessToken entities.

func (*AccessTokenUpdate) ClearDeletedAt

func (atu *AccessTokenUpdate) ClearDeletedAt() *AccessTokenUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccessTokenUpdate) ClearExpiredAt

func (atu *AccessTokenUpdate) ClearExpiredAt() *AccessTokenUpdate

ClearExpiredAt clears the value of the "expired_at" field.

func (*AccessTokenUpdate) ClearLastUsedAt

func (atu *AccessTokenUpdate) ClearLastUsedAt() *AccessTokenUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*AccessTokenUpdate) ClearUserInfo

func (atu *AccessTokenUpdate) ClearUserInfo() *AccessTokenUpdate

ClearUserInfo clears the value of the "user_info" field.

func (*AccessTokenUpdate) Exec

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

Exec executes the query.

func (*AccessTokenUpdate) ExecX

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

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

func (*AccessTokenUpdate) Mutation

func (atu *AccessTokenUpdate) Mutation() *AccessTokenMutation

Mutation returns the AccessTokenMutation object of the builder.

func (*AccessTokenUpdate) Save

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

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

func (*AccessTokenUpdate) SaveX

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

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

func (*AccessTokenUpdate) SetDeletedAt

func (atu *AccessTokenUpdate) SetDeletedAt(t time.Time) *AccessTokenUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenUpdate) SetEmail

func (atu *AccessTokenUpdate) SetEmail(s string) *AccessTokenUpdate

SetEmail sets the "email" field.

func (*AccessTokenUpdate) SetExpiredAt

func (atu *AccessTokenUpdate) SetExpiredAt(t time.Time) *AccessTokenUpdate

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenUpdate) SetLastUsedAt

func (atu *AccessTokenUpdate) SetLastUsedAt(t time.Time) *AccessTokenUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenUpdate) SetNillableDeletedAt

func (atu *AccessTokenUpdate) SetNillableDeletedAt(t *time.Time) *AccessTokenUpdate

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

func (*AccessTokenUpdate) SetNillableEmail

func (atu *AccessTokenUpdate) SetNillableEmail(s *string) *AccessTokenUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*AccessTokenUpdate) SetNillableExpiredAt

func (atu *AccessTokenUpdate) SetNillableExpiredAt(t *time.Time) *AccessTokenUpdate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*AccessTokenUpdate) SetNillableLastUsedAt

func (atu *AccessTokenUpdate) SetNillableLastUsedAt(t *time.Time) *AccessTokenUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*AccessTokenUpdate) SetNillableToken

func (atu *AccessTokenUpdate) SetNillableToken(s *string) *AccessTokenUpdate

SetNillableToken sets the "token" field if the given value is not nil.

func (*AccessTokenUpdate) SetNillableUsage

func (atu *AccessTokenUpdate) SetNillableUsage(s *string) *AccessTokenUpdate

SetNillableUsage sets the "usage" field if the given value is not nil.

func (*AccessTokenUpdate) SetNillableUserInfo

func (atu *AccessTokenUpdate) SetNillableUserInfo(si *schematype.UserInfo) *AccessTokenUpdate

SetNillableUserInfo sets the "user_info" field if the given value is not nil.

func (*AccessTokenUpdate) SetToken

func (atu *AccessTokenUpdate) SetToken(s string) *AccessTokenUpdate

SetToken sets the "token" field.

func (*AccessTokenUpdate) SetUpdatedAt

func (atu *AccessTokenUpdate) SetUpdatedAt(t time.Time) *AccessTokenUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenUpdate) SetUsage

func (atu *AccessTokenUpdate) SetUsage(s string) *AccessTokenUpdate

SetUsage sets the "usage" field.

func (*AccessTokenUpdate) SetUserInfo

SetUserInfo sets the "user_info" field.

func (*AccessTokenUpdate) Where

Where appends a list predicates to the AccessTokenUpdate builder.

type AccessTokenUpdateOne

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

AccessTokenUpdateOne is the builder for updating a single AccessToken entity.

func (*AccessTokenUpdateOne) ClearDeletedAt

func (atuo *AccessTokenUpdateOne) ClearDeletedAt() *AccessTokenUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccessTokenUpdateOne) ClearExpiredAt

func (atuo *AccessTokenUpdateOne) ClearExpiredAt() *AccessTokenUpdateOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*AccessTokenUpdateOne) ClearLastUsedAt

func (atuo *AccessTokenUpdateOne) ClearLastUsedAt() *AccessTokenUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*AccessTokenUpdateOne) ClearUserInfo

func (atuo *AccessTokenUpdateOne) ClearUserInfo() *AccessTokenUpdateOne

ClearUserInfo clears the value of the "user_info" field.

func (*AccessTokenUpdateOne) Exec

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

Exec executes the query on the entity.

func (*AccessTokenUpdateOne) ExecX

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

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

func (*AccessTokenUpdateOne) Mutation

func (atuo *AccessTokenUpdateOne) Mutation() *AccessTokenMutation

Mutation returns the AccessTokenMutation object of the builder.

func (*AccessTokenUpdateOne) Save

Save executes the query and returns the updated AccessToken entity.

func (*AccessTokenUpdateOne) SaveX

func (atuo *AccessTokenUpdateOne) SaveX(ctx context.Context) *AccessToken

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

func (*AccessTokenUpdateOne) Select

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

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

func (*AccessTokenUpdateOne) SetDeletedAt

func (atuo *AccessTokenUpdateOne) SetDeletedAt(t time.Time) *AccessTokenUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenUpdateOne) SetEmail

SetEmail sets the "email" field.

func (*AccessTokenUpdateOne) SetExpiredAt

func (atuo *AccessTokenUpdateOne) SetExpiredAt(t time.Time) *AccessTokenUpdateOne

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenUpdateOne) SetLastUsedAt

func (atuo *AccessTokenUpdateOne) SetLastUsedAt(t time.Time) *AccessTokenUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenUpdateOne) SetNillableDeletedAt

func (atuo *AccessTokenUpdateOne) SetNillableDeletedAt(t *time.Time) *AccessTokenUpdateOne

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

func (*AccessTokenUpdateOne) SetNillableEmail

func (atuo *AccessTokenUpdateOne) SetNillableEmail(s *string) *AccessTokenUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetNillableExpiredAt

func (atuo *AccessTokenUpdateOne) SetNillableExpiredAt(t *time.Time) *AccessTokenUpdateOne

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetNillableLastUsedAt

func (atuo *AccessTokenUpdateOne) SetNillableLastUsedAt(t *time.Time) *AccessTokenUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetNillableToken

func (atuo *AccessTokenUpdateOne) SetNillableToken(s *string) *AccessTokenUpdateOne

SetNillableToken sets the "token" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetNillableUsage

func (atuo *AccessTokenUpdateOne) SetNillableUsage(s *string) *AccessTokenUpdateOne

SetNillableUsage sets the "usage" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetNillableUserInfo

func (atuo *AccessTokenUpdateOne) SetNillableUserInfo(si *schematype.UserInfo) *AccessTokenUpdateOne

SetNillableUserInfo sets the "user_info" field if the given value is not nil.

func (*AccessTokenUpdateOne) SetToken

SetToken sets the "token" field.

func (*AccessTokenUpdateOne) SetUpdatedAt

func (atuo *AccessTokenUpdateOne) SetUpdatedAt(t time.Time) *AccessTokenUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenUpdateOne) SetUsage

SetUsage sets the "usage" field.

func (*AccessTokenUpdateOne) SetUserInfo

SetUserInfo sets the "user_info" field.

func (*AccessTokenUpdateOne) Where

Where appends a list predicates to the AccessTokenUpdate builder.

type AccessTokenUpsert

type AccessTokenUpsert struct {
	*sql.UpdateSet
}

AccessTokenUpsert is the "OnConflict" setter.

func (*AccessTokenUpsert) ClearDeletedAt

func (u *AccessTokenUpsert) ClearDeletedAt() *AccessTokenUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccessTokenUpsert) ClearExpiredAt

func (u *AccessTokenUpsert) ClearExpiredAt() *AccessTokenUpsert

ClearExpiredAt clears the value of the "expired_at" field.

func (*AccessTokenUpsert) ClearLastUsedAt

func (u *AccessTokenUpsert) ClearLastUsedAt() *AccessTokenUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*AccessTokenUpsert) ClearUserInfo

func (u *AccessTokenUpsert) ClearUserInfo() *AccessTokenUpsert

ClearUserInfo clears the value of the "user_info" field.

func (*AccessTokenUpsert) SetDeletedAt

func (u *AccessTokenUpsert) SetDeletedAt(v time.Time) *AccessTokenUpsert

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenUpsert) SetEmail

func (u *AccessTokenUpsert) SetEmail(v string) *AccessTokenUpsert

SetEmail sets the "email" field.

func (*AccessTokenUpsert) SetExpiredAt

func (u *AccessTokenUpsert) SetExpiredAt(v time.Time) *AccessTokenUpsert

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenUpsert) SetLastUsedAt

func (u *AccessTokenUpsert) SetLastUsedAt(v time.Time) *AccessTokenUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenUpsert) SetToken

func (u *AccessTokenUpsert) SetToken(v string) *AccessTokenUpsert

SetToken sets the "token" field.

func (*AccessTokenUpsert) SetUpdatedAt

func (u *AccessTokenUpsert) SetUpdatedAt(v time.Time) *AccessTokenUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenUpsert) SetUsage

func (u *AccessTokenUpsert) SetUsage(v string) *AccessTokenUpsert

SetUsage sets the "usage" field.

func (*AccessTokenUpsert) SetUserInfo

SetUserInfo sets the "user_info" field.

func (*AccessTokenUpsert) UpdateDeletedAt

func (u *AccessTokenUpsert) UpdateDeletedAt() *AccessTokenUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateEmail

func (u *AccessTokenUpsert) UpdateEmail() *AccessTokenUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateExpiredAt

func (u *AccessTokenUpsert) UpdateExpiredAt() *AccessTokenUpsert

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateLastUsedAt

func (u *AccessTokenUpsert) UpdateLastUsedAt() *AccessTokenUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateToken

func (u *AccessTokenUpsert) UpdateToken() *AccessTokenUpsert

UpdateToken sets the "token" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateUpdatedAt

func (u *AccessTokenUpsert) UpdateUpdatedAt() *AccessTokenUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateUsage

func (u *AccessTokenUpsert) UpdateUsage() *AccessTokenUpsert

UpdateUsage sets the "usage" field to the value that was provided on create.

func (*AccessTokenUpsert) UpdateUserInfo

func (u *AccessTokenUpsert) UpdateUserInfo() *AccessTokenUpsert

UpdateUserInfo sets the "user_info" field to the value that was provided on create.

type AccessTokenUpsertBulk

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

AccessTokenUpsertBulk is the builder for "upsert"-ing a bulk of AccessToken nodes.

func (*AccessTokenUpsertBulk) ClearDeletedAt

func (u *AccessTokenUpsertBulk) ClearDeletedAt() *AccessTokenUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccessTokenUpsertBulk) ClearExpiredAt

func (u *AccessTokenUpsertBulk) ClearExpiredAt() *AccessTokenUpsertBulk

ClearExpiredAt clears the value of the "expired_at" field.

func (*AccessTokenUpsertBulk) ClearLastUsedAt

func (u *AccessTokenUpsertBulk) ClearLastUsedAt() *AccessTokenUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*AccessTokenUpsertBulk) ClearUserInfo

func (u *AccessTokenUpsertBulk) ClearUserInfo() *AccessTokenUpsertBulk

ClearUserInfo clears the value of the "user_info" field.

func (*AccessTokenUpsertBulk) DoNothing

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

func (*AccessTokenUpsertBulk) Exec

Exec executes the query.

func (*AccessTokenUpsertBulk) ExecX

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

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

func (*AccessTokenUpsertBulk) Ignore

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

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

func (*AccessTokenUpsertBulk) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenUpsertBulk) SetEmail

SetEmail sets the "email" field.

func (*AccessTokenUpsertBulk) SetExpiredAt

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenUpsertBulk) SetLastUsedAt

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenUpsertBulk) SetToken

SetToken sets the "token" field.

func (*AccessTokenUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenUpsertBulk) SetUsage

SetUsage sets the "usage" field.

func (*AccessTokenUpsertBulk) SetUserInfo

SetUserInfo sets the "user_info" field.

func (*AccessTokenUpsertBulk) Update

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

func (*AccessTokenUpsertBulk) UpdateDeletedAt

func (u *AccessTokenUpsertBulk) UpdateDeletedAt() *AccessTokenUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateEmail

func (u *AccessTokenUpsertBulk) UpdateEmail() *AccessTokenUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateExpiredAt

func (u *AccessTokenUpsertBulk) UpdateExpiredAt() *AccessTokenUpsertBulk

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateLastUsedAt

func (u *AccessTokenUpsertBulk) UpdateLastUsedAt() *AccessTokenUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateNewValues

func (u *AccessTokenUpsertBulk) UpdateNewValues() *AccessTokenUpsertBulk

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

client.AccessToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AccessTokenUpsertBulk) UpdateToken

func (u *AccessTokenUpsertBulk) UpdateToken() *AccessTokenUpsertBulk

UpdateToken sets the "token" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateUpdatedAt

func (u *AccessTokenUpsertBulk) UpdateUpdatedAt() *AccessTokenUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateUsage

func (u *AccessTokenUpsertBulk) UpdateUsage() *AccessTokenUpsertBulk

UpdateUsage sets the "usage" field to the value that was provided on create.

func (*AccessTokenUpsertBulk) UpdateUserInfo

func (u *AccessTokenUpsertBulk) UpdateUserInfo() *AccessTokenUpsertBulk

UpdateUserInfo sets the "user_info" field to the value that was provided on create.

type AccessTokenUpsertOne

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

AccessTokenUpsertOne is the builder for "upsert"-ing

one AccessToken node.

func (*AccessTokenUpsertOne) ClearDeletedAt

func (u *AccessTokenUpsertOne) ClearDeletedAt() *AccessTokenUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AccessTokenUpsertOne) ClearExpiredAt

func (u *AccessTokenUpsertOne) ClearExpiredAt() *AccessTokenUpsertOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*AccessTokenUpsertOne) ClearLastUsedAt

func (u *AccessTokenUpsertOne) ClearLastUsedAt() *AccessTokenUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*AccessTokenUpsertOne) ClearUserInfo

func (u *AccessTokenUpsertOne) ClearUserInfo() *AccessTokenUpsertOne

ClearUserInfo clears the value of the "user_info" field.

func (*AccessTokenUpsertOne) DoNothing

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

func (*AccessTokenUpsertOne) Exec

Exec executes the query.

func (*AccessTokenUpsertOne) ExecX

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

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

func (*AccessTokenUpsertOne) ID

func (u *AccessTokenUpsertOne) ID(ctx context.Context) (id int, err error)

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

func (*AccessTokenUpsertOne) IDX

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

func (*AccessTokenUpsertOne) Ignore

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

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

func (*AccessTokenUpsertOne) SetDeletedAt

func (u *AccessTokenUpsertOne) SetDeletedAt(v time.Time) *AccessTokenUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*AccessTokenUpsertOne) SetEmail

SetEmail sets the "email" field.

func (*AccessTokenUpsertOne) SetExpiredAt

func (u *AccessTokenUpsertOne) SetExpiredAt(v time.Time) *AccessTokenUpsertOne

SetExpiredAt sets the "expired_at" field.

func (*AccessTokenUpsertOne) SetLastUsedAt

func (u *AccessTokenUpsertOne) SetLastUsedAt(v time.Time) *AccessTokenUpsertOne

SetLastUsedAt sets the "last_used_at" field.

func (*AccessTokenUpsertOne) SetToken

SetToken sets the "token" field.

func (*AccessTokenUpsertOne) SetUpdatedAt

func (u *AccessTokenUpsertOne) SetUpdatedAt(v time.Time) *AccessTokenUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AccessTokenUpsertOne) SetUsage

SetUsage sets the "usage" field.

func (*AccessTokenUpsertOne) SetUserInfo

SetUserInfo sets the "user_info" field.

func (*AccessTokenUpsertOne) Update

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

func (*AccessTokenUpsertOne) UpdateDeletedAt

func (u *AccessTokenUpsertOne) UpdateDeletedAt() *AccessTokenUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateEmail

func (u *AccessTokenUpsertOne) UpdateEmail() *AccessTokenUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateExpiredAt

func (u *AccessTokenUpsertOne) UpdateExpiredAt() *AccessTokenUpsertOne

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateLastUsedAt

func (u *AccessTokenUpsertOne) UpdateLastUsedAt() *AccessTokenUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateNewValues

func (u *AccessTokenUpsertOne) UpdateNewValues() *AccessTokenUpsertOne

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

client.AccessToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*AccessTokenUpsertOne) UpdateToken

func (u *AccessTokenUpsertOne) UpdateToken() *AccessTokenUpsertOne

UpdateToken sets the "token" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateUpdatedAt

func (u *AccessTokenUpsertOne) UpdateUpdatedAt() *AccessTokenUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateUsage

func (u *AccessTokenUpsertOne) UpdateUsage() *AccessTokenUpsertOne

UpdateUsage sets the "usage" field to the value that was provided on create.

func (*AccessTokenUpsertOne) UpdateUserInfo

func (u *AccessTokenUpsertOne) UpdateUserInfo() *AccessTokenUpsertOne

UpdateUserInfo sets the "user_info" field to the value that was provided on create.

type AccessTokens

type AccessTokens []*AccessToken

AccessTokens is a parsable slice of AccessToken.

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 CacheLock

type CacheLock struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Owner holds the value of the "owner" field.
	Owner string `json:"owner,omitempty"`
	// ExpiredAt holds the value of the "expired_at" field.
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// contains filtered or unexported fields
}

CacheLock is the model entity for the CacheLock schema.

func (*CacheLock) String

func (cl *CacheLock) String() string

String implements the fmt.Stringer.

func (*CacheLock) Unwrap

func (cl *CacheLock) Unwrap() *CacheLock

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

func (cl *CacheLock) Update() *CacheLockUpdateOne

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

func (*CacheLock) Value

func (cl *CacheLock) Value(name string) (ent.Value, error)

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

type CacheLockClient

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

CacheLockClient is a client for the CacheLock schema.

func NewCacheLockClient

func NewCacheLockClient(c config) *CacheLockClient

NewCacheLockClient returns a client for the CacheLock from the given config.

func (*CacheLockClient) Create

func (c *CacheLockClient) Create() *CacheLockCreate

Create returns a builder for creating a CacheLock entity.

func (*CacheLockClient) CreateBulk

func (c *CacheLockClient) CreateBulk(builders ...*CacheLockCreate) *CacheLockCreateBulk

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

func (*CacheLockClient) Delete

func (c *CacheLockClient) Delete() *CacheLockDelete

Delete returns a delete builder for CacheLock.

func (*CacheLockClient) DeleteOne

func (c *CacheLockClient) DeleteOne(cl *CacheLock) *CacheLockDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CacheLockClient) DeleteOneID

func (c *CacheLockClient) DeleteOneID(id int) *CacheLockDeleteOne

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

func (*CacheLockClient) Get

func (c *CacheLockClient) Get(ctx context.Context, id int) (*CacheLock, error)

Get returns a CacheLock entity by its id.

func (*CacheLockClient) GetX

func (c *CacheLockClient) GetX(ctx context.Context, id int) *CacheLock

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

func (*CacheLockClient) Hooks

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

Hooks returns the client hooks.

func (*CacheLockClient) Intercept

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

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

func (*CacheLockClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CacheLockClient) MapCreateBulk

func (c *CacheLockClient) MapCreateBulk(slice any, setFunc func(*CacheLockCreate, int)) *CacheLockCreateBulk

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

func (c *CacheLockClient) Query() *CacheLockQuery

Query returns a query builder for CacheLock.

func (*CacheLockClient) Update

func (c *CacheLockClient) Update() *CacheLockUpdate

Update returns an update builder for CacheLock.

func (*CacheLockClient) UpdateOne

func (c *CacheLockClient) UpdateOne(cl *CacheLock) *CacheLockUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CacheLockClient) UpdateOneID

func (c *CacheLockClient) UpdateOneID(id int) *CacheLockUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CacheLockClient) Use

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

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

type CacheLockCreate

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

CacheLockCreate is the builder for creating a CacheLock entity.

func (*CacheLockCreate) Exec

func (clc *CacheLockCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CacheLockCreate) ExecX

func (clc *CacheLockCreate) ExecX(ctx context.Context)

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

func (*CacheLockCreate) Mutation

func (clc *CacheLockCreate) Mutation() *CacheLockMutation

Mutation returns the CacheLockMutation object of the builder.

func (*CacheLockCreate) OnConflict

func (clc *CacheLockCreate) OnConflict(opts ...sql.ConflictOption) *CacheLockUpsertOne

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

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

func (*CacheLockCreate) OnConflictColumns

func (clc *CacheLockCreate) OnConflictColumns(columns ...string) *CacheLockUpsertOne

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

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

func (*CacheLockCreate) Save

func (clc *CacheLockCreate) Save(ctx context.Context) (*CacheLock, error)

Save creates the CacheLock in the database.

func (*CacheLockCreate) SaveX

func (clc *CacheLockCreate) SaveX(ctx context.Context) *CacheLock

SaveX calls Save and panics if Save returns an error.

func (*CacheLockCreate) SetExpiredAt

func (clc *CacheLockCreate) SetExpiredAt(t time.Time) *CacheLockCreate

SetExpiredAt sets the "expired_at" field.

func (*CacheLockCreate) SetKey

func (clc *CacheLockCreate) SetKey(s string) *CacheLockCreate

SetKey sets the "key" field.

func (*CacheLockCreate) SetNillableExpiredAt

func (clc *CacheLockCreate) SetNillableExpiredAt(t *time.Time) *CacheLockCreate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*CacheLockCreate) SetOwner

func (clc *CacheLockCreate) SetOwner(s string) *CacheLockCreate

SetOwner sets the "owner" field.

type CacheLockCreateBulk

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

CacheLockCreateBulk is the builder for creating many CacheLock entities in bulk.

func (*CacheLockCreateBulk) Exec

func (clcb *CacheLockCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CacheLockCreateBulk) ExecX

func (clcb *CacheLockCreateBulk) ExecX(ctx context.Context)

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

func (*CacheLockCreateBulk) OnConflict

func (clcb *CacheLockCreateBulk) OnConflict(opts ...sql.ConflictOption) *CacheLockUpsertBulk

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

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

func (*CacheLockCreateBulk) OnConflictColumns

func (clcb *CacheLockCreateBulk) OnConflictColumns(columns ...string) *CacheLockUpsertBulk

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

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

func (*CacheLockCreateBulk) Save

func (clcb *CacheLockCreateBulk) Save(ctx context.Context) ([]*CacheLock, error)

Save creates the CacheLock entities in the database.

func (*CacheLockCreateBulk) SaveX

func (clcb *CacheLockCreateBulk) SaveX(ctx context.Context) []*CacheLock

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

type CacheLockDelete

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

CacheLockDelete is the builder for deleting a CacheLock entity.

func (*CacheLockDelete) Exec

func (cld *CacheLockDelete) Exec(ctx context.Context) (int, error)

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

func (*CacheLockDelete) ExecX

func (cld *CacheLockDelete) ExecX(ctx context.Context) int

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

func (*CacheLockDelete) Where

Where appends a list predicates to the CacheLockDelete builder.

type CacheLockDeleteOne

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

CacheLockDeleteOne is the builder for deleting a single CacheLock entity.

func (*CacheLockDeleteOne) Exec

func (cldo *CacheLockDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CacheLockDeleteOne) ExecX

func (cldo *CacheLockDeleteOne) ExecX(ctx context.Context)

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

func (*CacheLockDeleteOne) Where

Where appends a list predicates to the CacheLockDelete builder.

type CacheLockGroupBy

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

CacheLockGroupBy is the group-by builder for CacheLock entities.

func (*CacheLockGroupBy) Aggregate

func (clgb *CacheLockGroupBy) Aggregate(fns ...AggregateFunc) *CacheLockGroupBy

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

func (*CacheLockGroupBy) Bool

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

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

func (*CacheLockGroupBy) BoolX

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

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

func (*CacheLockGroupBy) Bools

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

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

func (*CacheLockGroupBy) BoolsX

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

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

func (*CacheLockGroupBy) Float64

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

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

func (*CacheLockGroupBy) Float64X

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

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

func (*CacheLockGroupBy) Float64s

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

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

func (*CacheLockGroupBy) Float64sX

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

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

func (*CacheLockGroupBy) Int

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

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

func (*CacheLockGroupBy) IntX

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

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

func (*CacheLockGroupBy) Ints

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

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

func (*CacheLockGroupBy) IntsX

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

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

func (*CacheLockGroupBy) Scan

func (clgb *CacheLockGroupBy) Scan(ctx context.Context, v any) error

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

func (*CacheLockGroupBy) ScanX

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

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

func (*CacheLockGroupBy) String

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

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

func (*CacheLockGroupBy) StringX

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

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

func (*CacheLockGroupBy) Strings

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

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

func (*CacheLockGroupBy) StringsX

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

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

type CacheLockMutation

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

CacheLockMutation represents an operation that mutates the CacheLock nodes in the graph.

func (*CacheLockMutation) AddField

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

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

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

func (*CacheLockMutation) AddedField

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

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

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

func (*CacheLockMutation) AddedIDs

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

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

func (*CacheLockMutation) ClearEdge

func (m *CacheLockMutation) 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 (*CacheLockMutation) ClearExpiredAt

func (m *CacheLockMutation) ClearExpiredAt()

ClearExpiredAt clears the value of the "expired_at" field.

func (*CacheLockMutation) ClearField

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

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

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

func (*CacheLockMutation) ClearedFields

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

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

func (CacheLockMutation) Client

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

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

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

func (*CacheLockMutation) ExpiredAt

func (m *CacheLockMutation) ExpiredAt() (r time.Time, exists bool)

ExpiredAt returns the value of the "expired_at" field in the mutation.

func (*CacheLockMutation) ExpiredAtCleared

func (m *CacheLockMutation) ExpiredAtCleared() bool

ExpiredAtCleared returns if the "expired_at" field was cleared in this mutation.

func (*CacheLockMutation) Field

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

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

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

func (*CacheLockMutation) Fields

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

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

func (m *CacheLockMutation) 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 (*CacheLockMutation) Key

func (m *CacheLockMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*CacheLockMutation) OldExpiredAt

func (m *CacheLockMutation) OldExpiredAt(ctx context.Context) (v time.Time, err error)

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

func (*CacheLockMutation) OldField

func (m *CacheLockMutation) 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 (*CacheLockMutation) OldKey

func (m *CacheLockMutation) OldKey(ctx context.Context) (v string, err error)

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

func (*CacheLockMutation) OldOwner

func (m *CacheLockMutation) OldOwner(ctx context.Context) (v string, err error)

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

func (*CacheLockMutation) Op

func (m *CacheLockMutation) Op() Op

Op returns the operation name.

func (*CacheLockMutation) Owner

func (m *CacheLockMutation) Owner() (r string, exists bool)

Owner returns the value of the "owner" field in the mutation.

func (*CacheLockMutation) RemovedEdges

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

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

func (*CacheLockMutation) RemovedIDs

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

func (m *CacheLockMutation) 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 (*CacheLockMutation) ResetExpiredAt

func (m *CacheLockMutation) ResetExpiredAt()

ResetExpiredAt resets all changes to the "expired_at" field.

func (*CacheLockMutation) ResetField

func (m *CacheLockMutation) 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 (*CacheLockMutation) ResetKey

func (m *CacheLockMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*CacheLockMutation) ResetOwner

func (m *CacheLockMutation) ResetOwner()

ResetOwner resets all changes to the "owner" field.

func (*CacheLockMutation) SetExpiredAt

func (m *CacheLockMutation) SetExpiredAt(t time.Time)

SetExpiredAt sets the "expired_at" field.

func (*CacheLockMutation) SetField

func (m *CacheLockMutation) 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 (*CacheLockMutation) SetKey

func (m *CacheLockMutation) SetKey(s string)

SetKey sets the "key" field.

func (*CacheLockMutation) SetOp

func (m *CacheLockMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CacheLockMutation) SetOwner

func (m *CacheLockMutation) SetOwner(s string)

SetOwner sets the "owner" field.

func (CacheLockMutation) Tx

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

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

func (*CacheLockMutation) Type

func (m *CacheLockMutation) Type() string

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

func (*CacheLockMutation) Where

func (m *CacheLockMutation) Where(ps ...predicate.CacheLock)

Where appends a list predicates to the CacheLockMutation builder.

func (*CacheLockMutation) WhereP

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

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

type CacheLockQuery

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

CacheLockQuery is the builder for querying CacheLock entities.

func (*CacheLockQuery) Aggregate

func (clq *CacheLockQuery) Aggregate(fns ...AggregateFunc) *CacheLockSelect

Aggregate returns a CacheLockSelect configured with the given aggregations.

func (*CacheLockQuery) All

func (clq *CacheLockQuery) All(ctx context.Context) ([]*CacheLock, error)

All executes the query and returns a list of CacheLocks.

func (*CacheLockQuery) AllX

func (clq *CacheLockQuery) AllX(ctx context.Context) []*CacheLock

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

func (*CacheLockQuery) Clone

func (clq *CacheLockQuery) Clone() *CacheLockQuery

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

func (*CacheLockQuery) Count

func (clq *CacheLockQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CacheLockQuery) CountX

func (clq *CacheLockQuery) CountX(ctx context.Context) int

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

func (*CacheLockQuery) Exist

func (clq *CacheLockQuery) Exist(ctx context.Context) (bool, error)

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

func (*CacheLockQuery) ExistX

func (clq *CacheLockQuery) ExistX(ctx context.Context) bool

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

func (*CacheLockQuery) First

func (clq *CacheLockQuery) First(ctx context.Context) (*CacheLock, error)

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

func (*CacheLockQuery) FirstID

func (clq *CacheLockQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CacheLockQuery) FirstIDX

func (clq *CacheLockQuery) FirstIDX(ctx context.Context) int

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

func (*CacheLockQuery) FirstX

func (clq *CacheLockQuery) FirstX(ctx context.Context) *CacheLock

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

func (*CacheLockQuery) ForShare

func (clq *CacheLockQuery) ForShare(opts ...sql.LockOption) *CacheLockQuery

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

func (*CacheLockQuery) ForUpdate

func (clq *CacheLockQuery) ForUpdate(opts ...sql.LockOption) *CacheLockQuery

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

func (*CacheLockQuery) GroupBy

func (clq *CacheLockQuery) GroupBy(field string, fields ...string) *CacheLockGroupBy

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

client.CacheLock.Query().
	GroupBy(cachelock.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CacheLockQuery) IDs

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

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

func (*CacheLockQuery) IDsX

func (clq *CacheLockQuery) IDsX(ctx context.Context) []int

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

func (*CacheLockQuery) Limit

func (clq *CacheLockQuery) Limit(limit int) *CacheLockQuery

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

func (*CacheLockQuery) Offset

func (clq *CacheLockQuery) Offset(offset int) *CacheLockQuery

Offset to start from.

func (*CacheLockQuery) Only

func (clq *CacheLockQuery) Only(ctx context.Context) (*CacheLock, error)

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

func (*CacheLockQuery) OnlyID

func (clq *CacheLockQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CacheLockQuery) OnlyIDX

func (clq *CacheLockQuery) OnlyIDX(ctx context.Context) int

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

func (*CacheLockQuery) OnlyX

func (clq *CacheLockQuery) OnlyX(ctx context.Context) *CacheLock

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

func (*CacheLockQuery) Order

Order specifies how the records should be ordered.

func (*CacheLockQuery) Select

func (clq *CacheLockQuery) Select(fields ...string) *CacheLockSelect

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

client.CacheLock.Query().
	Select(cachelock.FieldKey).
	Scan(ctx, &v)

func (*CacheLockQuery) Unique

func (clq *CacheLockQuery) Unique(unique bool) *CacheLockQuery

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

func (clq *CacheLockQuery) Where(ps ...predicate.CacheLock) *CacheLockQuery

Where adds a new predicate for the CacheLockQuery builder.

type CacheLockSelect

type CacheLockSelect struct {
	*CacheLockQuery
	// contains filtered or unexported fields
}

CacheLockSelect is the builder for selecting fields of CacheLock entities.

func (*CacheLockSelect) Aggregate

func (cls *CacheLockSelect) Aggregate(fns ...AggregateFunc) *CacheLockSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CacheLockSelect) Bool

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

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

func (*CacheLockSelect) BoolX

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

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

func (*CacheLockSelect) Bools

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

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

func (*CacheLockSelect) BoolsX

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

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

func (*CacheLockSelect) Float64

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

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

func (*CacheLockSelect) Float64X

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

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

func (*CacheLockSelect) Float64s

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

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

func (*CacheLockSelect) Float64sX

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

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

func (*CacheLockSelect) Int

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

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

func (*CacheLockSelect) IntX

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

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

func (*CacheLockSelect) Ints

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

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

func (*CacheLockSelect) IntsX

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

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

func (*CacheLockSelect) Scan

func (cls *CacheLockSelect) Scan(ctx context.Context, v any) error

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

func (*CacheLockSelect) ScanX

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

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

func (*CacheLockSelect) String

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

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

func (*CacheLockSelect) StringX

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

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

func (*CacheLockSelect) Strings

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

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

func (*CacheLockSelect) StringsX

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

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

type CacheLockUpdate

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

CacheLockUpdate is the builder for updating CacheLock entities.

func (*CacheLockUpdate) ClearExpiredAt

func (clu *CacheLockUpdate) ClearExpiredAt() *CacheLockUpdate

ClearExpiredAt clears the value of the "expired_at" field.

func (*CacheLockUpdate) Exec

func (clu *CacheLockUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CacheLockUpdate) ExecX

func (clu *CacheLockUpdate) ExecX(ctx context.Context)

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

func (*CacheLockUpdate) Mutation

func (clu *CacheLockUpdate) Mutation() *CacheLockMutation

Mutation returns the CacheLockMutation object of the builder.

func (*CacheLockUpdate) Save

func (clu *CacheLockUpdate) Save(ctx context.Context) (int, error)

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

func (*CacheLockUpdate) SaveX

func (clu *CacheLockUpdate) SaveX(ctx context.Context) int

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

func (*CacheLockUpdate) SetExpiredAt

func (clu *CacheLockUpdate) SetExpiredAt(t time.Time) *CacheLockUpdate

SetExpiredAt sets the "expired_at" field.

func (*CacheLockUpdate) SetKey

func (clu *CacheLockUpdate) SetKey(s string) *CacheLockUpdate

SetKey sets the "key" field.

func (*CacheLockUpdate) SetNillableExpiredAt

func (clu *CacheLockUpdate) SetNillableExpiredAt(t *time.Time) *CacheLockUpdate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*CacheLockUpdate) SetNillableKey

func (clu *CacheLockUpdate) SetNillableKey(s *string) *CacheLockUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*CacheLockUpdate) SetNillableOwner

func (clu *CacheLockUpdate) SetNillableOwner(s *string) *CacheLockUpdate

SetNillableOwner sets the "owner" field if the given value is not nil.

func (*CacheLockUpdate) SetOwner

func (clu *CacheLockUpdate) SetOwner(s string) *CacheLockUpdate

SetOwner sets the "owner" field.

func (*CacheLockUpdate) Where

Where appends a list predicates to the CacheLockUpdate builder.

type CacheLockUpdateOne

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

CacheLockUpdateOne is the builder for updating a single CacheLock entity.

func (*CacheLockUpdateOne) ClearExpiredAt

func (cluo *CacheLockUpdateOne) ClearExpiredAt() *CacheLockUpdateOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*CacheLockUpdateOne) Exec

func (cluo *CacheLockUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CacheLockUpdateOne) ExecX

func (cluo *CacheLockUpdateOne) ExecX(ctx context.Context)

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

func (*CacheLockUpdateOne) Mutation

func (cluo *CacheLockUpdateOne) Mutation() *CacheLockMutation

Mutation returns the CacheLockMutation object of the builder.

func (*CacheLockUpdateOne) Save

func (cluo *CacheLockUpdateOne) Save(ctx context.Context) (*CacheLock, error)

Save executes the query and returns the updated CacheLock entity.

func (*CacheLockUpdateOne) SaveX

func (cluo *CacheLockUpdateOne) SaveX(ctx context.Context) *CacheLock

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

func (*CacheLockUpdateOne) Select

func (cluo *CacheLockUpdateOne) Select(field string, fields ...string) *CacheLockUpdateOne

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

func (*CacheLockUpdateOne) SetExpiredAt

func (cluo *CacheLockUpdateOne) SetExpiredAt(t time.Time) *CacheLockUpdateOne

SetExpiredAt sets the "expired_at" field.

func (*CacheLockUpdateOne) SetKey

func (cluo *CacheLockUpdateOne) SetKey(s string) *CacheLockUpdateOne

SetKey sets the "key" field.

func (*CacheLockUpdateOne) SetNillableExpiredAt

func (cluo *CacheLockUpdateOne) SetNillableExpiredAt(t *time.Time) *CacheLockUpdateOne

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*CacheLockUpdateOne) SetNillableKey

func (cluo *CacheLockUpdateOne) SetNillableKey(s *string) *CacheLockUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*CacheLockUpdateOne) SetNillableOwner

func (cluo *CacheLockUpdateOne) SetNillableOwner(s *string) *CacheLockUpdateOne

SetNillableOwner sets the "owner" field if the given value is not nil.

func (*CacheLockUpdateOne) SetOwner

func (cluo *CacheLockUpdateOne) SetOwner(s string) *CacheLockUpdateOne

SetOwner sets the "owner" field.

func (*CacheLockUpdateOne) Where

Where appends a list predicates to the CacheLockUpdate builder.

type CacheLockUpsert

type CacheLockUpsert struct {
	*sql.UpdateSet
}

CacheLockUpsert is the "OnConflict" setter.

func (*CacheLockUpsert) ClearExpiredAt

func (u *CacheLockUpsert) ClearExpiredAt() *CacheLockUpsert

ClearExpiredAt clears the value of the "expired_at" field.

func (*CacheLockUpsert) SetExpiredAt

func (u *CacheLockUpsert) SetExpiredAt(v time.Time) *CacheLockUpsert

SetExpiredAt sets the "expired_at" field.

func (*CacheLockUpsert) SetKey

func (u *CacheLockUpsert) SetKey(v string) *CacheLockUpsert

SetKey sets the "key" field.

func (*CacheLockUpsert) SetOwner

func (u *CacheLockUpsert) SetOwner(v string) *CacheLockUpsert

SetOwner sets the "owner" field.

func (*CacheLockUpsert) UpdateExpiredAt

func (u *CacheLockUpsert) UpdateExpiredAt() *CacheLockUpsert

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*CacheLockUpsert) UpdateKey

func (u *CacheLockUpsert) UpdateKey() *CacheLockUpsert

UpdateKey sets the "key" field to the value that was provided on create.

func (*CacheLockUpsert) UpdateOwner

func (u *CacheLockUpsert) UpdateOwner() *CacheLockUpsert

UpdateOwner sets the "owner" field to the value that was provided on create.

type CacheLockUpsertBulk

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

CacheLockUpsertBulk is the builder for "upsert"-ing a bulk of CacheLock nodes.

func (*CacheLockUpsertBulk) ClearExpiredAt

func (u *CacheLockUpsertBulk) ClearExpiredAt() *CacheLockUpsertBulk

ClearExpiredAt clears the value of the "expired_at" field.

func (*CacheLockUpsertBulk) DoNothing

func (u *CacheLockUpsertBulk) DoNothing() *CacheLockUpsertBulk

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

func (*CacheLockUpsertBulk) Exec

Exec executes the query.

func (*CacheLockUpsertBulk) ExecX

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

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

func (*CacheLockUpsertBulk) Ignore

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

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

func (*CacheLockUpsertBulk) SetExpiredAt

func (u *CacheLockUpsertBulk) SetExpiredAt(v time.Time) *CacheLockUpsertBulk

SetExpiredAt sets the "expired_at" field.

func (*CacheLockUpsertBulk) SetKey

SetKey sets the "key" field.

func (*CacheLockUpsertBulk) SetOwner

SetOwner sets the "owner" field.

func (*CacheLockUpsertBulk) Update

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

func (*CacheLockUpsertBulk) UpdateExpiredAt

func (u *CacheLockUpsertBulk) UpdateExpiredAt() *CacheLockUpsertBulk

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*CacheLockUpsertBulk) UpdateKey

func (u *CacheLockUpsertBulk) UpdateKey() *CacheLockUpsertBulk

UpdateKey sets the "key" field to the value that was provided on create.

func (*CacheLockUpsertBulk) UpdateNewValues

func (u *CacheLockUpsertBulk) UpdateNewValues() *CacheLockUpsertBulk

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

client.CacheLock.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CacheLockUpsertBulk) UpdateOwner

func (u *CacheLockUpsertBulk) UpdateOwner() *CacheLockUpsertBulk

UpdateOwner sets the "owner" field to the value that was provided on create.

type CacheLockUpsertOne

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

CacheLockUpsertOne is the builder for "upsert"-ing

one CacheLock node.

func (*CacheLockUpsertOne) ClearExpiredAt

func (u *CacheLockUpsertOne) ClearExpiredAt() *CacheLockUpsertOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*CacheLockUpsertOne) DoNothing

func (u *CacheLockUpsertOne) DoNothing() *CacheLockUpsertOne

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

func (*CacheLockUpsertOne) Exec

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

Exec executes the query.

func (*CacheLockUpsertOne) ExecX

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

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

func (*CacheLockUpsertOne) ID

func (u *CacheLockUpsertOne) ID(ctx context.Context) (id int, err error)

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

func (*CacheLockUpsertOne) IDX

func (u *CacheLockUpsertOne) IDX(ctx context.Context) int

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

func (*CacheLockUpsertOne) Ignore

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

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

func (*CacheLockUpsertOne) SetExpiredAt

func (u *CacheLockUpsertOne) SetExpiredAt(v time.Time) *CacheLockUpsertOne

SetExpiredAt sets the "expired_at" field.

func (*CacheLockUpsertOne) SetKey

SetKey sets the "key" field.

func (*CacheLockUpsertOne) SetOwner

SetOwner sets the "owner" field.

func (*CacheLockUpsertOne) Update

func (u *CacheLockUpsertOne) Update(set func(*CacheLockUpsert)) *CacheLockUpsertOne

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

func (*CacheLockUpsertOne) UpdateExpiredAt

func (u *CacheLockUpsertOne) UpdateExpiredAt() *CacheLockUpsertOne

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*CacheLockUpsertOne) UpdateKey

func (u *CacheLockUpsertOne) UpdateKey() *CacheLockUpsertOne

UpdateKey sets the "key" field to the value that was provided on create.

func (*CacheLockUpsertOne) UpdateNewValues

func (u *CacheLockUpsertOne) UpdateNewValues() *CacheLockUpsertOne

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

client.CacheLock.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CacheLockUpsertOne) UpdateOwner

func (u *CacheLockUpsertOne) UpdateOwner() *CacheLockUpsertOne

UpdateOwner sets the "owner" field to the value that was provided on create.

type CacheLocks

type CacheLocks []*CacheLock

CacheLocks is a parsable slice of CacheLock.

type Changelog

type Changelog struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Version holds the value of the "version" field.
	Version int `json:"version,omitempty"`
	// 修改人
	Username string `json:"username,omitempty"`
	// 用户提交的配置
	Config string `json:"config,omitempty"`
	// GitBranch holds the value of the "git_branch" field.
	GitBranch string `json:"git_branch,omitempty"`
	// GitCommit holds the value of the "git_commit" field.
	GitCommit string `json:"git_commit,omitempty"`
	// DockerImage holds the value of the "docker_image" field.
	DockerImage []string `json:"docker_image,omitempty"`
	// 可用的环境变量值
	EnvValues []*types.KeyValue `json:"env_values,omitempty"`
	// 用户表单传入的额外值
	ExtraValues []*websocket.ExtraValue `json:"extra_values,omitempty"`
	// 用户表单传入的额外值 + 系统默认的额外值
	FinalExtraValues []*websocket.ExtraValue `json:"final_extra_values,omitempty"`
	// GitCommitWebURL holds the value of the "git_commit_web_url" field.
	GitCommitWebURL string `json:"git_commit_web_url,omitempty"`
	// GitCommitTitle holds the value of the "git_commit_title" field.
	GitCommitTitle string `json:"git_commit_title,omitempty"`
	// GitCommitAuthor holds the value of the "git_commit_author" field.
	GitCommitAuthor string `json:"git_commit_author,omitempty"`
	// GitCommitDate holds the value of the "git_commit_date" field.
	GitCommitDate *time.Time `json:"git_commit_date,omitempty"`
	// ConfigChanged holds the value of the "config_changed" field.
	ConfigChanged bool `json:"config_changed,omitempty"`
	// ProjectID holds the value of the "project_id" field.
	ProjectID int `json:"project_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ChangelogQuery when eager-loading is set.
	Edges ChangelogEdges `json:"edges"`
	// contains filtered or unexported fields
}

Changelog is the model entity for the Changelog schema.

func (*Changelog) QueryProject

func (c *Changelog) QueryProject() *ProjectQuery

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

func (*Changelog) String

func (c *Changelog) String() string

String implements the fmt.Stringer.

func (*Changelog) Unwrap

func (c *Changelog) Unwrap() *Changelog

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

func (c *Changelog) Update() *ChangelogUpdateOne

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

func (*Changelog) Value

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

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

type ChangelogClient

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

ChangelogClient is a client for the Changelog schema.

func NewChangelogClient

func NewChangelogClient(c config) *ChangelogClient

NewChangelogClient returns a client for the Changelog from the given config.

func (*ChangelogClient) Create

func (c *ChangelogClient) Create() *ChangelogCreate

Create returns a builder for creating a Changelog entity.

func (*ChangelogClient) CreateBulk

func (c *ChangelogClient) CreateBulk(builders ...*ChangelogCreate) *ChangelogCreateBulk

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

func (*ChangelogClient) Delete

func (c *ChangelogClient) Delete() *ChangelogDelete

Delete returns a delete builder for Changelog.

func (*ChangelogClient) DeleteOne

func (c *ChangelogClient) DeleteOne(ch *Changelog) *ChangelogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ChangelogClient) DeleteOneID

func (c *ChangelogClient) DeleteOneID(id int) *ChangelogDeleteOne

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

func (*ChangelogClient) Get

func (c *ChangelogClient) Get(ctx context.Context, id int) (*Changelog, error)

Get returns a Changelog entity by its id.

func (*ChangelogClient) GetX

func (c *ChangelogClient) GetX(ctx context.Context, id int) *Changelog

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

func (*ChangelogClient) Hooks

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

Hooks returns the client hooks.

func (*ChangelogClient) Intercept

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

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

func (*ChangelogClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ChangelogClient) MapCreateBulk

func (c *ChangelogClient) MapCreateBulk(slice any, setFunc func(*ChangelogCreate, int)) *ChangelogCreateBulk

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

func (c *ChangelogClient) Query() *ChangelogQuery

Query returns a query builder for Changelog.

func (*ChangelogClient) QueryProject

func (c *ChangelogClient) QueryProject(ch *Changelog) *ProjectQuery

QueryProject queries the project edge of a Changelog.

func (*ChangelogClient) Update

func (c *ChangelogClient) Update() *ChangelogUpdate

Update returns an update builder for Changelog.

func (*ChangelogClient) UpdateOne

func (c *ChangelogClient) UpdateOne(ch *Changelog) *ChangelogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ChangelogClient) UpdateOneID

func (c *ChangelogClient) UpdateOneID(id int) *ChangelogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ChangelogClient) Use

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

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

type ChangelogCreate

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

ChangelogCreate is the builder for creating a Changelog entity.

func (*ChangelogCreate) Exec

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

Exec executes the query.

func (*ChangelogCreate) ExecX

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

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

func (*ChangelogCreate) Mutation

func (cc *ChangelogCreate) Mutation() *ChangelogMutation

Mutation returns the ChangelogMutation object of the builder.

func (*ChangelogCreate) OnConflict

func (cc *ChangelogCreate) OnConflict(opts ...sql.ConflictOption) *ChangelogUpsertOne

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

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

func (*ChangelogCreate) OnConflictColumns

func (cc *ChangelogCreate) OnConflictColumns(columns ...string) *ChangelogUpsertOne

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

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

func (*ChangelogCreate) Save

func (cc *ChangelogCreate) Save(ctx context.Context) (*Changelog, error)

Save creates the Changelog in the database.

func (*ChangelogCreate) SaveX

func (cc *ChangelogCreate) SaveX(ctx context.Context) *Changelog

SaveX calls Save and panics if Save returns an error.

func (*ChangelogCreate) SetConfig

func (cc *ChangelogCreate) SetConfig(s string) *ChangelogCreate

SetConfig sets the "config" field.

func (*ChangelogCreate) SetConfigChanged

func (cc *ChangelogCreate) SetConfigChanged(b bool) *ChangelogCreate

SetConfigChanged sets the "config_changed" field.

func (*ChangelogCreate) SetCreatedAt

func (cc *ChangelogCreate) SetCreatedAt(t time.Time) *ChangelogCreate

SetCreatedAt sets the "created_at" field.

func (*ChangelogCreate) SetDeletedAt

func (cc *ChangelogCreate) SetDeletedAt(t time.Time) *ChangelogCreate

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogCreate) SetDockerImage

func (cc *ChangelogCreate) SetDockerImage(s []string) *ChangelogCreate

SetDockerImage sets the "docker_image" field.

func (*ChangelogCreate) SetEnvValues

func (cc *ChangelogCreate) SetEnvValues(tv []*types.KeyValue) *ChangelogCreate

SetEnvValues sets the "env_values" field.

func (*ChangelogCreate) SetExtraValues

func (cc *ChangelogCreate) SetExtraValues(wv []*websocket.ExtraValue) *ChangelogCreate

SetExtraValues sets the "extra_values" field.

func (*ChangelogCreate) SetFinalExtraValues

func (cc *ChangelogCreate) SetFinalExtraValues(wv []*websocket.ExtraValue) *ChangelogCreate

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogCreate) SetGitBranch

func (cc *ChangelogCreate) SetGitBranch(s string) *ChangelogCreate

SetGitBranch sets the "git_branch" field.

func (*ChangelogCreate) SetGitCommit

func (cc *ChangelogCreate) SetGitCommit(s string) *ChangelogCreate

SetGitCommit sets the "git_commit" field.

func (*ChangelogCreate) SetGitCommitAuthor

func (cc *ChangelogCreate) SetGitCommitAuthor(s string) *ChangelogCreate

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogCreate) SetGitCommitDate

func (cc *ChangelogCreate) SetGitCommitDate(t time.Time) *ChangelogCreate

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogCreate) SetGitCommitTitle

func (cc *ChangelogCreate) SetGitCommitTitle(s string) *ChangelogCreate

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogCreate) SetGitCommitWebURL

func (cc *ChangelogCreate) SetGitCommitWebURL(s string) *ChangelogCreate

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogCreate) SetNillableConfig

func (cc *ChangelogCreate) SetNillableConfig(s *string) *ChangelogCreate

SetNillableConfig sets the "config" field if the given value is not nil.

func (*ChangelogCreate) SetNillableConfigChanged

func (cc *ChangelogCreate) SetNillableConfigChanged(b *bool) *ChangelogCreate

SetNillableConfigChanged sets the "config_changed" field if the given value is not nil.

func (*ChangelogCreate) SetNillableCreatedAt

func (cc *ChangelogCreate) SetNillableCreatedAt(t *time.Time) *ChangelogCreate

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

func (*ChangelogCreate) SetNillableDeletedAt

func (cc *ChangelogCreate) SetNillableDeletedAt(t *time.Time) *ChangelogCreate

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

func (*ChangelogCreate) SetNillableGitBranch

func (cc *ChangelogCreate) SetNillableGitBranch(s *string) *ChangelogCreate

SetNillableGitBranch sets the "git_branch" field if the given value is not nil.

func (*ChangelogCreate) SetNillableGitCommit

func (cc *ChangelogCreate) SetNillableGitCommit(s *string) *ChangelogCreate

SetNillableGitCommit sets the "git_commit" field if the given value is not nil.

func (*ChangelogCreate) SetNillableGitCommitAuthor

func (cc *ChangelogCreate) SetNillableGitCommitAuthor(s *string) *ChangelogCreate

SetNillableGitCommitAuthor sets the "git_commit_author" field if the given value is not nil.

func (*ChangelogCreate) SetNillableGitCommitDate

func (cc *ChangelogCreate) SetNillableGitCommitDate(t *time.Time) *ChangelogCreate

SetNillableGitCommitDate sets the "git_commit_date" field if the given value is not nil.

func (*ChangelogCreate) SetNillableGitCommitTitle

func (cc *ChangelogCreate) SetNillableGitCommitTitle(s *string) *ChangelogCreate

SetNillableGitCommitTitle sets the "git_commit_title" field if the given value is not nil.

func (*ChangelogCreate) SetNillableGitCommitWebURL

func (cc *ChangelogCreate) SetNillableGitCommitWebURL(s *string) *ChangelogCreate

SetNillableGitCommitWebURL sets the "git_commit_web_url" field if the given value is not nil.

func (*ChangelogCreate) SetNillableProjectID

func (cc *ChangelogCreate) SetNillableProjectID(i *int) *ChangelogCreate

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

func (*ChangelogCreate) SetNillableUpdatedAt

func (cc *ChangelogCreate) SetNillableUpdatedAt(t *time.Time) *ChangelogCreate

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

func (*ChangelogCreate) SetNillableVersion

func (cc *ChangelogCreate) SetNillableVersion(i *int) *ChangelogCreate

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

func (*ChangelogCreate) SetProject

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

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

func (*ChangelogCreate) SetProjectID

func (cc *ChangelogCreate) SetProjectID(i int) *ChangelogCreate

SetProjectID sets the "project_id" field.

func (*ChangelogCreate) SetUpdatedAt

func (cc *ChangelogCreate) SetUpdatedAt(t time.Time) *ChangelogCreate

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogCreate) SetUsername

func (cc *ChangelogCreate) SetUsername(s string) *ChangelogCreate

SetUsername sets the "username" field.

func (*ChangelogCreate) SetVersion

func (cc *ChangelogCreate) SetVersion(i int) *ChangelogCreate

SetVersion sets the "version" field.

type ChangelogCreateBulk

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

ChangelogCreateBulk is the builder for creating many Changelog entities in bulk.

func (*ChangelogCreateBulk) Exec

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

Exec executes the query.

func (*ChangelogCreateBulk) ExecX

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

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

func (*ChangelogCreateBulk) OnConflict

func (ccb *ChangelogCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChangelogUpsertBulk

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

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

func (*ChangelogCreateBulk) OnConflictColumns

func (ccb *ChangelogCreateBulk) OnConflictColumns(columns ...string) *ChangelogUpsertBulk

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

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

func (*ChangelogCreateBulk) Save

func (ccb *ChangelogCreateBulk) Save(ctx context.Context) ([]*Changelog, error)

Save creates the Changelog entities in the database.

func (*ChangelogCreateBulk) SaveX

func (ccb *ChangelogCreateBulk) SaveX(ctx context.Context) []*Changelog

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

type ChangelogDelete

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

ChangelogDelete is the builder for deleting a Changelog entity.

func (*ChangelogDelete) Exec

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

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

func (*ChangelogDelete) ExecX

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

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

func (*ChangelogDelete) Where

Where appends a list predicates to the ChangelogDelete builder.

type ChangelogDeleteOne

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

ChangelogDeleteOne is the builder for deleting a single Changelog entity.

func (*ChangelogDeleteOne) Exec

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

Exec executes the deletion query.

func (*ChangelogDeleteOne) ExecX

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

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

func (*ChangelogDeleteOne) Where

Where appends a list predicates to the ChangelogDelete builder.

type ChangelogEdges

type ChangelogEdges struct {
	// Project holds the value of the project edge.
	Project *Project `json:"project,omitempty"`
	// contains filtered or unexported fields
}

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

func (ChangelogEdges) ProjectOrErr

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

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

type ChangelogGroupBy

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

ChangelogGroupBy is the group-by builder for Changelog entities.

func (*ChangelogGroupBy) Aggregate

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

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

func (*ChangelogGroupBy) Bool

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

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

func (*ChangelogGroupBy) BoolX

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

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

func (*ChangelogGroupBy) Bools

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

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

func (*ChangelogGroupBy) BoolsX

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

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

func (*ChangelogGroupBy) Float64

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

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

func (*ChangelogGroupBy) Float64X

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

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

func (*ChangelogGroupBy) Float64s

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

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

func (*ChangelogGroupBy) Float64sX

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

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

func (*ChangelogGroupBy) Int

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

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

func (*ChangelogGroupBy) IntX

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

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

func (*ChangelogGroupBy) Ints

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

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

func (*ChangelogGroupBy) IntsX

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

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

func (*ChangelogGroupBy) Scan

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

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

func (*ChangelogGroupBy) ScanX

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

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

func (*ChangelogGroupBy) String

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

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

func (*ChangelogGroupBy) StringX

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

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

func (*ChangelogGroupBy) Strings

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

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

func (*ChangelogGroupBy) StringsX

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

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

type ChangelogMutation

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

ChangelogMutation represents an operation that mutates the Changelog nodes in the graph.

func (*ChangelogMutation) AddField

func (m *ChangelogMutation) 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 (*ChangelogMutation) AddVersion

func (m *ChangelogMutation) AddVersion(i int)

AddVersion adds i to the "version" field.

func (*ChangelogMutation) AddedEdges

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

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

func (*ChangelogMutation) AddedField

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

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

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

func (*ChangelogMutation) AddedIDs

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

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

func (*ChangelogMutation) AddedVersion

func (m *ChangelogMutation) AddedVersion() (r int, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*ChangelogMutation) AppendDockerImage

func (m *ChangelogMutation) AppendDockerImage(s []string)

AppendDockerImage adds s to the "docker_image" field.

func (*ChangelogMutation) AppendEnvValues

func (m *ChangelogMutation) AppendEnvValues(tv []*types.KeyValue)

AppendEnvValues adds tv to the "env_values" field.

func (*ChangelogMutation) AppendExtraValues

func (m *ChangelogMutation) AppendExtraValues(wv []*websocket.ExtraValue)

AppendExtraValues adds wv to the "extra_values" field.

func (*ChangelogMutation) AppendFinalExtraValues

func (m *ChangelogMutation) AppendFinalExtraValues(wv []*websocket.ExtraValue)

AppendFinalExtraValues adds wv to the "final_extra_values" field.

func (*ChangelogMutation) AppendedDockerImage

func (m *ChangelogMutation) AppendedDockerImage() ([]string, bool)

AppendedDockerImage returns the list of values that were appended to the "docker_image" field in this mutation.

func (*ChangelogMutation) AppendedEnvValues

func (m *ChangelogMutation) AppendedEnvValues() ([]*types.KeyValue, bool)

AppendedEnvValues returns the list of values that were appended to the "env_values" field in this mutation.

func (*ChangelogMutation) AppendedExtraValues

func (m *ChangelogMutation) AppendedExtraValues() ([]*websocket.ExtraValue, bool)

AppendedExtraValues returns the list of values that were appended to the "extra_values" field in this mutation.

func (*ChangelogMutation) AppendedFinalExtraValues

func (m *ChangelogMutation) AppendedFinalExtraValues() ([]*websocket.ExtraValue, bool)

AppendedFinalExtraValues returns the list of values that were appended to the "final_extra_values" field in this mutation.

func (*ChangelogMutation) ClearConfig

func (m *ChangelogMutation) ClearConfig()

ClearConfig clears the value of the "config" field.

func (*ChangelogMutation) ClearDeletedAt

func (m *ChangelogMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChangelogMutation) ClearDockerImage

func (m *ChangelogMutation) ClearDockerImage()

ClearDockerImage clears the value of the "docker_image" field.

func (*ChangelogMutation) ClearEdge

func (m *ChangelogMutation) 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 (*ChangelogMutation) ClearEnvValues

func (m *ChangelogMutation) ClearEnvValues()

ClearEnvValues clears the value of the "env_values" field.

func (*ChangelogMutation) ClearExtraValues

func (m *ChangelogMutation) ClearExtraValues()

ClearExtraValues clears the value of the "extra_values" field.

func (*ChangelogMutation) ClearField

func (m *ChangelogMutation) 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 (*ChangelogMutation) ClearFinalExtraValues

func (m *ChangelogMutation) ClearFinalExtraValues()

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ChangelogMutation) ClearGitBranch

func (m *ChangelogMutation) ClearGitBranch()

ClearGitBranch clears the value of the "git_branch" field.

func (*ChangelogMutation) ClearGitCommit

func (m *ChangelogMutation) ClearGitCommit()

ClearGitCommit clears the value of the "git_commit" field.

func (*ChangelogMutation) ClearGitCommitAuthor

func (m *ChangelogMutation) ClearGitCommitAuthor()

ClearGitCommitAuthor clears the value of the "git_commit_author" field.

func (*ChangelogMutation) ClearGitCommitDate

func (m *ChangelogMutation) ClearGitCommitDate()

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ChangelogMutation) ClearGitCommitTitle

func (m *ChangelogMutation) ClearGitCommitTitle()

ClearGitCommitTitle clears the value of the "git_commit_title" field.

func (*ChangelogMutation) ClearGitCommitWebURL

func (m *ChangelogMutation) ClearGitCommitWebURL()

ClearGitCommitWebURL clears the value of the "git_commit_web_url" field.

func (*ChangelogMutation) ClearProject

func (m *ChangelogMutation) ClearProject()

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

func (*ChangelogMutation) ClearProjectID

func (m *ChangelogMutation) ClearProjectID()

ClearProjectID clears the value of the "project_id" field.

func (*ChangelogMutation) ClearedEdges

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

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

func (*ChangelogMutation) ClearedFields

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

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

func (ChangelogMutation) Client

func (m ChangelogMutation) 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 (*ChangelogMutation) Config

func (m *ChangelogMutation) Config() (r string, exists bool)

Config returns the value of the "config" field in the mutation.

func (*ChangelogMutation) ConfigChanged

func (m *ChangelogMutation) ConfigChanged() (r bool, exists bool)

ConfigChanged returns the value of the "config_changed" field in the mutation.

func (*ChangelogMutation) ConfigCleared

func (m *ChangelogMutation) ConfigCleared() bool

ConfigCleared returns if the "config" field was cleared in this mutation.

func (*ChangelogMutation) CreatedAt

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

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

func (*ChangelogMutation) DeletedAt

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

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

func (*ChangelogMutation) DeletedAtCleared

func (m *ChangelogMutation) DeletedAtCleared() bool

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

func (*ChangelogMutation) DockerImage

func (m *ChangelogMutation) DockerImage() (r []string, exists bool)

DockerImage returns the value of the "docker_image" field in the mutation.

func (*ChangelogMutation) DockerImageCleared

func (m *ChangelogMutation) DockerImageCleared() bool

DockerImageCleared returns if the "docker_image" field was cleared in this mutation.

func (*ChangelogMutation) EdgeCleared

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

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

func (*ChangelogMutation) EnvValues

func (m *ChangelogMutation) EnvValues() (r []*types.KeyValue, exists bool)

EnvValues returns the value of the "env_values" field in the mutation.

func (*ChangelogMutation) EnvValuesCleared

func (m *ChangelogMutation) EnvValuesCleared() bool

EnvValuesCleared returns if the "env_values" field was cleared in this mutation.

func (*ChangelogMutation) ExtraValues

func (m *ChangelogMutation) ExtraValues() (r []*websocket.ExtraValue, exists bool)

ExtraValues returns the value of the "extra_values" field in the mutation.

func (*ChangelogMutation) ExtraValuesCleared

func (m *ChangelogMutation) ExtraValuesCleared() bool

ExtraValuesCleared returns if the "extra_values" field was cleared in this mutation.

func (*ChangelogMutation) Field

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

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

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

func (*ChangelogMutation) Fields

func (m *ChangelogMutation) 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 (*ChangelogMutation) FinalExtraValues

func (m *ChangelogMutation) FinalExtraValues() (r []*websocket.ExtraValue, exists bool)

FinalExtraValues returns the value of the "final_extra_values" field in the mutation.

func (*ChangelogMutation) FinalExtraValuesCleared

func (m *ChangelogMutation) FinalExtraValuesCleared() bool

FinalExtraValuesCleared returns if the "final_extra_values" field was cleared in this mutation.

func (*ChangelogMutation) GitBranch

func (m *ChangelogMutation) GitBranch() (r string, exists bool)

GitBranch returns the value of the "git_branch" field in the mutation.

func (*ChangelogMutation) GitBranchCleared

func (m *ChangelogMutation) GitBranchCleared() bool

GitBranchCleared returns if the "git_branch" field was cleared in this mutation.

func (*ChangelogMutation) GitCommit

func (m *ChangelogMutation) GitCommit() (r string, exists bool)

GitCommit returns the value of the "git_commit" field in the mutation.

func (*ChangelogMutation) GitCommitAuthor

func (m *ChangelogMutation) GitCommitAuthor() (r string, exists bool)

GitCommitAuthor returns the value of the "git_commit_author" field in the mutation.

func (*ChangelogMutation) GitCommitAuthorCleared

func (m *ChangelogMutation) GitCommitAuthorCleared() bool

GitCommitAuthorCleared returns if the "git_commit_author" field was cleared in this mutation.

func (*ChangelogMutation) GitCommitCleared

func (m *ChangelogMutation) GitCommitCleared() bool

GitCommitCleared returns if the "git_commit" field was cleared in this mutation.

func (*ChangelogMutation) GitCommitDate

func (m *ChangelogMutation) GitCommitDate() (r time.Time, exists bool)

GitCommitDate returns the value of the "git_commit_date" field in the mutation.

func (*ChangelogMutation) GitCommitDateCleared

func (m *ChangelogMutation) GitCommitDateCleared() bool

GitCommitDateCleared returns if the "git_commit_date" field was cleared in this mutation.

func (*ChangelogMutation) GitCommitTitle

func (m *ChangelogMutation) GitCommitTitle() (r string, exists bool)

GitCommitTitle returns the value of the "git_commit_title" field in the mutation.

func (*ChangelogMutation) GitCommitTitleCleared

func (m *ChangelogMutation) GitCommitTitleCleared() bool

GitCommitTitleCleared returns if the "git_commit_title" field was cleared in this mutation.

func (*ChangelogMutation) GitCommitWebURL

func (m *ChangelogMutation) GitCommitWebURL() (r string, exists bool)

GitCommitWebURL returns the value of the "git_commit_web_url" field in the mutation.

func (*ChangelogMutation) GitCommitWebURLCleared

func (m *ChangelogMutation) GitCommitWebURLCleared() bool

GitCommitWebURLCleared returns if the "git_commit_web_url" field was cleared in this mutation.

func (*ChangelogMutation) ID

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

func (m *ChangelogMutation) 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 (*ChangelogMutation) OldConfig

func (m *ChangelogMutation) OldConfig(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldConfigChanged

func (m *ChangelogMutation) OldConfigChanged(ctx context.Context) (v bool, err error)

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

func (*ChangelogMutation) OldCreatedAt

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

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

func (*ChangelogMutation) OldDeletedAt

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

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

func (*ChangelogMutation) OldDockerImage

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

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

func (*ChangelogMutation) OldEnvValues

func (m *ChangelogMutation) OldEnvValues(ctx context.Context) (v []*types.KeyValue, err error)

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

func (*ChangelogMutation) OldExtraValues

func (m *ChangelogMutation) OldExtraValues(ctx context.Context) (v []*websocket.ExtraValue, err error)

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

func (*ChangelogMutation) OldField

func (m *ChangelogMutation) 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 (*ChangelogMutation) OldFinalExtraValues

func (m *ChangelogMutation) OldFinalExtraValues(ctx context.Context) (v []*websocket.ExtraValue, err error)

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

func (*ChangelogMutation) OldGitBranch

func (m *ChangelogMutation) OldGitBranch(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldGitCommit

func (m *ChangelogMutation) OldGitCommit(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldGitCommitAuthor

func (m *ChangelogMutation) OldGitCommitAuthor(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldGitCommitDate

func (m *ChangelogMutation) OldGitCommitDate(ctx context.Context) (v *time.Time, err error)

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

func (*ChangelogMutation) OldGitCommitTitle

func (m *ChangelogMutation) OldGitCommitTitle(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldGitCommitWebURL

func (m *ChangelogMutation) OldGitCommitWebURL(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldProjectID

func (m *ChangelogMutation) OldProjectID(ctx context.Context) (v int, err error)

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

func (*ChangelogMutation) OldUpdatedAt

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

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

func (*ChangelogMutation) OldUsername

func (m *ChangelogMutation) OldUsername(ctx context.Context) (v string, err error)

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

func (*ChangelogMutation) OldVersion

func (m *ChangelogMutation) OldVersion(ctx context.Context) (v int, err error)

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

func (*ChangelogMutation) Op

func (m *ChangelogMutation) Op() Op

Op returns the operation name.

func (*ChangelogMutation) ProjectCleared

func (m *ChangelogMutation) ProjectCleared() bool

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

func (*ChangelogMutation) ProjectID

func (m *ChangelogMutation) ProjectID() (r int, exists bool)

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

func (*ChangelogMutation) ProjectIDCleared

func (m *ChangelogMutation) ProjectIDCleared() bool

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

func (*ChangelogMutation) ProjectIDs

func (m *ChangelogMutation) ProjectIDs() (ids []int)

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

func (*ChangelogMutation) RemovedEdges

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

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

func (*ChangelogMutation) RemovedIDs

func (m *ChangelogMutation) 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 (*ChangelogMutation) ResetConfig

func (m *ChangelogMutation) ResetConfig()

ResetConfig resets all changes to the "config" field.

func (*ChangelogMutation) ResetConfigChanged

func (m *ChangelogMutation) ResetConfigChanged()

ResetConfigChanged resets all changes to the "config_changed" field.

func (*ChangelogMutation) ResetCreatedAt

func (m *ChangelogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ChangelogMutation) ResetDeletedAt

func (m *ChangelogMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*ChangelogMutation) ResetDockerImage

func (m *ChangelogMutation) ResetDockerImage()

ResetDockerImage resets all changes to the "docker_image" field.

func (*ChangelogMutation) ResetEdge

func (m *ChangelogMutation) 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 (*ChangelogMutation) ResetEnvValues

func (m *ChangelogMutation) ResetEnvValues()

ResetEnvValues resets all changes to the "env_values" field.

func (*ChangelogMutation) ResetExtraValues

func (m *ChangelogMutation) ResetExtraValues()

ResetExtraValues resets all changes to the "extra_values" field.

func (*ChangelogMutation) ResetField

func (m *ChangelogMutation) 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 (*ChangelogMutation) ResetFinalExtraValues

func (m *ChangelogMutation) ResetFinalExtraValues()

ResetFinalExtraValues resets all changes to the "final_extra_values" field.

func (*ChangelogMutation) ResetGitBranch

func (m *ChangelogMutation) ResetGitBranch()

ResetGitBranch resets all changes to the "git_branch" field.

func (*ChangelogMutation) ResetGitCommit

func (m *ChangelogMutation) ResetGitCommit()

ResetGitCommit resets all changes to the "git_commit" field.

func (*ChangelogMutation) ResetGitCommitAuthor

func (m *ChangelogMutation) ResetGitCommitAuthor()

ResetGitCommitAuthor resets all changes to the "git_commit_author" field.

func (*ChangelogMutation) ResetGitCommitDate

func (m *ChangelogMutation) ResetGitCommitDate()

ResetGitCommitDate resets all changes to the "git_commit_date" field.

func (*ChangelogMutation) ResetGitCommitTitle

func (m *ChangelogMutation) ResetGitCommitTitle()

ResetGitCommitTitle resets all changes to the "git_commit_title" field.

func (*ChangelogMutation) ResetGitCommitWebURL

func (m *ChangelogMutation) ResetGitCommitWebURL()

ResetGitCommitWebURL resets all changes to the "git_commit_web_url" field.

func (*ChangelogMutation) ResetProject

func (m *ChangelogMutation) ResetProject()

ResetProject resets all changes to the "project" edge.

func (*ChangelogMutation) ResetProjectID

func (m *ChangelogMutation) ResetProjectID()

ResetProjectID resets all changes to the "project_id" field.

func (*ChangelogMutation) ResetUpdatedAt

func (m *ChangelogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ChangelogMutation) ResetUsername

func (m *ChangelogMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*ChangelogMutation) ResetVersion

func (m *ChangelogMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*ChangelogMutation) SetConfig

func (m *ChangelogMutation) SetConfig(s string)

SetConfig sets the "config" field.

func (*ChangelogMutation) SetConfigChanged

func (m *ChangelogMutation) SetConfigChanged(b bool)

SetConfigChanged sets the "config_changed" field.

func (*ChangelogMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ChangelogMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogMutation) SetDockerImage

func (m *ChangelogMutation) SetDockerImage(s []string)

SetDockerImage sets the "docker_image" field.

func (*ChangelogMutation) SetEnvValues

func (m *ChangelogMutation) SetEnvValues(tv []*types.KeyValue)

SetEnvValues sets the "env_values" field.

func (*ChangelogMutation) SetExtraValues

func (m *ChangelogMutation) SetExtraValues(wv []*websocket.ExtraValue)

SetExtraValues sets the "extra_values" field.

func (*ChangelogMutation) SetField

func (m *ChangelogMutation) 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 (*ChangelogMutation) SetFinalExtraValues

func (m *ChangelogMutation) SetFinalExtraValues(wv []*websocket.ExtraValue)

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogMutation) SetGitBranch

func (m *ChangelogMutation) SetGitBranch(s string)

SetGitBranch sets the "git_branch" field.

func (*ChangelogMutation) SetGitCommit

func (m *ChangelogMutation) SetGitCommit(s string)

SetGitCommit sets the "git_commit" field.

func (*ChangelogMutation) SetGitCommitAuthor

func (m *ChangelogMutation) SetGitCommitAuthor(s string)

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogMutation) SetGitCommitDate

func (m *ChangelogMutation) SetGitCommitDate(t time.Time)

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogMutation) SetGitCommitTitle

func (m *ChangelogMutation) SetGitCommitTitle(s string)

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogMutation) SetGitCommitWebURL

func (m *ChangelogMutation) SetGitCommitWebURL(s string)

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogMutation) SetOp

func (m *ChangelogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ChangelogMutation) SetProjectID

func (m *ChangelogMutation) SetProjectID(i int)

SetProjectID sets the "project_id" field.

func (*ChangelogMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogMutation) SetUsername

func (m *ChangelogMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*ChangelogMutation) SetVersion

func (m *ChangelogMutation) SetVersion(i int)

SetVersion sets the "version" field.

func (ChangelogMutation) Tx

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

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

func (*ChangelogMutation) Type

func (m *ChangelogMutation) Type() string

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

func (*ChangelogMutation) UpdatedAt

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

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

func (*ChangelogMutation) Username

func (m *ChangelogMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*ChangelogMutation) Version

func (m *ChangelogMutation) Version() (r int, exists bool)

Version returns the value of the "version" field in the mutation.

func (*ChangelogMutation) Where

func (m *ChangelogMutation) Where(ps ...predicate.Changelog)

Where appends a list predicates to the ChangelogMutation builder.

func (*ChangelogMutation) WhereP

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

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

type ChangelogQuery

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

ChangelogQuery is the builder for querying Changelog entities.

func (*ChangelogQuery) Aggregate

func (cq *ChangelogQuery) Aggregate(fns ...AggregateFunc) *ChangelogSelect

Aggregate returns a ChangelogSelect configured with the given aggregations.

func (*ChangelogQuery) All

func (cq *ChangelogQuery) All(ctx context.Context) ([]*Changelog, error)

All executes the query and returns a list of Changelogs.

func (*ChangelogQuery) AllX

func (cq *ChangelogQuery) AllX(ctx context.Context) []*Changelog

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

func (*ChangelogQuery) Clone

func (cq *ChangelogQuery) Clone() *ChangelogQuery

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

func (*ChangelogQuery) Count

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

Count returns the count of the given query.

func (*ChangelogQuery) CountX

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

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

func (*ChangelogQuery) Exist

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

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

func (*ChangelogQuery) ExistX

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

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

func (*ChangelogQuery) First

func (cq *ChangelogQuery) First(ctx context.Context) (*Changelog, error)

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

func (*ChangelogQuery) FirstID

func (cq *ChangelogQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ChangelogQuery) FirstIDX

func (cq *ChangelogQuery) FirstIDX(ctx context.Context) int

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

func (*ChangelogQuery) FirstX

func (cq *ChangelogQuery) FirstX(ctx context.Context) *Changelog

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

func (*ChangelogQuery) ForShare

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

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

func (*ChangelogQuery) ForUpdate

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

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

func (*ChangelogQuery) GroupBy

func (cq *ChangelogQuery) GroupBy(field string, fields ...string) *ChangelogGroupBy

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

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Changelog.Query().
	GroupBy(changelog.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ChangelogQuery) IDs

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

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

func (*ChangelogQuery) IDsX

func (cq *ChangelogQuery) IDsX(ctx context.Context) []int

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

func (*ChangelogQuery) Limit

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

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

func (*ChangelogQuery) Offset

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

Offset to start from.

func (*ChangelogQuery) Only

func (cq *ChangelogQuery) Only(ctx context.Context) (*Changelog, error)

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

func (*ChangelogQuery) OnlyID

func (cq *ChangelogQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ChangelogQuery) OnlyIDX

func (cq *ChangelogQuery) OnlyIDX(ctx context.Context) int

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

func (*ChangelogQuery) OnlyX

func (cq *ChangelogQuery) OnlyX(ctx context.Context) *Changelog

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

func (*ChangelogQuery) Order

Order specifies how the records should be ordered.

func (*ChangelogQuery) QueryProject

func (cq *ChangelogQuery) QueryProject() *ProjectQuery

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

func (*ChangelogQuery) Select

func (cq *ChangelogQuery) Select(fields ...string) *ChangelogSelect

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

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Changelog.Query().
	Select(changelog.FieldCreatedAt).
	Scan(ctx, &v)

func (*ChangelogQuery) Unique

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

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

Where adds a new predicate for the ChangelogQuery builder.

func (*ChangelogQuery) WithProject

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

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

type ChangelogSelect

type ChangelogSelect struct {
	*ChangelogQuery
	// contains filtered or unexported fields
}

ChangelogSelect is the builder for selecting fields of Changelog entities.

func (*ChangelogSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*ChangelogSelect) Bool

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

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

func (*ChangelogSelect) BoolX

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

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

func (*ChangelogSelect) Bools

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

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

func (*ChangelogSelect) BoolsX

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

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

func (*ChangelogSelect) Float64

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

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

func (*ChangelogSelect) Float64X

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

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

func (*ChangelogSelect) Float64s

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

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

func (*ChangelogSelect) Float64sX

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

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

func (*ChangelogSelect) Int

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

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

func (*ChangelogSelect) IntX

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

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

func (*ChangelogSelect) Ints

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

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

func (*ChangelogSelect) IntsX

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

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

func (*ChangelogSelect) Scan

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

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

func (*ChangelogSelect) ScanX

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

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

func (*ChangelogSelect) String

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

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

func (*ChangelogSelect) StringX

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

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

func (*ChangelogSelect) Strings

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

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

func (*ChangelogSelect) StringsX

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

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

type ChangelogUpdate

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

ChangelogUpdate is the builder for updating Changelog entities.

func (*ChangelogUpdate) AddVersion

func (cu *ChangelogUpdate) AddVersion(i int) *ChangelogUpdate

AddVersion adds i to the "version" field.

func (*ChangelogUpdate) AppendDockerImage

func (cu *ChangelogUpdate) AppendDockerImage(s []string) *ChangelogUpdate

AppendDockerImage appends s to the "docker_image" field.

func (*ChangelogUpdate) AppendEnvValues

func (cu *ChangelogUpdate) AppendEnvValues(tv []*types.KeyValue) *ChangelogUpdate

AppendEnvValues appends tv to the "env_values" field.

func (*ChangelogUpdate) AppendExtraValues

func (cu *ChangelogUpdate) AppendExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdate

AppendExtraValues appends wv to the "extra_values" field.

func (*ChangelogUpdate) AppendFinalExtraValues

func (cu *ChangelogUpdate) AppendFinalExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdate

AppendFinalExtraValues appends wv to the "final_extra_values" field.

func (*ChangelogUpdate) ClearConfig

func (cu *ChangelogUpdate) ClearConfig() *ChangelogUpdate

ClearConfig clears the value of the "config" field.

func (*ChangelogUpdate) ClearDeletedAt

func (cu *ChangelogUpdate) ClearDeletedAt() *ChangelogUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChangelogUpdate) ClearDockerImage

func (cu *ChangelogUpdate) ClearDockerImage() *ChangelogUpdate

ClearDockerImage clears the value of the "docker_image" field.

func (*ChangelogUpdate) ClearEnvValues

func (cu *ChangelogUpdate) ClearEnvValues() *ChangelogUpdate

ClearEnvValues clears the value of the "env_values" field.

func (*ChangelogUpdate) ClearExtraValues

func (cu *ChangelogUpdate) ClearExtraValues() *ChangelogUpdate

ClearExtraValues clears the value of the "extra_values" field.

func (*ChangelogUpdate) ClearFinalExtraValues

func (cu *ChangelogUpdate) ClearFinalExtraValues() *ChangelogUpdate

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ChangelogUpdate) ClearGitBranch

func (cu *ChangelogUpdate) ClearGitBranch() *ChangelogUpdate

ClearGitBranch clears the value of the "git_branch" field.

func (*ChangelogUpdate) ClearGitCommit

func (cu *ChangelogUpdate) ClearGitCommit() *ChangelogUpdate

ClearGitCommit clears the value of the "git_commit" field.

func (*ChangelogUpdate) ClearGitCommitAuthor

func (cu *ChangelogUpdate) ClearGitCommitAuthor() *ChangelogUpdate

ClearGitCommitAuthor clears the value of the "git_commit_author" field.

func (*ChangelogUpdate) ClearGitCommitDate

func (cu *ChangelogUpdate) ClearGitCommitDate() *ChangelogUpdate

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ChangelogUpdate) ClearGitCommitTitle

func (cu *ChangelogUpdate) ClearGitCommitTitle() *ChangelogUpdate

ClearGitCommitTitle clears the value of the "git_commit_title" field.

func (*ChangelogUpdate) ClearGitCommitWebURL

func (cu *ChangelogUpdate) ClearGitCommitWebURL() *ChangelogUpdate

ClearGitCommitWebURL clears the value of the "git_commit_web_url" field.

func (*ChangelogUpdate) ClearProject

func (cu *ChangelogUpdate) ClearProject() *ChangelogUpdate

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

func (*ChangelogUpdate) ClearProjectID

func (cu *ChangelogUpdate) ClearProjectID() *ChangelogUpdate

ClearProjectID clears the value of the "project_id" field.

func (*ChangelogUpdate) Exec

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

Exec executes the query.

func (*ChangelogUpdate) ExecX

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

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

func (*ChangelogUpdate) Mutation

func (cu *ChangelogUpdate) Mutation() *ChangelogMutation

Mutation returns the ChangelogMutation object of the builder.

func (*ChangelogUpdate) Save

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

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

func (*ChangelogUpdate) SaveX

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

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

func (*ChangelogUpdate) SetConfig

func (cu *ChangelogUpdate) SetConfig(s string) *ChangelogUpdate

SetConfig sets the "config" field.

func (*ChangelogUpdate) SetConfigChanged

func (cu *ChangelogUpdate) SetConfigChanged(b bool) *ChangelogUpdate

SetConfigChanged sets the "config_changed" field.

func (*ChangelogUpdate) SetDeletedAt

func (cu *ChangelogUpdate) SetDeletedAt(t time.Time) *ChangelogUpdate

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogUpdate) SetDockerImage

func (cu *ChangelogUpdate) SetDockerImage(s []string) *ChangelogUpdate

SetDockerImage sets the "docker_image" field.

func (*ChangelogUpdate) SetEnvValues

func (cu *ChangelogUpdate) SetEnvValues(tv []*types.KeyValue) *ChangelogUpdate

SetEnvValues sets the "env_values" field.

func (*ChangelogUpdate) SetExtraValues

func (cu *ChangelogUpdate) SetExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdate

SetExtraValues sets the "extra_values" field.

func (*ChangelogUpdate) SetFinalExtraValues

func (cu *ChangelogUpdate) SetFinalExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdate

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogUpdate) SetGitBranch

func (cu *ChangelogUpdate) SetGitBranch(s string) *ChangelogUpdate

SetGitBranch sets the "git_branch" field.

func (*ChangelogUpdate) SetGitCommit

func (cu *ChangelogUpdate) SetGitCommit(s string) *ChangelogUpdate

SetGitCommit sets the "git_commit" field.

func (*ChangelogUpdate) SetGitCommitAuthor

func (cu *ChangelogUpdate) SetGitCommitAuthor(s string) *ChangelogUpdate

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogUpdate) SetGitCommitDate

func (cu *ChangelogUpdate) SetGitCommitDate(t time.Time) *ChangelogUpdate

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogUpdate) SetGitCommitTitle

func (cu *ChangelogUpdate) SetGitCommitTitle(s string) *ChangelogUpdate

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogUpdate) SetGitCommitWebURL

func (cu *ChangelogUpdate) SetGitCommitWebURL(s string) *ChangelogUpdate

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogUpdate) SetNillableConfig

func (cu *ChangelogUpdate) SetNillableConfig(s *string) *ChangelogUpdate

SetNillableConfig sets the "config" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableConfigChanged

func (cu *ChangelogUpdate) SetNillableConfigChanged(b *bool) *ChangelogUpdate

SetNillableConfigChanged sets the "config_changed" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableDeletedAt

func (cu *ChangelogUpdate) SetNillableDeletedAt(t *time.Time) *ChangelogUpdate

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

func (*ChangelogUpdate) SetNillableGitBranch

func (cu *ChangelogUpdate) SetNillableGitBranch(s *string) *ChangelogUpdate

SetNillableGitBranch sets the "git_branch" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableGitCommit

func (cu *ChangelogUpdate) SetNillableGitCommit(s *string) *ChangelogUpdate

SetNillableGitCommit sets the "git_commit" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableGitCommitAuthor

func (cu *ChangelogUpdate) SetNillableGitCommitAuthor(s *string) *ChangelogUpdate

SetNillableGitCommitAuthor sets the "git_commit_author" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableGitCommitDate

func (cu *ChangelogUpdate) SetNillableGitCommitDate(t *time.Time) *ChangelogUpdate

SetNillableGitCommitDate sets the "git_commit_date" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableGitCommitTitle

func (cu *ChangelogUpdate) SetNillableGitCommitTitle(s *string) *ChangelogUpdate

SetNillableGitCommitTitle sets the "git_commit_title" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableGitCommitWebURL

func (cu *ChangelogUpdate) SetNillableGitCommitWebURL(s *string) *ChangelogUpdate

SetNillableGitCommitWebURL sets the "git_commit_web_url" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableProjectID

func (cu *ChangelogUpdate) SetNillableProjectID(i *int) *ChangelogUpdate

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

func (*ChangelogUpdate) SetNillableUsername

func (cu *ChangelogUpdate) SetNillableUsername(s *string) *ChangelogUpdate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*ChangelogUpdate) SetNillableVersion

func (cu *ChangelogUpdate) SetNillableVersion(i *int) *ChangelogUpdate

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

func (*ChangelogUpdate) SetProject

func (cu *ChangelogUpdate) SetProject(p *Project) *ChangelogUpdate

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

func (*ChangelogUpdate) SetProjectID

func (cu *ChangelogUpdate) SetProjectID(i int) *ChangelogUpdate

SetProjectID sets the "project_id" field.

func (*ChangelogUpdate) SetUpdatedAt

func (cu *ChangelogUpdate) SetUpdatedAt(t time.Time) *ChangelogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogUpdate) SetUsername

func (cu *ChangelogUpdate) SetUsername(s string) *ChangelogUpdate

SetUsername sets the "username" field.

func (*ChangelogUpdate) SetVersion

func (cu *ChangelogUpdate) SetVersion(i int) *ChangelogUpdate

SetVersion sets the "version" field.

func (*ChangelogUpdate) Where

Where appends a list predicates to the ChangelogUpdate builder.

type ChangelogUpdateOne

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

ChangelogUpdateOne is the builder for updating a single Changelog entity.

func (*ChangelogUpdateOne) AddVersion

func (cuo *ChangelogUpdateOne) AddVersion(i int) *ChangelogUpdateOne

AddVersion adds i to the "version" field.

func (*ChangelogUpdateOne) AppendDockerImage

func (cuo *ChangelogUpdateOne) AppendDockerImage(s []string) *ChangelogUpdateOne

AppendDockerImage appends s to the "docker_image" field.

func (*ChangelogUpdateOne) AppendEnvValues

func (cuo *ChangelogUpdateOne) AppendEnvValues(tv []*types.KeyValue) *ChangelogUpdateOne

AppendEnvValues appends tv to the "env_values" field.

func (*ChangelogUpdateOne) AppendExtraValues

func (cuo *ChangelogUpdateOne) AppendExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdateOne

AppendExtraValues appends wv to the "extra_values" field.

func (*ChangelogUpdateOne) AppendFinalExtraValues

func (cuo *ChangelogUpdateOne) AppendFinalExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdateOne

AppendFinalExtraValues appends wv to the "final_extra_values" field.

func (*ChangelogUpdateOne) ClearConfig

func (cuo *ChangelogUpdateOne) ClearConfig() *ChangelogUpdateOne

ClearConfig clears the value of the "config" field.

func (*ChangelogUpdateOne) ClearDeletedAt

func (cuo *ChangelogUpdateOne) ClearDeletedAt() *ChangelogUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChangelogUpdateOne) ClearDockerImage

func (cuo *ChangelogUpdateOne) ClearDockerImage() *ChangelogUpdateOne

ClearDockerImage clears the value of the "docker_image" field.

func (*ChangelogUpdateOne) ClearEnvValues

func (cuo *ChangelogUpdateOne) ClearEnvValues() *ChangelogUpdateOne

ClearEnvValues clears the value of the "env_values" field.

func (*ChangelogUpdateOne) ClearExtraValues

func (cuo *ChangelogUpdateOne) ClearExtraValues() *ChangelogUpdateOne

ClearExtraValues clears the value of the "extra_values" field.

func (*ChangelogUpdateOne) ClearFinalExtraValues

func (cuo *ChangelogUpdateOne) ClearFinalExtraValues() *ChangelogUpdateOne

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ChangelogUpdateOne) ClearGitBranch

func (cuo *ChangelogUpdateOne) ClearGitBranch() *ChangelogUpdateOne

ClearGitBranch clears the value of the "git_branch" field.

func (*ChangelogUpdateOne) ClearGitCommit

func (cuo *ChangelogUpdateOne) ClearGitCommit() *ChangelogUpdateOne

ClearGitCommit clears the value of the "git_commit" field.

func (*ChangelogUpdateOne) ClearGitCommitAuthor

func (cuo *ChangelogUpdateOne) ClearGitCommitAuthor() *ChangelogUpdateOne

ClearGitCommitAuthor clears the value of the "git_commit_author" field.

func (*ChangelogUpdateOne) ClearGitCommitDate

func (cuo *ChangelogUpdateOne) ClearGitCommitDate() *ChangelogUpdateOne

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ChangelogUpdateOne) ClearGitCommitTitle

func (cuo *ChangelogUpdateOne) ClearGitCommitTitle() *ChangelogUpdateOne

ClearGitCommitTitle clears the value of the "git_commit_title" field.

func (*ChangelogUpdateOne) ClearGitCommitWebURL

func (cuo *ChangelogUpdateOne) ClearGitCommitWebURL() *ChangelogUpdateOne

ClearGitCommitWebURL clears the value of the "git_commit_web_url" field.

func (*ChangelogUpdateOne) ClearProject

func (cuo *ChangelogUpdateOne) ClearProject() *ChangelogUpdateOne

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

func (*ChangelogUpdateOne) ClearProjectID

func (cuo *ChangelogUpdateOne) ClearProjectID() *ChangelogUpdateOne

ClearProjectID clears the value of the "project_id" field.

func (*ChangelogUpdateOne) Exec

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

Exec executes the query on the entity.

func (*ChangelogUpdateOne) ExecX

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

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

func (*ChangelogUpdateOne) Mutation

func (cuo *ChangelogUpdateOne) Mutation() *ChangelogMutation

Mutation returns the ChangelogMutation object of the builder.

func (*ChangelogUpdateOne) Save

func (cuo *ChangelogUpdateOne) Save(ctx context.Context) (*Changelog, error)

Save executes the query and returns the updated Changelog entity.

func (*ChangelogUpdateOne) SaveX

func (cuo *ChangelogUpdateOne) SaveX(ctx context.Context) *Changelog

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

func (*ChangelogUpdateOne) Select

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

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

func (*ChangelogUpdateOne) SetConfig

func (cuo *ChangelogUpdateOne) SetConfig(s string) *ChangelogUpdateOne

SetConfig sets the "config" field.

func (*ChangelogUpdateOne) SetConfigChanged

func (cuo *ChangelogUpdateOne) SetConfigChanged(b bool) *ChangelogUpdateOne

SetConfigChanged sets the "config_changed" field.

func (*ChangelogUpdateOne) SetDeletedAt

func (cuo *ChangelogUpdateOne) SetDeletedAt(t time.Time) *ChangelogUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogUpdateOne) SetDockerImage

func (cuo *ChangelogUpdateOne) SetDockerImage(s []string) *ChangelogUpdateOne

SetDockerImage sets the "docker_image" field.

func (*ChangelogUpdateOne) SetEnvValues

func (cuo *ChangelogUpdateOne) SetEnvValues(tv []*types.KeyValue) *ChangelogUpdateOne

SetEnvValues sets the "env_values" field.

func (*ChangelogUpdateOne) SetExtraValues

func (cuo *ChangelogUpdateOne) SetExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdateOne

SetExtraValues sets the "extra_values" field.

func (*ChangelogUpdateOne) SetFinalExtraValues

func (cuo *ChangelogUpdateOne) SetFinalExtraValues(wv []*websocket.ExtraValue) *ChangelogUpdateOne

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogUpdateOne) SetGitBranch

func (cuo *ChangelogUpdateOne) SetGitBranch(s string) *ChangelogUpdateOne

SetGitBranch sets the "git_branch" field.

func (*ChangelogUpdateOne) SetGitCommit

func (cuo *ChangelogUpdateOne) SetGitCommit(s string) *ChangelogUpdateOne

SetGitCommit sets the "git_commit" field.

func (*ChangelogUpdateOne) SetGitCommitAuthor

func (cuo *ChangelogUpdateOne) SetGitCommitAuthor(s string) *ChangelogUpdateOne

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogUpdateOne) SetGitCommitDate

func (cuo *ChangelogUpdateOne) SetGitCommitDate(t time.Time) *ChangelogUpdateOne

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogUpdateOne) SetGitCommitTitle

func (cuo *ChangelogUpdateOne) SetGitCommitTitle(s string) *ChangelogUpdateOne

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogUpdateOne) SetGitCommitWebURL

func (cuo *ChangelogUpdateOne) SetGitCommitWebURL(s string) *ChangelogUpdateOne

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogUpdateOne) SetNillableConfig

func (cuo *ChangelogUpdateOne) SetNillableConfig(s *string) *ChangelogUpdateOne

SetNillableConfig sets the "config" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableConfigChanged

func (cuo *ChangelogUpdateOne) SetNillableConfigChanged(b *bool) *ChangelogUpdateOne

SetNillableConfigChanged sets the "config_changed" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableDeletedAt

func (cuo *ChangelogUpdateOne) SetNillableDeletedAt(t *time.Time) *ChangelogUpdateOne

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

func (*ChangelogUpdateOne) SetNillableGitBranch

func (cuo *ChangelogUpdateOne) SetNillableGitBranch(s *string) *ChangelogUpdateOne

SetNillableGitBranch sets the "git_branch" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableGitCommit

func (cuo *ChangelogUpdateOne) SetNillableGitCommit(s *string) *ChangelogUpdateOne

SetNillableGitCommit sets the "git_commit" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableGitCommitAuthor

func (cuo *ChangelogUpdateOne) SetNillableGitCommitAuthor(s *string) *ChangelogUpdateOne

SetNillableGitCommitAuthor sets the "git_commit_author" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableGitCommitDate

func (cuo *ChangelogUpdateOne) SetNillableGitCommitDate(t *time.Time) *ChangelogUpdateOne

SetNillableGitCommitDate sets the "git_commit_date" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableGitCommitTitle

func (cuo *ChangelogUpdateOne) SetNillableGitCommitTitle(s *string) *ChangelogUpdateOne

SetNillableGitCommitTitle sets the "git_commit_title" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableGitCommitWebURL

func (cuo *ChangelogUpdateOne) SetNillableGitCommitWebURL(s *string) *ChangelogUpdateOne

SetNillableGitCommitWebURL sets the "git_commit_web_url" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableProjectID

func (cuo *ChangelogUpdateOne) SetNillableProjectID(i *int) *ChangelogUpdateOne

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

func (*ChangelogUpdateOne) SetNillableUsername

func (cuo *ChangelogUpdateOne) SetNillableUsername(s *string) *ChangelogUpdateOne

SetNillableUsername sets the "username" field if the given value is not nil.

func (*ChangelogUpdateOne) SetNillableVersion

func (cuo *ChangelogUpdateOne) SetNillableVersion(i *int) *ChangelogUpdateOne

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

func (*ChangelogUpdateOne) SetProject

func (cuo *ChangelogUpdateOne) SetProject(p *Project) *ChangelogUpdateOne

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

func (*ChangelogUpdateOne) SetProjectID

func (cuo *ChangelogUpdateOne) SetProjectID(i int) *ChangelogUpdateOne

SetProjectID sets the "project_id" field.

func (*ChangelogUpdateOne) SetUpdatedAt

func (cuo *ChangelogUpdateOne) SetUpdatedAt(t time.Time) *ChangelogUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogUpdateOne) SetUsername

func (cuo *ChangelogUpdateOne) SetUsername(s string) *ChangelogUpdateOne

SetUsername sets the "username" field.

func (*ChangelogUpdateOne) SetVersion

func (cuo *ChangelogUpdateOne) SetVersion(i int) *ChangelogUpdateOne

SetVersion sets the "version" field.

func (*ChangelogUpdateOne) Where

Where appends a list predicates to the ChangelogUpdate builder.

type ChangelogUpsert

type ChangelogUpsert struct {
	*sql.UpdateSet
}

ChangelogUpsert is the "OnConflict" setter.

func (*ChangelogUpsert) AddVersion

func (u *ChangelogUpsert) AddVersion(v int) *ChangelogUpsert

AddVersion adds v to the "version" field.

func (*ChangelogUpsert) ClearConfig

func (u *ChangelogUpsert) ClearConfig() *ChangelogUpsert

ClearConfig clears the value of the "config" field.

func (*ChangelogUpsert) ClearDeletedAt

func (u *ChangelogUpsert) ClearDeletedAt() *ChangelogUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChangelogUpsert) ClearDockerImage

func (u *ChangelogUpsert) ClearDockerImage() *ChangelogUpsert

ClearDockerImage clears the value of the "docker_image" field.

func (*ChangelogUpsert) ClearEnvValues

func (u *ChangelogUpsert) ClearEnvValues() *ChangelogUpsert

ClearEnvValues clears the value of the "env_values" field.

func (*ChangelogUpsert) ClearExtraValues

func (u *ChangelogUpsert) ClearExtraValues() *ChangelogUpsert

ClearExtraValues clears the value of the "extra_values" field.

func (*ChangelogUpsert) ClearFinalExtraValues

func (u *ChangelogUpsert) ClearFinalExtraValues() *ChangelogUpsert

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ChangelogUpsert) ClearGitBranch

func (u *ChangelogUpsert) ClearGitBranch() *ChangelogUpsert

ClearGitBranch clears the value of the "git_branch" field.

func (*ChangelogUpsert) ClearGitCommit

func (u *ChangelogUpsert) ClearGitCommit() *ChangelogUpsert

ClearGitCommit clears the value of the "git_commit" field.

func (*ChangelogUpsert) ClearGitCommitAuthor

func (u *ChangelogUpsert) ClearGitCommitAuthor() *ChangelogUpsert

ClearGitCommitAuthor clears the value of the "git_commit_author" field.

func (*ChangelogUpsert) ClearGitCommitDate

func (u *ChangelogUpsert) ClearGitCommitDate() *ChangelogUpsert

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ChangelogUpsert) ClearGitCommitTitle

func (u *ChangelogUpsert) ClearGitCommitTitle() *ChangelogUpsert

ClearGitCommitTitle clears the value of the "git_commit_title" field.

func (*ChangelogUpsert) ClearGitCommitWebURL

func (u *ChangelogUpsert) ClearGitCommitWebURL() *ChangelogUpsert

ClearGitCommitWebURL clears the value of the "git_commit_web_url" field.

func (*ChangelogUpsert) ClearProjectID

func (u *ChangelogUpsert) ClearProjectID() *ChangelogUpsert

ClearProjectID clears the value of the "project_id" field.

func (*ChangelogUpsert) SetConfig

func (u *ChangelogUpsert) SetConfig(v string) *ChangelogUpsert

SetConfig sets the "config" field.

func (*ChangelogUpsert) SetConfigChanged

func (u *ChangelogUpsert) SetConfigChanged(v bool) *ChangelogUpsert

SetConfigChanged sets the "config_changed" field.

func (*ChangelogUpsert) SetDeletedAt

func (u *ChangelogUpsert) SetDeletedAt(v time.Time) *ChangelogUpsert

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogUpsert) SetDockerImage

func (u *ChangelogUpsert) SetDockerImage(v []string) *ChangelogUpsert

SetDockerImage sets the "docker_image" field.

func (*ChangelogUpsert) SetEnvValues

func (u *ChangelogUpsert) SetEnvValues(v []*types.KeyValue) *ChangelogUpsert

SetEnvValues sets the "env_values" field.

func (*ChangelogUpsert) SetExtraValues

func (u *ChangelogUpsert) SetExtraValues(v []*websocket.ExtraValue) *ChangelogUpsert

SetExtraValues sets the "extra_values" field.

func (*ChangelogUpsert) SetFinalExtraValues

func (u *ChangelogUpsert) SetFinalExtraValues(v []*websocket.ExtraValue) *ChangelogUpsert

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogUpsert) SetGitBranch

func (u *ChangelogUpsert) SetGitBranch(v string) *ChangelogUpsert

SetGitBranch sets the "git_branch" field.

func (*ChangelogUpsert) SetGitCommit

func (u *ChangelogUpsert) SetGitCommit(v string) *ChangelogUpsert

SetGitCommit sets the "git_commit" field.

func (*ChangelogUpsert) SetGitCommitAuthor

func (u *ChangelogUpsert) SetGitCommitAuthor(v string) *ChangelogUpsert

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogUpsert) SetGitCommitDate

func (u *ChangelogUpsert) SetGitCommitDate(v time.Time) *ChangelogUpsert

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogUpsert) SetGitCommitTitle

func (u *ChangelogUpsert) SetGitCommitTitle(v string) *ChangelogUpsert

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogUpsert) SetGitCommitWebURL

func (u *ChangelogUpsert) SetGitCommitWebURL(v string) *ChangelogUpsert

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogUpsert) SetProjectID

func (u *ChangelogUpsert) SetProjectID(v int) *ChangelogUpsert

SetProjectID sets the "project_id" field.

func (*ChangelogUpsert) SetUpdatedAt

func (u *ChangelogUpsert) SetUpdatedAt(v time.Time) *ChangelogUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogUpsert) SetUsername

func (u *ChangelogUpsert) SetUsername(v string) *ChangelogUpsert

SetUsername sets the "username" field.

func (*ChangelogUpsert) SetVersion

func (u *ChangelogUpsert) SetVersion(v int) *ChangelogUpsert

SetVersion sets the "version" field.

func (*ChangelogUpsert) UpdateConfig

func (u *ChangelogUpsert) UpdateConfig() *ChangelogUpsert

UpdateConfig sets the "config" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateConfigChanged

func (u *ChangelogUpsert) UpdateConfigChanged() *ChangelogUpsert

UpdateConfigChanged sets the "config_changed" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateDeletedAt

func (u *ChangelogUpsert) UpdateDeletedAt() *ChangelogUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateDockerImage

func (u *ChangelogUpsert) UpdateDockerImage() *ChangelogUpsert

UpdateDockerImage sets the "docker_image" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateEnvValues

func (u *ChangelogUpsert) UpdateEnvValues() *ChangelogUpsert

UpdateEnvValues sets the "env_values" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateExtraValues

func (u *ChangelogUpsert) UpdateExtraValues() *ChangelogUpsert

UpdateExtraValues sets the "extra_values" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateFinalExtraValues

func (u *ChangelogUpsert) UpdateFinalExtraValues() *ChangelogUpsert

UpdateFinalExtraValues sets the "final_extra_values" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateGitBranch

func (u *ChangelogUpsert) UpdateGitBranch() *ChangelogUpsert

UpdateGitBranch sets the "git_branch" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateGitCommit

func (u *ChangelogUpsert) UpdateGitCommit() *ChangelogUpsert

UpdateGitCommit sets the "git_commit" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateGitCommitAuthor

func (u *ChangelogUpsert) UpdateGitCommitAuthor() *ChangelogUpsert

UpdateGitCommitAuthor sets the "git_commit_author" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateGitCommitDate

func (u *ChangelogUpsert) UpdateGitCommitDate() *ChangelogUpsert

UpdateGitCommitDate sets the "git_commit_date" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateGitCommitTitle

func (u *ChangelogUpsert) UpdateGitCommitTitle() *ChangelogUpsert

UpdateGitCommitTitle sets the "git_commit_title" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateGitCommitWebURL

func (u *ChangelogUpsert) UpdateGitCommitWebURL() *ChangelogUpsert

UpdateGitCommitWebURL sets the "git_commit_web_url" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateProjectID

func (u *ChangelogUpsert) UpdateProjectID() *ChangelogUpsert

UpdateProjectID sets the "project_id" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateUpdatedAt

func (u *ChangelogUpsert) UpdateUpdatedAt() *ChangelogUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateUsername

func (u *ChangelogUpsert) UpdateUsername() *ChangelogUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

func (*ChangelogUpsert) UpdateVersion

func (u *ChangelogUpsert) UpdateVersion() *ChangelogUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type ChangelogUpsertBulk

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

ChangelogUpsertBulk is the builder for "upsert"-ing a bulk of Changelog nodes.

func (*ChangelogUpsertBulk) AddVersion

func (u *ChangelogUpsertBulk) AddVersion(v int) *ChangelogUpsertBulk

AddVersion adds v to the "version" field.

func (*ChangelogUpsertBulk) ClearConfig

func (u *ChangelogUpsertBulk) ClearConfig() *ChangelogUpsertBulk

ClearConfig clears the value of the "config" field.

func (*ChangelogUpsertBulk) ClearDeletedAt

func (u *ChangelogUpsertBulk) ClearDeletedAt() *ChangelogUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChangelogUpsertBulk) ClearDockerImage

func (u *ChangelogUpsertBulk) ClearDockerImage() *ChangelogUpsertBulk

ClearDockerImage clears the value of the "docker_image" field.

func (*ChangelogUpsertBulk) ClearEnvValues

func (u *ChangelogUpsertBulk) ClearEnvValues() *ChangelogUpsertBulk

ClearEnvValues clears the value of the "env_values" field.

func (*ChangelogUpsertBulk) ClearExtraValues

func (u *ChangelogUpsertBulk) ClearExtraValues() *ChangelogUpsertBulk

ClearExtraValues clears the value of the "extra_values" field.

func (*ChangelogUpsertBulk) ClearFinalExtraValues

func (u *ChangelogUpsertBulk) ClearFinalExtraValues() *ChangelogUpsertBulk

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ChangelogUpsertBulk) ClearGitBranch

func (u *ChangelogUpsertBulk) ClearGitBranch() *ChangelogUpsertBulk

ClearGitBranch clears the value of the "git_branch" field.

func (*ChangelogUpsertBulk) ClearGitCommit

func (u *ChangelogUpsertBulk) ClearGitCommit() *ChangelogUpsertBulk

ClearGitCommit clears the value of the "git_commit" field.

func (*ChangelogUpsertBulk) ClearGitCommitAuthor

func (u *ChangelogUpsertBulk) ClearGitCommitAuthor() *ChangelogUpsertBulk

ClearGitCommitAuthor clears the value of the "git_commit_author" field.

func (*ChangelogUpsertBulk) ClearGitCommitDate

func (u *ChangelogUpsertBulk) ClearGitCommitDate() *ChangelogUpsertBulk

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ChangelogUpsertBulk) ClearGitCommitTitle

func (u *ChangelogUpsertBulk) ClearGitCommitTitle() *ChangelogUpsertBulk

ClearGitCommitTitle clears the value of the "git_commit_title" field.

func (*ChangelogUpsertBulk) ClearGitCommitWebURL

func (u *ChangelogUpsertBulk) ClearGitCommitWebURL() *ChangelogUpsertBulk

ClearGitCommitWebURL clears the value of the "git_commit_web_url" field.

func (*ChangelogUpsertBulk) ClearProjectID

func (u *ChangelogUpsertBulk) ClearProjectID() *ChangelogUpsertBulk

ClearProjectID clears the value of the "project_id" field.

func (*ChangelogUpsertBulk) DoNothing

func (u *ChangelogUpsertBulk) DoNothing() *ChangelogUpsertBulk

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

func (*ChangelogUpsertBulk) Exec

Exec executes the query.

func (*ChangelogUpsertBulk) ExecX

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

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

func (*ChangelogUpsertBulk) Ignore

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

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

func (*ChangelogUpsertBulk) SetConfig

SetConfig sets the "config" field.

func (*ChangelogUpsertBulk) SetConfigChanged

func (u *ChangelogUpsertBulk) SetConfigChanged(v bool) *ChangelogUpsertBulk

SetConfigChanged sets the "config_changed" field.

func (*ChangelogUpsertBulk) SetDeletedAt

func (u *ChangelogUpsertBulk) SetDeletedAt(v time.Time) *ChangelogUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogUpsertBulk) SetDockerImage

func (u *ChangelogUpsertBulk) SetDockerImage(v []string) *ChangelogUpsertBulk

SetDockerImage sets the "docker_image" field.

func (*ChangelogUpsertBulk) SetEnvValues

func (u *ChangelogUpsertBulk) SetEnvValues(v []*types.KeyValue) *ChangelogUpsertBulk

SetEnvValues sets the "env_values" field.

func (*ChangelogUpsertBulk) SetExtraValues

SetExtraValues sets the "extra_values" field.

func (*ChangelogUpsertBulk) SetFinalExtraValues

func (u *ChangelogUpsertBulk) SetFinalExtraValues(v []*websocket.ExtraValue) *ChangelogUpsertBulk

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogUpsertBulk) SetGitBranch

func (u *ChangelogUpsertBulk) SetGitBranch(v string) *ChangelogUpsertBulk

SetGitBranch sets the "git_branch" field.

func (*ChangelogUpsertBulk) SetGitCommit

func (u *ChangelogUpsertBulk) SetGitCommit(v string) *ChangelogUpsertBulk

SetGitCommit sets the "git_commit" field.

func (*ChangelogUpsertBulk) SetGitCommitAuthor

func (u *ChangelogUpsertBulk) SetGitCommitAuthor(v string) *ChangelogUpsertBulk

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogUpsertBulk) SetGitCommitDate

func (u *ChangelogUpsertBulk) SetGitCommitDate(v time.Time) *ChangelogUpsertBulk

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogUpsertBulk) SetGitCommitTitle

func (u *ChangelogUpsertBulk) SetGitCommitTitle(v string) *ChangelogUpsertBulk

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogUpsertBulk) SetGitCommitWebURL

func (u *ChangelogUpsertBulk) SetGitCommitWebURL(v string) *ChangelogUpsertBulk

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogUpsertBulk) SetProjectID

func (u *ChangelogUpsertBulk) SetProjectID(v int) *ChangelogUpsertBulk

SetProjectID sets the "project_id" field.

func (*ChangelogUpsertBulk) SetUpdatedAt

func (u *ChangelogUpsertBulk) SetUpdatedAt(v time.Time) *ChangelogUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogUpsertBulk) SetUsername

func (u *ChangelogUpsertBulk) SetUsername(v string) *ChangelogUpsertBulk

SetUsername sets the "username" field.

func (*ChangelogUpsertBulk) SetVersion

func (u *ChangelogUpsertBulk) SetVersion(v int) *ChangelogUpsertBulk

SetVersion sets the "version" field.

func (*ChangelogUpsertBulk) Update

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

func (*ChangelogUpsertBulk) UpdateConfig

func (u *ChangelogUpsertBulk) UpdateConfig() *ChangelogUpsertBulk

UpdateConfig sets the "config" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateConfigChanged

func (u *ChangelogUpsertBulk) UpdateConfigChanged() *ChangelogUpsertBulk

UpdateConfigChanged sets the "config_changed" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateDeletedAt

func (u *ChangelogUpsertBulk) UpdateDeletedAt() *ChangelogUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateDockerImage

func (u *ChangelogUpsertBulk) UpdateDockerImage() *ChangelogUpsertBulk

UpdateDockerImage sets the "docker_image" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateEnvValues

func (u *ChangelogUpsertBulk) UpdateEnvValues() *ChangelogUpsertBulk

UpdateEnvValues sets the "env_values" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateExtraValues

func (u *ChangelogUpsertBulk) UpdateExtraValues() *ChangelogUpsertBulk

UpdateExtraValues sets the "extra_values" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateFinalExtraValues

func (u *ChangelogUpsertBulk) UpdateFinalExtraValues() *ChangelogUpsertBulk

UpdateFinalExtraValues sets the "final_extra_values" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateGitBranch

func (u *ChangelogUpsertBulk) UpdateGitBranch() *ChangelogUpsertBulk

UpdateGitBranch sets the "git_branch" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateGitCommit

func (u *ChangelogUpsertBulk) UpdateGitCommit() *ChangelogUpsertBulk

UpdateGitCommit sets the "git_commit" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateGitCommitAuthor

func (u *ChangelogUpsertBulk) UpdateGitCommitAuthor() *ChangelogUpsertBulk

UpdateGitCommitAuthor sets the "git_commit_author" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateGitCommitDate

func (u *ChangelogUpsertBulk) UpdateGitCommitDate() *ChangelogUpsertBulk

UpdateGitCommitDate sets the "git_commit_date" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateGitCommitTitle

func (u *ChangelogUpsertBulk) UpdateGitCommitTitle() *ChangelogUpsertBulk

UpdateGitCommitTitle sets the "git_commit_title" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateGitCommitWebURL

func (u *ChangelogUpsertBulk) UpdateGitCommitWebURL() *ChangelogUpsertBulk

UpdateGitCommitWebURL sets the "git_commit_web_url" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateNewValues

func (u *ChangelogUpsertBulk) UpdateNewValues() *ChangelogUpsertBulk

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

client.Changelog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*ChangelogUpsertBulk) UpdateProjectID

func (u *ChangelogUpsertBulk) UpdateProjectID() *ChangelogUpsertBulk

UpdateProjectID sets the "project_id" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateUpdatedAt

func (u *ChangelogUpsertBulk) UpdateUpdatedAt() *ChangelogUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateUsername

func (u *ChangelogUpsertBulk) UpdateUsername() *ChangelogUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

func (*ChangelogUpsertBulk) UpdateVersion

func (u *ChangelogUpsertBulk) UpdateVersion() *ChangelogUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

type ChangelogUpsertOne

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

ChangelogUpsertOne is the builder for "upsert"-ing

one Changelog node.

func (*ChangelogUpsertOne) AddVersion

func (u *ChangelogUpsertOne) AddVersion(v int) *ChangelogUpsertOne

AddVersion adds v to the "version" field.

func (*ChangelogUpsertOne) ClearConfig

func (u *ChangelogUpsertOne) ClearConfig() *ChangelogUpsertOne

ClearConfig clears the value of the "config" field.

func (*ChangelogUpsertOne) ClearDeletedAt

func (u *ChangelogUpsertOne) ClearDeletedAt() *ChangelogUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChangelogUpsertOne) ClearDockerImage

func (u *ChangelogUpsertOne) ClearDockerImage() *ChangelogUpsertOne

ClearDockerImage clears the value of the "docker_image" field.

func (*ChangelogUpsertOne) ClearEnvValues

func (u *ChangelogUpsertOne) ClearEnvValues() *ChangelogUpsertOne

ClearEnvValues clears the value of the "env_values" field.

func (*ChangelogUpsertOne) ClearExtraValues

func (u *ChangelogUpsertOne) ClearExtraValues() *ChangelogUpsertOne

ClearExtraValues clears the value of the "extra_values" field.

func (*ChangelogUpsertOne) ClearFinalExtraValues

func (u *ChangelogUpsertOne) ClearFinalExtraValues() *ChangelogUpsertOne

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ChangelogUpsertOne) ClearGitBranch

func (u *ChangelogUpsertOne) ClearGitBranch() *ChangelogUpsertOne

ClearGitBranch clears the value of the "git_branch" field.

func (*ChangelogUpsertOne) ClearGitCommit

func (u *ChangelogUpsertOne) ClearGitCommit() *ChangelogUpsertOne

ClearGitCommit clears the value of the "git_commit" field.

func (*ChangelogUpsertOne) ClearGitCommitAuthor

func (u *ChangelogUpsertOne) ClearGitCommitAuthor() *ChangelogUpsertOne

ClearGitCommitAuthor clears the value of the "git_commit_author" field.

func (*ChangelogUpsertOne) ClearGitCommitDate

func (u *ChangelogUpsertOne) ClearGitCommitDate() *ChangelogUpsertOne

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ChangelogUpsertOne) ClearGitCommitTitle

func (u *ChangelogUpsertOne) ClearGitCommitTitle() *ChangelogUpsertOne

ClearGitCommitTitle clears the value of the "git_commit_title" field.

func (*ChangelogUpsertOne) ClearGitCommitWebURL

func (u *ChangelogUpsertOne) ClearGitCommitWebURL() *ChangelogUpsertOne

ClearGitCommitWebURL clears the value of the "git_commit_web_url" field.

func (*ChangelogUpsertOne) ClearProjectID

func (u *ChangelogUpsertOne) ClearProjectID() *ChangelogUpsertOne

ClearProjectID clears the value of the "project_id" field.

func (*ChangelogUpsertOne) DoNothing

func (u *ChangelogUpsertOne) DoNothing() *ChangelogUpsertOne

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

func (*ChangelogUpsertOne) Exec

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

Exec executes the query.

func (*ChangelogUpsertOne) ExecX

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

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

func (*ChangelogUpsertOne) ID

func (u *ChangelogUpsertOne) ID(ctx context.Context) (id int, err error)

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

func (*ChangelogUpsertOne) IDX

func (u *ChangelogUpsertOne) IDX(ctx context.Context) int

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

func (*ChangelogUpsertOne) Ignore

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

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

func (*ChangelogUpsertOne) SetConfig

func (u *ChangelogUpsertOne) SetConfig(v string) *ChangelogUpsertOne

SetConfig sets the "config" field.

func (*ChangelogUpsertOne) SetConfigChanged

func (u *ChangelogUpsertOne) SetConfigChanged(v bool) *ChangelogUpsertOne

SetConfigChanged sets the "config_changed" field.

func (*ChangelogUpsertOne) SetDeletedAt

func (u *ChangelogUpsertOne) SetDeletedAt(v time.Time) *ChangelogUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*ChangelogUpsertOne) SetDockerImage

func (u *ChangelogUpsertOne) SetDockerImage(v []string) *ChangelogUpsertOne

SetDockerImage sets the "docker_image" field.

func (*ChangelogUpsertOne) SetEnvValues

func (u *ChangelogUpsertOne) SetEnvValues(v []*types.KeyValue) *ChangelogUpsertOne

SetEnvValues sets the "env_values" field.

func (*ChangelogUpsertOne) SetExtraValues

func (u *ChangelogUpsertOne) SetExtraValues(v []*websocket.ExtraValue) *ChangelogUpsertOne

SetExtraValues sets the "extra_values" field.

func (*ChangelogUpsertOne) SetFinalExtraValues

func (u *ChangelogUpsertOne) SetFinalExtraValues(v []*websocket.ExtraValue) *ChangelogUpsertOne

SetFinalExtraValues sets the "final_extra_values" field.

func (*ChangelogUpsertOne) SetGitBranch

func (u *ChangelogUpsertOne) SetGitBranch(v string) *ChangelogUpsertOne

SetGitBranch sets the "git_branch" field.

func (*ChangelogUpsertOne) SetGitCommit

func (u *ChangelogUpsertOne) SetGitCommit(v string) *ChangelogUpsertOne

SetGitCommit sets the "git_commit" field.

func (*ChangelogUpsertOne) SetGitCommitAuthor

func (u *ChangelogUpsertOne) SetGitCommitAuthor(v string) *ChangelogUpsertOne

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ChangelogUpsertOne) SetGitCommitDate

func (u *ChangelogUpsertOne) SetGitCommitDate(v time.Time) *ChangelogUpsertOne

SetGitCommitDate sets the "git_commit_date" field.

func (*ChangelogUpsertOne) SetGitCommitTitle

func (u *ChangelogUpsertOne) SetGitCommitTitle(v string) *ChangelogUpsertOne

SetGitCommitTitle sets the "git_commit_title" field.

func (*ChangelogUpsertOne) SetGitCommitWebURL

func (u *ChangelogUpsertOne) SetGitCommitWebURL(v string) *ChangelogUpsertOne

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ChangelogUpsertOne) SetProjectID

func (u *ChangelogUpsertOne) SetProjectID(v int) *ChangelogUpsertOne

SetProjectID sets the "project_id" field.

func (*ChangelogUpsertOne) SetUpdatedAt

func (u *ChangelogUpsertOne) SetUpdatedAt(v time.Time) *ChangelogUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ChangelogUpsertOne) SetUsername

func (u *ChangelogUpsertOne) SetUsername(v string) *ChangelogUpsertOne

SetUsername sets the "username" field.

func (*ChangelogUpsertOne) SetVersion

func (u *ChangelogUpsertOne) SetVersion(v int) *ChangelogUpsertOne

SetVersion sets the "version" field.

func (*ChangelogUpsertOne) Update

func (u *ChangelogUpsertOne) Update(set func(*ChangelogUpsert)) *ChangelogUpsertOne

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

func (*ChangelogUpsertOne) UpdateConfig

func (u *ChangelogUpsertOne) UpdateConfig() *ChangelogUpsertOne

UpdateConfig sets the "config" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateConfigChanged

func (u *ChangelogUpsertOne) UpdateConfigChanged() *ChangelogUpsertOne

UpdateConfigChanged sets the "config_changed" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateDeletedAt

func (u *ChangelogUpsertOne) UpdateDeletedAt() *ChangelogUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateDockerImage

func (u *ChangelogUpsertOne) UpdateDockerImage() *ChangelogUpsertOne

UpdateDockerImage sets the "docker_image" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateEnvValues

func (u *ChangelogUpsertOne) UpdateEnvValues() *ChangelogUpsertOne

UpdateEnvValues sets the "env_values" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateExtraValues

func (u *ChangelogUpsertOne) UpdateExtraValues() *ChangelogUpsertOne

UpdateExtraValues sets the "extra_values" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateFinalExtraValues

func (u *ChangelogUpsertOne) UpdateFinalExtraValues() *ChangelogUpsertOne

UpdateFinalExtraValues sets the "final_extra_values" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateGitBranch

func (u *ChangelogUpsertOne) UpdateGitBranch() *ChangelogUpsertOne

UpdateGitBranch sets the "git_branch" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateGitCommit

func (u *ChangelogUpsertOne) UpdateGitCommit() *ChangelogUpsertOne

UpdateGitCommit sets the "git_commit" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateGitCommitAuthor

func (u *ChangelogUpsertOne) UpdateGitCommitAuthor() *ChangelogUpsertOne

UpdateGitCommitAuthor sets the "git_commit_author" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateGitCommitDate

func (u *ChangelogUpsertOne) UpdateGitCommitDate() *ChangelogUpsertOne

UpdateGitCommitDate sets the "git_commit_date" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateGitCommitTitle

func (u *ChangelogUpsertOne) UpdateGitCommitTitle() *ChangelogUpsertOne

UpdateGitCommitTitle sets the "git_commit_title" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateGitCommitWebURL

func (u *ChangelogUpsertOne) UpdateGitCommitWebURL() *ChangelogUpsertOne

UpdateGitCommitWebURL sets the "git_commit_web_url" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateNewValues

func (u *ChangelogUpsertOne) UpdateNewValues() *ChangelogUpsertOne

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

client.Changelog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*ChangelogUpsertOne) UpdateProjectID

func (u *ChangelogUpsertOne) UpdateProjectID() *ChangelogUpsertOne

UpdateProjectID sets the "project_id" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateUpdatedAt

func (u *ChangelogUpsertOne) UpdateUpdatedAt() *ChangelogUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateUsername

func (u *ChangelogUpsertOne) UpdateUsername() *ChangelogUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

func (*ChangelogUpsertOne) UpdateVersion

func (u *ChangelogUpsertOne) UpdateVersion() *ChangelogUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

type Changelogs

type Changelogs []*Changelog

Changelogs is a parsable slice of Changelog.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AccessToken is the client for interacting with the AccessToken builders.
	AccessToken *AccessTokenClient
	// CacheLock is the client for interacting with the CacheLock builders.
	CacheLock *CacheLockClient
	// Changelog is the client for interacting with the Changelog builders.
	Changelog *ChangelogClient
	// DBCache is the client for interacting with the DBCache builders.
	DBCache *DBCacheClient
	// Event is the client for interacting with the Event builders.
	Event *EventClient
	// Favorite is the client for interacting with the Favorite builders.
	Favorite *FavoriteClient
	// File is the client for interacting with the File builders.
	File *FileClient
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// Namespace is the client for interacting with the Namespace builders.
	Namespace *NamespaceClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// Repo is the client for interacting with the Repo builders.
	Repo *RepoClient
	// 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().
	AccessToken.
	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 DBCache

type DBCache struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Value holds the value of the "value" field.
	Value string `json:"value,omitempty"`
	// ExpiredAt holds the value of the "expired_at" field.
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// contains filtered or unexported fields
}

DBCache is the model entity for the DBCache schema.

func (*DBCache) GetValue

func (dc *DBCache) GetValue(name string) (ent.Value, error)

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

func (*DBCache) String

func (dc *DBCache) String() string

String implements the fmt.Stringer.

func (*DBCache) Unwrap

func (dc *DBCache) Unwrap() *DBCache

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

func (dc *DBCache) Update() *DBCacheUpdateOne

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

type DBCacheClient

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

DBCacheClient is a client for the DBCache schema.

func NewDBCacheClient

func NewDBCacheClient(c config) *DBCacheClient

NewDBCacheClient returns a client for the DBCache from the given config.

func (*DBCacheClient) Create

func (c *DBCacheClient) Create() *DBCacheCreate

Create returns a builder for creating a DBCache entity.

func (*DBCacheClient) CreateBulk

func (c *DBCacheClient) CreateBulk(builders ...*DBCacheCreate) *DBCacheCreateBulk

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

func (*DBCacheClient) Delete

func (c *DBCacheClient) Delete() *DBCacheDelete

Delete returns a delete builder for DBCache.

func (*DBCacheClient) DeleteOne

func (c *DBCacheClient) DeleteOne(dc *DBCache) *DBCacheDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DBCacheClient) DeleteOneID

func (c *DBCacheClient) DeleteOneID(id int) *DBCacheDeleteOne

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

func (*DBCacheClient) Get

func (c *DBCacheClient) Get(ctx context.Context, id int) (*DBCache, error)

Get returns a DBCache entity by its id.

func (*DBCacheClient) GetX

func (c *DBCacheClient) GetX(ctx context.Context, id int) *DBCache

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

func (*DBCacheClient) Hooks

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

Hooks returns the client hooks.

func (*DBCacheClient) Intercept

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

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

func (*DBCacheClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DBCacheClient) MapCreateBulk

func (c *DBCacheClient) MapCreateBulk(slice any, setFunc func(*DBCacheCreate, int)) *DBCacheCreateBulk

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

func (c *DBCacheClient) Query() *DBCacheQuery

Query returns a query builder for DBCache.

func (*DBCacheClient) Update

func (c *DBCacheClient) Update() *DBCacheUpdate

Update returns an update builder for DBCache.

func (*DBCacheClient) UpdateOne

func (c *DBCacheClient) UpdateOne(dc *DBCache) *DBCacheUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DBCacheClient) UpdateOneID

func (c *DBCacheClient) UpdateOneID(id int) *DBCacheUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DBCacheClient) Use

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

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

type DBCacheCreate

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

DBCacheCreate is the builder for creating a DBCache entity.

func (*DBCacheCreate) Exec

func (dcc *DBCacheCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DBCacheCreate) ExecX

func (dcc *DBCacheCreate) ExecX(ctx context.Context)

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

func (*DBCacheCreate) Mutation

func (dcc *DBCacheCreate) Mutation() *DBCacheMutation

Mutation returns the DBCacheMutation object of the builder.

func (*DBCacheCreate) OnConflict

func (dcc *DBCacheCreate) OnConflict(opts ...sql.ConflictOption) *DBCacheUpsertOne

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

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

func (*DBCacheCreate) OnConflictColumns

func (dcc *DBCacheCreate) OnConflictColumns(columns ...string) *DBCacheUpsertOne

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

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

func (*DBCacheCreate) Save

func (dcc *DBCacheCreate) Save(ctx context.Context) (*DBCache, error)

Save creates the DBCache in the database.

func (*DBCacheCreate) SaveX

func (dcc *DBCacheCreate) SaveX(ctx context.Context) *DBCache

SaveX calls Save and panics if Save returns an error.

func (*DBCacheCreate) SetExpiredAt

func (dcc *DBCacheCreate) SetExpiredAt(t time.Time) *DBCacheCreate

SetExpiredAt sets the "expired_at" field.

func (*DBCacheCreate) SetKey

func (dcc *DBCacheCreate) SetKey(s string) *DBCacheCreate

SetKey sets the "key" field.

func (*DBCacheCreate) SetNillableExpiredAt

func (dcc *DBCacheCreate) SetNillableExpiredAt(t *time.Time) *DBCacheCreate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*DBCacheCreate) SetNillableValue

func (dcc *DBCacheCreate) SetNillableValue(s *string) *DBCacheCreate

SetNillableValue sets the "value" field if the given value is not nil.

func (*DBCacheCreate) SetValue

func (dcc *DBCacheCreate) SetValue(s string) *DBCacheCreate

SetValue sets the "value" field.

type DBCacheCreateBulk

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

DBCacheCreateBulk is the builder for creating many DBCache entities in bulk.

func (*DBCacheCreateBulk) Exec

func (dccb *DBCacheCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DBCacheCreateBulk) ExecX

func (dccb *DBCacheCreateBulk) ExecX(ctx context.Context)

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

func (*DBCacheCreateBulk) OnConflict

func (dccb *DBCacheCreateBulk) OnConflict(opts ...sql.ConflictOption) *DBCacheUpsertBulk

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

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

func (*DBCacheCreateBulk) OnConflictColumns

func (dccb *DBCacheCreateBulk) OnConflictColumns(columns ...string) *DBCacheUpsertBulk

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

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

func (*DBCacheCreateBulk) Save

func (dccb *DBCacheCreateBulk) Save(ctx context.Context) ([]*DBCache, error)

Save creates the DBCache entities in the database.

func (*DBCacheCreateBulk) SaveX

func (dccb *DBCacheCreateBulk) SaveX(ctx context.Context) []*DBCache

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

type DBCacheDelete

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

DBCacheDelete is the builder for deleting a DBCache entity.

func (*DBCacheDelete) Exec

func (dcd *DBCacheDelete) Exec(ctx context.Context) (int, error)

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

func (*DBCacheDelete) ExecX

func (dcd *DBCacheDelete) ExecX(ctx context.Context) int

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

func (*DBCacheDelete) Where

func (dcd *DBCacheDelete) Where(ps ...predicate.DBCache) *DBCacheDelete

Where appends a list predicates to the DBCacheDelete builder.

type DBCacheDeleteOne

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

DBCacheDeleteOne is the builder for deleting a single DBCache entity.

func (*DBCacheDeleteOne) Exec

func (dcdo *DBCacheDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DBCacheDeleteOne) ExecX

func (dcdo *DBCacheDeleteOne) ExecX(ctx context.Context)

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

func (*DBCacheDeleteOne) Where

func (dcdo *DBCacheDeleteOne) Where(ps ...predicate.DBCache) *DBCacheDeleteOne

Where appends a list predicates to the DBCacheDelete builder.

type DBCacheGroupBy

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

DBCacheGroupBy is the group-by builder for DBCache entities.

func (*DBCacheGroupBy) Aggregate

func (dcgb *DBCacheGroupBy) Aggregate(fns ...AggregateFunc) *DBCacheGroupBy

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

func (*DBCacheGroupBy) Bool

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

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

func (*DBCacheGroupBy) BoolX

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

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

func (*DBCacheGroupBy) Bools

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

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

func (*DBCacheGroupBy) BoolsX

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

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

func (*DBCacheGroupBy) Float64

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

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

func (*DBCacheGroupBy) Float64X

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

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

func (*DBCacheGroupBy) Float64s

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

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

func (*DBCacheGroupBy) Float64sX

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

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

func (*DBCacheGroupBy) Int

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

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

func (*DBCacheGroupBy) IntX

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

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

func (*DBCacheGroupBy) Ints

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

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

func (*DBCacheGroupBy) IntsX

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

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

func (*DBCacheGroupBy) Scan

func (dcgb *DBCacheGroupBy) Scan(ctx context.Context, v any) error

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

func (*DBCacheGroupBy) ScanX

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

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

func (*DBCacheGroupBy) String

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

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

func (*DBCacheGroupBy) StringX

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

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

func (*DBCacheGroupBy) Strings

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

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

func (*DBCacheGroupBy) StringsX

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

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

type DBCacheMutation

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

DBCacheMutation represents an operation that mutates the DBCache nodes in the graph.

func (*DBCacheMutation) AddField

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

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

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

func (*DBCacheMutation) AddedField

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

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

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

func (*DBCacheMutation) AddedIDs

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

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

func (*DBCacheMutation) ClearEdge

func (m *DBCacheMutation) 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 (*DBCacheMutation) ClearExpiredAt

func (m *DBCacheMutation) ClearExpiredAt()

ClearExpiredAt clears the value of the "expired_at" field.

func (*DBCacheMutation) ClearField

func (m *DBCacheMutation) 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 (*DBCacheMutation) ClearValue

func (m *DBCacheMutation) ClearValue()

ClearValue clears the value of the "value" field.

func (*DBCacheMutation) ClearedEdges

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

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

func (*DBCacheMutation) ClearedFields

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

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

func (DBCacheMutation) Client

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

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

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

func (*DBCacheMutation) ExpiredAt

func (m *DBCacheMutation) ExpiredAt() (r time.Time, exists bool)

ExpiredAt returns the value of the "expired_at" field in the mutation.

func (*DBCacheMutation) ExpiredAtCleared

func (m *DBCacheMutation) ExpiredAtCleared() bool

ExpiredAtCleared returns if the "expired_at" field was cleared in this mutation.

func (*DBCacheMutation) Field

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

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

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

func (*DBCacheMutation) Fields

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

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

func (m *DBCacheMutation) 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 (*DBCacheMutation) Key

func (m *DBCacheMutation) Key() (r string, exists bool)

Key returns the value of the "key" field in the mutation.

func (*DBCacheMutation) OldExpiredAt

func (m *DBCacheMutation) OldExpiredAt(ctx context.Context) (v time.Time, err error)

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

func (*DBCacheMutation) OldField

func (m *DBCacheMutation) 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 (*DBCacheMutation) OldKey

func (m *DBCacheMutation) OldKey(ctx context.Context) (v string, err error)

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

func (*DBCacheMutation) OldValue

func (m *DBCacheMutation) OldValue(ctx context.Context) (v string, err error)

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

func (*DBCacheMutation) Op

func (m *DBCacheMutation) Op() Op

Op returns the operation name.

func (*DBCacheMutation) RemovedEdges

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

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

func (*DBCacheMutation) RemovedIDs

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

func (m *DBCacheMutation) 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 (*DBCacheMutation) ResetExpiredAt

func (m *DBCacheMutation) ResetExpiredAt()

ResetExpiredAt resets all changes to the "expired_at" field.

func (*DBCacheMutation) ResetField

func (m *DBCacheMutation) 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 (*DBCacheMutation) ResetKey

func (m *DBCacheMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*DBCacheMutation) ResetValue

func (m *DBCacheMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*DBCacheMutation) SetExpiredAt

func (m *DBCacheMutation) SetExpiredAt(t time.Time)

SetExpiredAt sets the "expired_at" field.

func (*DBCacheMutation) SetField

func (m *DBCacheMutation) 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 (*DBCacheMutation) SetKey

func (m *DBCacheMutation) SetKey(s string)

SetKey sets the "key" field.

func (*DBCacheMutation) SetOp

func (m *DBCacheMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DBCacheMutation) SetValue

func (m *DBCacheMutation) SetValue(s string)

SetValue sets the "value" field.

func (DBCacheMutation) Tx

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

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

func (*DBCacheMutation) Type

func (m *DBCacheMutation) Type() string

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

func (*DBCacheMutation) Value

func (m *DBCacheMutation) Value() (r string, exists bool)

Value returns the value of the "value" field in the mutation.

func (*DBCacheMutation) ValueCleared

func (m *DBCacheMutation) ValueCleared() bool

ValueCleared returns if the "value" field was cleared in this mutation.

func (*DBCacheMutation) Where

func (m *DBCacheMutation) Where(ps ...predicate.DBCache)

Where appends a list predicates to the DBCacheMutation builder.

func (*DBCacheMutation) WhereP

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

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

type DBCacheQuery

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

DBCacheQuery is the builder for querying DBCache entities.

func (*DBCacheQuery) Aggregate

func (dcq *DBCacheQuery) Aggregate(fns ...AggregateFunc) *DBCacheSelect

Aggregate returns a DBCacheSelect configured with the given aggregations.

func (*DBCacheQuery) All

func (dcq *DBCacheQuery) All(ctx context.Context) ([]*DBCache, error)

All executes the query and returns a list of DBCaches.

func (*DBCacheQuery) AllX

func (dcq *DBCacheQuery) AllX(ctx context.Context) []*DBCache

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

func (*DBCacheQuery) Clone

func (dcq *DBCacheQuery) Clone() *DBCacheQuery

Clone returns a duplicate of the DBCacheQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DBCacheQuery) Count

func (dcq *DBCacheQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DBCacheQuery) CountX

func (dcq *DBCacheQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DBCacheQuery) Exist

func (dcq *DBCacheQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DBCacheQuery) ExistX

func (dcq *DBCacheQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DBCacheQuery) First

func (dcq *DBCacheQuery) First(ctx context.Context) (*DBCache, error)

First returns the first DBCache entity from the query. Returns a *NotFoundError when no DBCache was found.

func (*DBCacheQuery) FirstID

func (dcq *DBCacheQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DBCache ID from the query. Returns a *NotFoundError when no DBCache ID was found.

func (*DBCacheQuery) FirstIDX

func (dcq *DBCacheQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DBCacheQuery) FirstX

func (dcq *DBCacheQuery) FirstX(ctx context.Context) *DBCache

FirstX is like First, but panics if an error occurs.

func (*DBCacheQuery) ForShare

func (dcq *DBCacheQuery) ForShare(opts ...sql.LockOption) *DBCacheQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*DBCacheQuery) ForUpdate

func (dcq *DBCacheQuery) ForUpdate(opts ...sql.LockOption) *DBCacheQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*DBCacheQuery) GroupBy

func (dcq *DBCacheQuery) GroupBy(field string, fields ...string) *DBCacheGroupBy

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 {
	Key string `json:"key,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DBCache.Query().
	GroupBy(dbcache.FieldKey).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DBCacheQuery) IDs

func (dcq *DBCacheQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of DBCache IDs.

func (*DBCacheQuery) IDsX

func (dcq *DBCacheQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DBCacheQuery) Limit

func (dcq *DBCacheQuery) Limit(limit int) *DBCacheQuery

Limit the number of records to be returned by this query.

func (*DBCacheQuery) Offset

func (dcq *DBCacheQuery) Offset(offset int) *DBCacheQuery

Offset to start from.

func (*DBCacheQuery) Only

func (dcq *DBCacheQuery) Only(ctx context.Context) (*DBCache, error)

Only returns a single DBCache entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DBCache entity is found. Returns a *NotFoundError when no DBCache entities are found.

func (*DBCacheQuery) OnlyID

func (dcq *DBCacheQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DBCache ID in the query. Returns a *NotSingularError when more than one DBCache ID is found. Returns a *NotFoundError when no entities are found.

func (*DBCacheQuery) OnlyIDX

func (dcq *DBCacheQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DBCacheQuery) OnlyX

func (dcq *DBCacheQuery) OnlyX(ctx context.Context) *DBCache

OnlyX is like Only, but panics if an error occurs.

func (*DBCacheQuery) Order

func (dcq *DBCacheQuery) Order(o ...dbcache.OrderOption) *DBCacheQuery

Order specifies how the records should be ordered.

func (*DBCacheQuery) Select

func (dcq *DBCacheQuery) Select(fields ...string) *DBCacheSelect

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 {
	Key string `json:"key,omitempty"`
}

client.DBCache.Query().
	Select(dbcache.FieldKey).
	Scan(ctx, &v)

func (*DBCacheQuery) Unique

func (dcq *DBCacheQuery) Unique(unique bool) *DBCacheQuery

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 (*DBCacheQuery) Where

func (dcq *DBCacheQuery) Where(ps ...predicate.DBCache) *DBCacheQuery

Where adds a new predicate for the DBCacheQuery builder.

type DBCacheSelect

type DBCacheSelect struct {
	*DBCacheQuery
	// contains filtered or unexported fields
}

DBCacheSelect is the builder for selecting fields of DBCache entities.

func (*DBCacheSelect) Aggregate

func (dcs *DBCacheSelect) Aggregate(fns ...AggregateFunc) *DBCacheSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DBCacheSelect) Bool

func (s *DBCacheSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) BoolX

func (s *DBCacheSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DBCacheSelect) Bools

func (s *DBCacheSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) BoolsX

func (s *DBCacheSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DBCacheSelect) Float64

func (s *DBCacheSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) Float64X

func (s *DBCacheSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DBCacheSelect) Float64s

func (s *DBCacheSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) Float64sX

func (s *DBCacheSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DBCacheSelect) Int

func (s *DBCacheSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) IntX

func (s *DBCacheSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DBCacheSelect) Ints

func (s *DBCacheSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) IntsX

func (s *DBCacheSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DBCacheSelect) Scan

func (dcs *DBCacheSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DBCacheSelect) ScanX

func (s *DBCacheSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DBCacheSelect) String

func (s *DBCacheSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) StringX

func (s *DBCacheSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DBCacheSelect) Strings

func (s *DBCacheSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DBCacheSelect) StringsX

func (s *DBCacheSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DBCacheUpdate

type DBCacheUpdate struct {
	// contains filtered or unexported fields
}

DBCacheUpdate is the builder for updating DBCache entities.

func (*DBCacheUpdate) ClearExpiredAt

func (dcu *DBCacheUpdate) ClearExpiredAt() *DBCacheUpdate

ClearExpiredAt clears the value of the "expired_at" field.

func (*DBCacheUpdate) ClearValue

func (dcu *DBCacheUpdate) ClearValue() *DBCacheUpdate

ClearValue clears the value of the "value" field.

func (*DBCacheUpdate) Exec

func (dcu *DBCacheUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DBCacheUpdate) ExecX

func (dcu *DBCacheUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DBCacheUpdate) Mutation

func (dcu *DBCacheUpdate) Mutation() *DBCacheMutation

Mutation returns the DBCacheMutation object of the builder.

func (*DBCacheUpdate) Save

func (dcu *DBCacheUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DBCacheUpdate) SaveX

func (dcu *DBCacheUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DBCacheUpdate) SetExpiredAt

func (dcu *DBCacheUpdate) SetExpiredAt(t time.Time) *DBCacheUpdate

SetExpiredAt sets the "expired_at" field.

func (*DBCacheUpdate) SetKey

func (dcu *DBCacheUpdate) SetKey(s string) *DBCacheUpdate

SetKey sets the "key" field.

func (*DBCacheUpdate) SetNillableExpiredAt

func (dcu *DBCacheUpdate) SetNillableExpiredAt(t *time.Time) *DBCacheUpdate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*DBCacheUpdate) SetNillableKey

func (dcu *DBCacheUpdate) SetNillableKey(s *string) *DBCacheUpdate

SetNillableKey sets the "key" field if the given value is not nil.

func (*DBCacheUpdate) SetNillableValue

func (dcu *DBCacheUpdate) SetNillableValue(s *string) *DBCacheUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*DBCacheUpdate) SetValue

func (dcu *DBCacheUpdate) SetValue(s string) *DBCacheUpdate

SetValue sets the "value" field.

func (*DBCacheUpdate) Where

func (dcu *DBCacheUpdate) Where(ps ...predicate.DBCache) *DBCacheUpdate

Where appends a list predicates to the DBCacheUpdate builder.

type DBCacheUpdateOne

type DBCacheUpdateOne struct {
	// contains filtered or unexported fields
}

DBCacheUpdateOne is the builder for updating a single DBCache entity.

func (*DBCacheUpdateOne) ClearExpiredAt

func (dcuo *DBCacheUpdateOne) ClearExpiredAt() *DBCacheUpdateOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*DBCacheUpdateOne) ClearValue

func (dcuo *DBCacheUpdateOne) ClearValue() *DBCacheUpdateOne

ClearValue clears the value of the "value" field.

func (*DBCacheUpdateOne) Exec

func (dcuo *DBCacheUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DBCacheUpdateOne) ExecX

func (dcuo *DBCacheUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DBCacheUpdateOne) Mutation

func (dcuo *DBCacheUpdateOne) Mutation() *DBCacheMutation

Mutation returns the DBCacheMutation object of the builder.

func (*DBCacheUpdateOne) Save

func (dcuo *DBCacheUpdateOne) Save(ctx context.Context) (*DBCache, error)

Save executes the query and returns the updated DBCache entity.

func (*DBCacheUpdateOne) SaveX

func (dcuo *DBCacheUpdateOne) SaveX(ctx context.Context) *DBCache

SaveX is like Save, but panics if an error occurs.

func (*DBCacheUpdateOne) Select

func (dcuo *DBCacheUpdateOne) Select(field string, fields ...string) *DBCacheUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DBCacheUpdateOne) SetExpiredAt

func (dcuo *DBCacheUpdateOne) SetExpiredAt(t time.Time) *DBCacheUpdateOne

SetExpiredAt sets the "expired_at" field.

func (*DBCacheUpdateOne) SetKey

func (dcuo *DBCacheUpdateOne) SetKey(s string) *DBCacheUpdateOne

SetKey sets the "key" field.

func (*DBCacheUpdateOne) SetNillableExpiredAt

func (dcuo *DBCacheUpdateOne) SetNillableExpiredAt(t *time.Time) *DBCacheUpdateOne

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*DBCacheUpdateOne) SetNillableKey

func (dcuo *DBCacheUpdateOne) SetNillableKey(s *string) *DBCacheUpdateOne

SetNillableKey sets the "key" field if the given value is not nil.

func (*DBCacheUpdateOne) SetNillableValue

func (dcuo *DBCacheUpdateOne) SetNillableValue(s *string) *DBCacheUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*DBCacheUpdateOne) SetValue

func (dcuo *DBCacheUpdateOne) SetValue(s string) *DBCacheUpdateOne

SetValue sets the "value" field.

func (*DBCacheUpdateOne) Where

func (dcuo *DBCacheUpdateOne) Where(ps ...predicate.DBCache) *DBCacheUpdateOne

Where appends a list predicates to the DBCacheUpdate builder.

type DBCacheUpsert

type DBCacheUpsert struct {
	*sql.UpdateSet
}

DBCacheUpsert is the "OnConflict" setter.

func (*DBCacheUpsert) ClearExpiredAt

func (u *DBCacheUpsert) ClearExpiredAt() *DBCacheUpsert

ClearExpiredAt clears the value of the "expired_at" field.

func (*DBCacheUpsert) ClearValue

func (u *DBCacheUpsert) ClearValue() *DBCacheUpsert

ClearValue clears the value of the "value" field.

func (*DBCacheUpsert) SetExpiredAt

func (u *DBCacheUpsert) SetExpiredAt(v time.Time) *DBCacheUpsert

SetExpiredAt sets the "expired_at" field.

func (*DBCacheUpsert) SetKey

func (u *DBCacheUpsert) SetKey(v string) *DBCacheUpsert

SetKey sets the "key" field.

func (*DBCacheUpsert) SetValue

func (u *DBCacheUpsert) SetValue(v string) *DBCacheUpsert

SetValue sets the "value" field.

func (*DBCacheUpsert) UpdateExpiredAt

func (u *DBCacheUpsert) UpdateExpiredAt() *DBCacheUpsert

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*DBCacheUpsert) UpdateKey

func (u *DBCacheUpsert) UpdateKey() *DBCacheUpsert

UpdateKey sets the "key" field to the value that was provided on create.

func (*DBCacheUpsert) UpdateValue

func (u *DBCacheUpsert) UpdateValue() *DBCacheUpsert

UpdateValue sets the "value" field to the value that was provided on create.

type DBCacheUpsertBulk

type DBCacheUpsertBulk struct {
	// contains filtered or unexported fields
}

DBCacheUpsertBulk is the builder for "upsert"-ing a bulk of DBCache nodes.

func (*DBCacheUpsertBulk) ClearExpiredAt

func (u *DBCacheUpsertBulk) ClearExpiredAt() *DBCacheUpsertBulk

ClearExpiredAt clears the value of the "expired_at" field.

func (*DBCacheUpsertBulk) ClearValue

func (u *DBCacheUpsertBulk) ClearValue() *DBCacheUpsertBulk

ClearValue clears the value of the "value" field.

func (*DBCacheUpsertBulk) DoNothing

func (u *DBCacheUpsertBulk) DoNothing() *DBCacheUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DBCacheUpsertBulk) Exec

func (u *DBCacheUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DBCacheUpsertBulk) ExecX

func (u *DBCacheUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DBCacheUpsertBulk) Ignore

func (u *DBCacheUpsertBulk) Ignore() *DBCacheUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DBCache.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DBCacheUpsertBulk) SetExpiredAt

func (u *DBCacheUpsertBulk) SetExpiredAt(v time.Time) *DBCacheUpsertBulk

SetExpiredAt sets the "expired_at" field.

func (*DBCacheUpsertBulk) SetKey

SetKey sets the "key" field.

func (*DBCacheUpsertBulk) SetValue

func (u *DBCacheUpsertBulk) SetValue(v string) *DBCacheUpsertBulk

SetValue sets the "value" field.

func (*DBCacheUpsertBulk) Update

func (u *DBCacheUpsertBulk) Update(set func(*DBCacheUpsert)) *DBCacheUpsertBulk

Update allows overriding fields `UPDATE` values. See the DBCacheCreateBulk.OnConflict documentation for more info.

func (*DBCacheUpsertBulk) UpdateExpiredAt

func (u *DBCacheUpsertBulk) UpdateExpiredAt() *DBCacheUpsertBulk

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*DBCacheUpsertBulk) UpdateKey

func (u *DBCacheUpsertBulk) UpdateKey() *DBCacheUpsertBulk

UpdateKey sets the "key" field to the value that was provided on create.

func (*DBCacheUpsertBulk) UpdateNewValues

func (u *DBCacheUpsertBulk) UpdateNewValues() *DBCacheUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DBCache.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*DBCacheUpsertBulk) UpdateValue

func (u *DBCacheUpsertBulk) UpdateValue() *DBCacheUpsertBulk

UpdateValue sets the "value" field to the value that was provided on create.

type DBCacheUpsertOne

type DBCacheUpsertOne struct {
	// contains filtered or unexported fields
}

DBCacheUpsertOne is the builder for "upsert"-ing

one DBCache node.

func (*DBCacheUpsertOne) ClearExpiredAt

func (u *DBCacheUpsertOne) ClearExpiredAt() *DBCacheUpsertOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*DBCacheUpsertOne) ClearValue

func (u *DBCacheUpsertOne) ClearValue() *DBCacheUpsertOne

ClearValue clears the value of the "value" field.

func (*DBCacheUpsertOne) DoNothing

func (u *DBCacheUpsertOne) DoNothing() *DBCacheUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DBCacheUpsertOne) Exec

func (u *DBCacheUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*DBCacheUpsertOne) ExecX

func (u *DBCacheUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DBCacheUpsertOne) ID

func (u *DBCacheUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DBCacheUpsertOne) IDX

func (u *DBCacheUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*DBCacheUpsertOne) Ignore

func (u *DBCacheUpsertOne) Ignore() *DBCacheUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DBCache.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DBCacheUpsertOne) SetExpiredAt

func (u *DBCacheUpsertOne) SetExpiredAt(v time.Time) *DBCacheUpsertOne

SetExpiredAt sets the "expired_at" field.

func (*DBCacheUpsertOne) SetKey

SetKey sets the "key" field.

func (*DBCacheUpsertOne) SetValue

func (u *DBCacheUpsertOne) SetValue(v string) *DBCacheUpsertOne

SetValue sets the "value" field.

func (*DBCacheUpsertOne) Update

func (u *DBCacheUpsertOne) Update(set func(*DBCacheUpsert)) *DBCacheUpsertOne

Update allows overriding fields `UPDATE` values. See the DBCacheCreate.OnConflict documentation for more info.

func (*DBCacheUpsertOne) UpdateExpiredAt

func (u *DBCacheUpsertOne) UpdateExpiredAt() *DBCacheUpsertOne

UpdateExpiredAt sets the "expired_at" field to the value that was provided on create.

func (*DBCacheUpsertOne) UpdateKey

func (u *DBCacheUpsertOne) UpdateKey() *DBCacheUpsertOne

UpdateKey sets the "key" field to the value that was provided on create.

func (*DBCacheUpsertOne) UpdateNewValues

func (u *DBCacheUpsertOne) UpdateNewValues() *DBCacheUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DBCache.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*DBCacheUpsertOne) UpdateValue

func (u *DBCacheUpsertOne) UpdateValue() *DBCacheUpsertOne

UpdateValue sets the "value" field to the value that was provided on create.

type DBCaches

type DBCaches []*DBCache

DBCaches is a parsable slice of DBCache.

type Event

type Event struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Action holds the value of the "action" field.
	Action types.EventActionType `json:"action,omitempty"`
	// 用户名称
	Username string `json:"username,omitempty"`
	// Message holds the value of the "message" field.
	Message string `json:"message,omitempty"`
	// Old holds the value of the "old" field.
	Old string `json:"old,omitempty"`
	// New holds the value of the "new" field.
	New string `json:"new,omitempty"`
	// HasDiff holds the value of the "has_diff" field.
	HasDiff bool `json:"has_diff,omitempty"`
	// Duration holds the value of the "duration" field.
	Duration string `json:"duration,omitempty"`
	// FileID holds the value of the "file_id" field.
	FileID *int `json:"file_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EventQuery when eager-loading is set.
	Edges EventEdges `json:"edges"`
	// contains filtered or unexported fields
}

Event is the model entity for the Event schema.

func (*Event) QueryFile

func (e *Event) QueryFile() *FileQuery

QueryFile queries the "file" edge of the Event entity.

func (*Event) String

func (e *Event) String() string

String implements the fmt.Stringer.

func (*Event) Unwrap

func (e *Event) Unwrap() *Event

Unwrap unwraps the Event 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 (*Event) Update

func (e *Event) Update() *EventUpdateOne

Update returns a builder for updating this Event. Note that you need to call Event.Unwrap() before calling this method if this Event was returned from a transaction, and the transaction was committed or rolled back.

func (*Event) Value

func (e *Event) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Event. This includes values selected through modifiers, order, etc.

type EventClient

type EventClient struct {
	// contains filtered or unexported fields
}

EventClient is a client for the Event schema.

func NewEventClient

func NewEventClient(c config) *EventClient

NewEventClient returns a client for the Event from the given config.

func (*EventClient) Create

func (c *EventClient) Create() *EventCreate

Create returns a builder for creating a Event entity.

func (*EventClient) CreateBulk

func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk

CreateBulk returns a builder for creating a bulk of Event entities.

func (*EventClient) Delete

func (c *EventClient) Delete() *EventDelete

Delete returns a delete builder for Event.

func (*EventClient) DeleteOne

func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EventClient) DeleteOneID

func (c *EventClient) DeleteOneID(id int) *EventDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*EventClient) Get

func (c *EventClient) Get(ctx context.Context, id int) (*Event, error)

Get returns a Event entity by its id.

func (*EventClient) GetX

func (c *EventClient) GetX(ctx context.Context, id int) *Event

GetX is like Get, but panics if an error occurs.

func (*EventClient) Hooks

func (c *EventClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EventClient) Intercept

func (c *EventClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `event.Intercept(f(g(h())))`.

func (*EventClient) Interceptors

func (c *EventClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*EventClient) MapCreateBulk

func (c *EventClient) MapCreateBulk(slice any, setFunc func(*EventCreate, int)) *EventCreateBulk

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 (*EventClient) Query

func (c *EventClient) Query() *EventQuery

Query returns a query builder for Event.

func (*EventClient) QueryFile

func (c *EventClient) QueryFile(e *Event) *FileQuery

QueryFile queries the file edge of a Event.

func (*EventClient) Update

func (c *EventClient) Update() *EventUpdate

Update returns an update builder for Event.

func (*EventClient) UpdateOne

func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EventClient) UpdateOneID

func (c *EventClient) UpdateOneID(id int) *EventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EventClient) Use

func (c *EventClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `event.Hooks(f(g(h())))`.

type EventCreate

type EventCreate struct {
	// contains filtered or unexported fields
}

EventCreate is the builder for creating a Event entity.

func (*EventCreate) Exec

func (ec *EventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EventCreate) ExecX

func (ec *EventCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventCreate) Mutation

func (ec *EventCreate) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventCreate) OnConflict

func (ec *EventCreate) OnConflict(opts ...sql.ConflictOption) *EventUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Event.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EventUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*EventCreate) OnConflictColumns

func (ec *EventCreate) OnConflictColumns(columns ...string) *EventUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Event.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*EventCreate) Save

func (ec *EventCreate) Save(ctx context.Context) (*Event, error)

Save creates the Event in the database.

func (*EventCreate) SaveX

func (ec *EventCreate) SaveX(ctx context.Context) *Event

SaveX calls Save and panics if Save returns an error.

func (*EventCreate) SetAction

func (ec *EventCreate) SetAction(tat types.EventActionType) *EventCreate

SetAction sets the "action" field.

func (*EventCreate) SetCreatedAt

func (ec *EventCreate) SetCreatedAt(t time.Time) *EventCreate

SetCreatedAt sets the "created_at" field.

func (*EventCreate) SetDeletedAt

func (ec *EventCreate) SetDeletedAt(t time.Time) *EventCreate

SetDeletedAt sets the "deleted_at" field.

func (*EventCreate) SetDuration

func (ec *EventCreate) SetDuration(s string) *EventCreate

SetDuration sets the "duration" field.

func (*EventCreate) SetFile

func (ec *EventCreate) SetFile(f *File) *EventCreate

SetFile sets the "file" edge to the File entity.

func (*EventCreate) SetFileID

func (ec *EventCreate) SetFileID(i int) *EventCreate

SetFileID sets the "file_id" field.

func (*EventCreate) SetHasDiff

func (ec *EventCreate) SetHasDiff(b bool) *EventCreate

SetHasDiff sets the "has_diff" field.

func (*EventCreate) SetMessage

func (ec *EventCreate) SetMessage(s string) *EventCreate

SetMessage sets the "message" field.

func (*EventCreate) SetNew

func (ec *EventCreate) SetNew(s string) *EventCreate

SetNew sets the "new" field.

func (*EventCreate) SetNillableAction

func (ec *EventCreate) SetNillableAction(tat *types.EventActionType) *EventCreate

SetNillableAction sets the "action" field if the given value is not nil.

func (*EventCreate) SetNillableCreatedAt

func (ec *EventCreate) SetNillableCreatedAt(t *time.Time) *EventCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*EventCreate) SetNillableDeletedAt

func (ec *EventCreate) SetNillableDeletedAt(t *time.Time) *EventCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*EventCreate) SetNillableDuration

func (ec *EventCreate) SetNillableDuration(s *string) *EventCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*EventCreate) SetNillableFileID

func (ec *EventCreate) SetNillableFileID(i *int) *EventCreate

SetNillableFileID sets the "file_id" field if the given value is not nil.

func (*EventCreate) SetNillableHasDiff

func (ec *EventCreate) SetNillableHasDiff(b *bool) *EventCreate

SetNillableHasDiff sets the "has_diff" field if the given value is not nil.

func (*EventCreate) SetNillableMessage

func (ec *EventCreate) SetNillableMessage(s *string) *EventCreate

SetNillableMessage sets the "message" field if the given value is not nil.

func (*EventCreate) SetNillableNew

func (ec *EventCreate) SetNillableNew(s *string) *EventCreate

SetNillableNew sets the "new" field if the given value is not nil.

func (*EventCreate) SetNillableOld

func (ec *EventCreate) SetNillableOld(s *string) *EventCreate

SetNillableOld sets the "old" field if the given value is not nil.

func (*EventCreate) SetNillableUpdatedAt

func (ec *EventCreate) SetNillableUpdatedAt(t *time.Time) *EventCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*EventCreate) SetNillableUsername

func (ec *EventCreate) SetNillableUsername(s *string) *EventCreate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*EventCreate) SetOld

func (ec *EventCreate) SetOld(s string) *EventCreate

SetOld sets the "old" field.

func (*EventCreate) SetUpdatedAt

func (ec *EventCreate) SetUpdatedAt(t time.Time) *EventCreate

SetUpdatedAt sets the "updated_at" field.

func (*EventCreate) SetUsername

func (ec *EventCreate) SetUsername(s string) *EventCreate

SetUsername sets the "username" field.

type EventCreateBulk

type EventCreateBulk struct {
	// contains filtered or unexported fields
}

EventCreateBulk is the builder for creating many Event entities in bulk.

func (*EventCreateBulk) Exec

func (ecb *EventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EventCreateBulk) ExecX

func (ecb *EventCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventCreateBulk) OnConflict

func (ecb *EventCreateBulk) OnConflict(opts ...sql.ConflictOption) *EventUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Event.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.EventUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*EventCreateBulk) OnConflictColumns

func (ecb *EventCreateBulk) OnConflictColumns(columns ...string) *EventUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Event.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*EventCreateBulk) Save

func (ecb *EventCreateBulk) Save(ctx context.Context) ([]*Event, error)

Save creates the Event entities in the database.

func (*EventCreateBulk) SaveX

func (ecb *EventCreateBulk) SaveX(ctx context.Context) []*Event

SaveX is like Save, but panics if an error occurs.

type EventDelete

type EventDelete struct {
	// contains filtered or unexported fields
}

EventDelete is the builder for deleting a Event entity.

func (*EventDelete) Exec

func (ed *EventDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EventDelete) ExecX

func (ed *EventDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EventDelete) Where

func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete

Where appends a list predicates to the EventDelete builder.

type EventDeleteOne

type EventDeleteOne struct {
	// contains filtered or unexported fields
}

EventDeleteOne is the builder for deleting a single Event entity.

func (*EventDeleteOne) Exec

func (edo *EventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EventDeleteOne) ExecX

func (edo *EventDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventDeleteOne) Where

func (edo *EventDeleteOne) Where(ps ...predicate.Event) *EventDeleteOne

Where appends a list predicates to the EventDelete builder.

type EventEdges

type EventEdges struct {
	// File holds the value of the file edge.
	File *File `json:"file,omitempty"`
	// contains filtered or unexported fields
}

EventEdges holds the relations/edges for other nodes in the graph.

func (EventEdges) FileOrErr

func (e EventEdges) FileOrErr() (*File, error)

FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EventGroupBy

type EventGroupBy struct {
	// contains filtered or unexported fields
}

EventGroupBy is the group-by builder for Event entities.

func (*EventGroupBy) Aggregate

func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*EventGroupBy) Bool

func (s *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) BoolX

func (s *EventGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EventGroupBy) Bools

func (s *EventGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) BoolsX

func (s *EventGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EventGroupBy) Float64

func (s *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) Float64X

func (s *EventGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EventGroupBy) Float64s

func (s *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) Float64sX

func (s *EventGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EventGroupBy) Int

func (s *EventGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) IntX

func (s *EventGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EventGroupBy) Ints

func (s *EventGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) IntsX

func (s *EventGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EventGroupBy) Scan

func (egb *EventGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EventGroupBy) ScanX

func (s *EventGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EventGroupBy) String

func (s *EventGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) StringX

func (s *EventGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EventGroupBy) Strings

func (s *EventGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EventGroupBy) StringsX

func (s *EventGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EventMutation

type EventMutation struct {
	// contains filtered or unexported fields
}

EventMutation represents an operation that mutates the Event nodes in the graph.

func (*EventMutation) Action

func (m *EventMutation) Action() (r types.EventActionType, exists bool)

Action returns the value of the "action" field in the mutation.

func (*EventMutation) AddAction

func (m *EventMutation) AddAction(tat types.EventActionType)

AddAction adds tat to the "action" field.

func (*EventMutation) AddField

func (m *EventMutation) 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 (*EventMutation) AddedAction

func (m *EventMutation) AddedAction() (r types.EventActionType, exists bool)

AddedAction returns the value that was added to the "action" field in this mutation.

func (*EventMutation) AddedEdges

func (m *EventMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EventMutation) AddedField

func (m *EventMutation) 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 (*EventMutation) AddedFields

func (m *EventMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EventMutation) AddedIDs

func (m *EventMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EventMutation) ClearDeletedAt

func (m *EventMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*EventMutation) ClearEdge

func (m *EventMutation) 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 (*EventMutation) ClearField

func (m *EventMutation) 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 (*EventMutation) ClearFile

func (m *EventMutation) ClearFile()

ClearFile clears the "file" edge to the File entity.

func (*EventMutation) ClearFileID

func (m *EventMutation) ClearFileID()

ClearFileID clears the value of the "file_id" field.

func (*EventMutation) ClearNew

func (m *EventMutation) ClearNew()

ClearNew clears the value of the "new" field.

func (*EventMutation) ClearOld

func (m *EventMutation) ClearOld()

ClearOld clears the value of the "old" field.

func (*EventMutation) ClearedEdges

func (m *EventMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EventMutation) ClearedFields

func (m *EventMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EventMutation) Client

func (m EventMutation) 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 (*EventMutation) CreatedAt

func (m *EventMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*EventMutation) DeletedAt

func (m *EventMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*EventMutation) DeletedAtCleared

func (m *EventMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*EventMutation) Duration

func (m *EventMutation) Duration() (r string, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*EventMutation) EdgeCleared

func (m *EventMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EventMutation) Field

func (m *EventMutation) 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 (*EventMutation) FieldCleared

func (m *EventMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EventMutation) Fields

func (m *EventMutation) 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 (*EventMutation) FileCleared

func (m *EventMutation) FileCleared() bool

FileCleared reports if the "file" edge to the File entity was cleared.

func (*EventMutation) FileID

func (m *EventMutation) FileID() (r int, exists bool)

FileID returns the value of the "file_id" field in the mutation.

func (*EventMutation) FileIDCleared

func (m *EventMutation) FileIDCleared() bool

FileIDCleared returns if the "file_id" field was cleared in this mutation.

func (*EventMutation) FileIDs

func (m *EventMutation) FileIDs() (ids []int)

FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.

func (*EventMutation) HasDiff

func (m *EventMutation) HasDiff() (r bool, exists bool)

HasDiff returns the value of the "has_diff" field in the mutation.

func (*EventMutation) ID

func (m *EventMutation) 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 (*EventMutation) IDs

func (m *EventMutation) 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 (*EventMutation) Message

func (m *EventMutation) Message() (r string, exists bool)

Message returns the value of the "message" field in the mutation.

func (*EventMutation) New

func (m *EventMutation) New() (r string, exists bool)

New returns the value of the "new" field in the mutation.

func (*EventMutation) NewCleared

func (m *EventMutation) NewCleared() bool

NewCleared returns if the "new" field was cleared in this mutation.

func (*EventMutation) Old

func (m *EventMutation) Old() (r string, exists bool)

Old returns the value of the "old" field in the mutation.

func (*EventMutation) OldAction

func (m *EventMutation) OldAction(ctx context.Context) (v types.EventActionType, err error)

OldAction returns the old "action" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldCleared

func (m *EventMutation) OldCleared() bool

OldCleared returns if the "old" field was cleared in this mutation.

func (*EventMutation) OldCreatedAt

func (m *EventMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldDeletedAt

func (m *EventMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldDuration

func (m *EventMutation) OldDuration(ctx context.Context) (v string, err error)

OldDuration returns the old "duration" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldField

func (m *EventMutation) 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 (*EventMutation) OldFileID

func (m *EventMutation) OldFileID(ctx context.Context) (v *int, err error)

OldFileID returns the old "file_id" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldHasDiff

func (m *EventMutation) OldHasDiff(ctx context.Context) (v bool, err error)

OldHasDiff returns the old "has_diff" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldMessage

func (m *EventMutation) OldMessage(ctx context.Context) (v string, err error)

OldMessage returns the old "message" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldNew

func (m *EventMutation) OldNew(ctx context.Context) (v string, err error)

OldNew returns the old "new" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldOld

func (m *EventMutation) OldOld(ctx context.Context) (v string, err error)

OldOld returns the old "old" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldUpdatedAt

func (m *EventMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldUsername

func (m *EventMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) Op

func (m *EventMutation) Op() Op

Op returns the operation name.

func (*EventMutation) RemovedEdges

func (m *EventMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EventMutation) RemovedIDs

func (m *EventMutation) 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 (*EventMutation) ResetAction

func (m *EventMutation) ResetAction()

ResetAction resets all changes to the "action" field.

func (*EventMutation) ResetCreatedAt

func (m *EventMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EventMutation) ResetDeletedAt

func (m *EventMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*EventMutation) ResetDuration

func (m *EventMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*EventMutation) ResetEdge

func (m *EventMutation) 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 (*EventMutation) ResetField

func (m *EventMutation) 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 (*EventMutation) ResetFile

func (m *EventMutation) ResetFile()

ResetFile resets all changes to the "file" edge.

func (*EventMutation) ResetFileID

func (m *EventMutation) ResetFileID()

ResetFileID resets all changes to the "file_id" field.

func (*EventMutation) ResetHasDiff

func (m *EventMutation) ResetHasDiff()

ResetHasDiff resets all changes to the "has_diff" field.

func (*EventMutation) ResetMessage

func (m *EventMutation) ResetMessage()

ResetMessage resets all changes to the "message" field.

func (*EventMutation) ResetNew

func (m *EventMutation) ResetNew()

ResetNew resets all changes to the "new" field.

func (*EventMutation) ResetOld

func (m *EventMutation) ResetOld()

ResetOld resets all changes to the "old" field.

func (*EventMutation) ResetUpdatedAt

func (m *EventMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EventMutation) ResetUsername

func (m *EventMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*EventMutation) SetAction

func (m *EventMutation) SetAction(tat types.EventActionType)

SetAction sets the "action" field.

func (*EventMutation) SetCreatedAt

func (m *EventMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*EventMutation) SetDeletedAt

func (m *EventMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*EventMutation) SetDuration

func (m *EventMutation) SetDuration(s string)

SetDuration sets the "duration" field.

func (*EventMutation) SetField

func (m *EventMutation) 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 (*EventMutation) SetFileID

func (m *EventMutation) SetFileID(i int)

SetFileID sets the "file_id" field.

func (*EventMutation) SetHasDiff

func (m *EventMutation) SetHasDiff(b bool)

SetHasDiff sets the "has_diff" field.

func (*EventMutation) SetMessage

func (m *EventMutation) SetMessage(s string)

SetMessage sets the "message" field.

func (*EventMutation) SetNew

func (m *EventMutation) SetNew(s string)

SetNew sets the "new" field.

func (*EventMutation) SetOld

func (m *EventMutation) SetOld(s string)

SetOld sets the "old" field.

func (*EventMutation) SetOp

func (m *EventMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EventMutation) SetUpdatedAt

func (m *EventMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*EventMutation) SetUsername

func (m *EventMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (EventMutation) Tx

func (m EventMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EventMutation) Type

func (m *EventMutation) Type() string

Type returns the node type of this mutation (Event).

func (*EventMutation) UpdatedAt

func (m *EventMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*EventMutation) Username

func (m *EventMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*EventMutation) Where

func (m *EventMutation) Where(ps ...predicate.Event)

Where appends a list predicates to the EventMutation builder.

func (*EventMutation) WhereP

func (m *EventMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the EventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type EventQuery

type EventQuery struct {
	// contains filtered or unexported fields
}

EventQuery is the builder for querying Event entities.

func (*EventQuery) Aggregate

func (eq *EventQuery) Aggregate(fns ...AggregateFunc) *EventSelect

Aggregate returns a EventSelect configured with the given aggregations.

func (*EventQuery) All

func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)

All executes the query and returns a list of Events.

func (*EventQuery) AllX

func (eq *EventQuery) AllX(ctx context.Context) []*Event

AllX is like All, but panics if an error occurs.

func (*EventQuery) Clone

func (eq *EventQuery) Clone() *EventQuery

Clone returns a duplicate of the EventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EventQuery) Count

func (eq *EventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EventQuery) CountX

func (eq *EventQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EventQuery) Exist

func (eq *EventQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EventQuery) ExistX

func (eq *EventQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EventQuery) First

func (eq *EventQuery) First(ctx context.Context) (*Event, error)

First returns the first Event entity from the query. Returns a *NotFoundError when no Event was found.

func (*EventQuery) FirstID

func (eq *EventQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Event ID from the query. Returns a *NotFoundError when no Event ID was found.

func (*EventQuery) FirstIDX

func (eq *EventQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EventQuery) FirstX

func (eq *EventQuery) FirstX(ctx context.Context) *Event

FirstX is like First, but panics if an error occurs.

func (*EventQuery) ForShare

func (eq *EventQuery) ForShare(opts ...sql.LockOption) *EventQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*EventQuery) ForUpdate

func (eq *EventQuery) ForUpdate(opts ...sql.LockOption) *EventQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*EventQuery) GroupBy

func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Event.Query().
	GroupBy(event.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EventQuery) IDs

func (eq *EventQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Event IDs.

func (*EventQuery) IDsX

func (eq *EventQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EventQuery) Limit

func (eq *EventQuery) Limit(limit int) *EventQuery

Limit the number of records to be returned by this query.

func (*EventQuery) Offset

func (eq *EventQuery) Offset(offset int) *EventQuery

Offset to start from.

func (*EventQuery) Only

func (eq *EventQuery) Only(ctx context.Context) (*Event, error)

Only returns a single Event entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Event entity is found. Returns a *NotFoundError when no Event entities are found.

func (*EventQuery) OnlyID

func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Event ID in the query. Returns a *NotSingularError when more than one Event ID is found. Returns a *NotFoundError when no entities are found.

func (*EventQuery) OnlyIDX

func (eq *EventQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EventQuery) OnlyX

func (eq *EventQuery) OnlyX(ctx context.Context) *Event

OnlyX is like Only, but panics if an error occurs.

func (*EventQuery) Order

func (eq *EventQuery) Order(o ...event.OrderOption) *EventQuery

Order specifies how the records should be ordered.

func (*EventQuery) QueryFile

func (eq *EventQuery) QueryFile() *FileQuery

QueryFile chains the current query on the "file" edge.

func (*EventQuery) Select

func (eq *EventQuery) Select(fields ...string) *EventSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Event.Query().
	Select(event.FieldCreatedAt).
	Scan(ctx, &v)

func (*EventQuery) Unique

func (eq *EventQuery) Unique(unique bool) *EventQuery

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 (*EventQuery) Where

func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery

Where adds a new predicate for the EventQuery builder.

func (*EventQuery) WithFile

func (eq *EventQuery) WithFile(opts ...func(*FileQuery)) *EventQuery

WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.

type EventSelect

type EventSelect struct {
	*EventQuery
	// contains filtered or unexported fields
}

EventSelect is the builder for selecting fields of Event entities.

func (*EventSelect) Aggregate

func (es *EventSelect) Aggregate(fns ...AggregateFunc) *EventSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EventSelect) Bool

func (s *EventSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EventSelect) BoolX

func (s *EventSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EventSelect) Bools

func (s *EventSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EventSelect) BoolsX

func (s *EventSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EventSelect) Float64

func (s *EventSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EventSelect) Float64X

func (s *EventSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EventSelect) Float64s

func (s *EventSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EventSelect) Float64sX

func (s *EventSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EventSelect) Int

func (s *EventSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EventSelect) IntX

func (s *EventSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EventSelect) Ints

func (s *EventSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EventSelect) IntsX

func (s *EventSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EventSelect) Scan

func (es *EventSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*EventSelect) ScanX

func (s *EventSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*EventSelect) String

func (s *EventSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EventSelect) StringX

func (s *EventSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EventSelect) Strings

func (s *EventSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EventSelect) StringsX

func (s *EventSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EventUpdate

type EventUpdate struct {
	// contains filtered or unexported fields
}

EventUpdate is the builder for updating Event entities.

func (*EventUpdate) AddAction

func (eu *EventUpdate) AddAction(tat types.EventActionType) *EventUpdate

AddAction adds tat to the "action" field.

func (*EventUpdate) ClearDeletedAt

func (eu *EventUpdate) ClearDeletedAt() *EventUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*EventUpdate) ClearFile

func (eu *EventUpdate) ClearFile() *EventUpdate

ClearFile clears the "file" edge to the File entity.

func (*EventUpdate) ClearFileID

func (eu *EventUpdate) ClearFileID() *EventUpdate

ClearFileID clears the value of the "file_id" field.

func (*EventUpdate) ClearNew

func (eu *EventUpdate) ClearNew() *EventUpdate

ClearNew clears the value of the "new" field.

func (*EventUpdate) ClearOld

func (eu *EventUpdate) ClearOld() *EventUpdate

ClearOld clears the value of the "old" field.

func (*EventUpdate) Exec

func (eu *EventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EventUpdate) ExecX

func (eu *EventUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventUpdate) Mutation

func (eu *EventUpdate) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventUpdate) Save

func (eu *EventUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EventUpdate) SaveX

func (eu *EventUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EventUpdate) SetAction

func (eu *EventUpdate) SetAction(tat types.EventActionType) *EventUpdate

SetAction sets the "action" field.

func (*EventUpdate) SetDeletedAt

func (eu *EventUpdate) SetDeletedAt(t time.Time) *EventUpdate

SetDeletedAt sets the "deleted_at" field.

func (*EventUpdate) SetDuration

func (eu *EventUpdate) SetDuration(s string) *EventUpdate

SetDuration sets the "duration" field.

func (*EventUpdate) SetFile

func (eu *EventUpdate) SetFile(f *File) *EventUpdate

SetFile sets the "file" edge to the File entity.

func (*EventUpdate) SetFileID

func (eu *EventUpdate) SetFileID(i int) *EventUpdate

SetFileID sets the "file_id" field.

func (*EventUpdate) SetHasDiff

func (eu *EventUpdate) SetHasDiff(b bool) *EventUpdate

SetHasDiff sets the "has_diff" field.

func (*EventUpdate) SetMessage

func (eu *EventUpdate) SetMessage(s string) *EventUpdate

SetMessage sets the "message" field.

func (*EventUpdate) SetNew

func (eu *EventUpdate) SetNew(s string) *EventUpdate

SetNew sets the "new" field.

func (*EventUpdate) SetNillableAction

func (eu *EventUpdate) SetNillableAction(tat *types.EventActionType) *EventUpdate

SetNillableAction sets the "action" field if the given value is not nil.

func (*EventUpdate) SetNillableDeletedAt

func (eu *EventUpdate) SetNillableDeletedAt(t *time.Time) *EventUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*EventUpdate) SetNillableDuration

func (eu *EventUpdate) SetNillableDuration(s *string) *EventUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*EventUpdate) SetNillableFileID

func (eu *EventUpdate) SetNillableFileID(i *int) *EventUpdate

SetNillableFileID sets the "file_id" field if the given value is not nil.

func (*EventUpdate) SetNillableHasDiff

func (eu *EventUpdate) SetNillableHasDiff(b *bool) *EventUpdate

SetNillableHasDiff sets the "has_diff" field if the given value is not nil.

func (*EventUpdate) SetNillableMessage

func (eu *EventUpdate) SetNillableMessage(s *string) *EventUpdate

SetNillableMessage sets the "message" field if the given value is not nil.

func (*EventUpdate) SetNillableNew

func (eu *EventUpdate) SetNillableNew(s *string) *EventUpdate

SetNillableNew sets the "new" field if the given value is not nil.

func (*EventUpdate) SetNillableOld

func (eu *EventUpdate) SetNillableOld(s *string) *EventUpdate

SetNillableOld sets the "old" field if the given value is not nil.

func (*EventUpdate) SetNillableUsername

func (eu *EventUpdate) SetNillableUsername(s *string) *EventUpdate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*EventUpdate) SetOld

func (eu *EventUpdate) SetOld(s string) *EventUpdate

SetOld sets the "old" field.

func (*EventUpdate) SetUpdatedAt

func (eu *EventUpdate) SetUpdatedAt(t time.Time) *EventUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EventUpdate) SetUsername

func (eu *EventUpdate) SetUsername(s string) *EventUpdate

SetUsername sets the "username" field.

func (*EventUpdate) Where

func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate

Where appends a list predicates to the EventUpdate builder.

type EventUpdateOne

type EventUpdateOne struct {
	// contains filtered or unexported fields
}

EventUpdateOne is the builder for updating a single Event entity.

func (*EventUpdateOne) AddAction

func (euo *EventUpdateOne) AddAction(tat types.EventActionType) *EventUpdateOne

AddAction adds tat to the "action" field.

func (*EventUpdateOne) ClearDeletedAt

func (euo *EventUpdateOne) ClearDeletedAt() *EventUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*EventUpdateOne) ClearFile

func (euo *EventUpdateOne) ClearFile() *EventUpdateOne

ClearFile clears the "file" edge to the File entity.

func (*EventUpdateOne) ClearFileID

func (euo *EventUpdateOne) ClearFileID() *EventUpdateOne

ClearFileID clears the value of the "file_id" field.

func (*EventUpdateOne) ClearNew

func (euo *EventUpdateOne) ClearNew() *EventUpdateOne

ClearNew clears the value of the "new" field.

func (*EventUpdateOne) ClearOld

func (euo *EventUpdateOne) ClearOld() *EventUpdateOne

ClearOld clears the value of the "old" field.

func (*EventUpdateOne) Exec

func (euo *EventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EventUpdateOne) ExecX

func (euo *EventUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventUpdateOne) Mutation

func (euo *EventUpdateOne) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventUpdateOne) Save

func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)

Save executes the query and returns the updated Event entity.

func (*EventUpdateOne) SaveX

func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event

SaveX is like Save, but panics if an error occurs.

func (*EventUpdateOne) Select

func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EventUpdateOne) SetAction

func (euo *EventUpdateOne) SetAction(tat types.EventActionType) *EventUpdateOne

SetAction sets the "action" field.

func (*EventUpdateOne) SetDeletedAt

func (euo *EventUpdateOne) SetDeletedAt(t time.Time) *EventUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*EventUpdateOne) SetDuration

func (euo *EventUpdateOne) SetDuration(s string) *EventUpdateOne

SetDuration sets the "duration" field.

func (*EventUpdateOne) SetFile

func (euo *EventUpdateOne) SetFile(f *File) *EventUpdateOne

SetFile sets the "file" edge to the File entity.

func (*EventUpdateOne) SetFileID

func (euo *EventUpdateOne) SetFileID(i int) *EventUpdateOne

SetFileID sets the "file_id" field.

func (*EventUpdateOne) SetHasDiff

func (euo *EventUpdateOne) SetHasDiff(b bool) *EventUpdateOne

SetHasDiff sets the "has_diff" field.

func (*EventUpdateOne) SetMessage

func (euo *EventUpdateOne) SetMessage(s string) *EventUpdateOne

SetMessage sets the "message" field.

func (*EventUpdateOne) SetNew

func (euo *EventUpdateOne) SetNew(s string) *EventUpdateOne

SetNew sets the "new" field.

func (*EventUpdateOne) SetNillableAction

func (euo *EventUpdateOne) SetNillableAction(tat *types.EventActionType) *EventUpdateOne

SetNillableAction sets the "action" field if the given value is not nil.

func (*EventUpdateOne) SetNillableDeletedAt

func (euo *EventUpdateOne) SetNillableDeletedAt(t *time.Time) *EventUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*EventUpdateOne) SetNillableDuration

func (euo *EventUpdateOne) SetNillableDuration(s *string) *EventUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*EventUpdateOne) SetNillableFileID

func (euo *EventUpdateOne) SetNillableFileID(i *int) *EventUpdateOne

SetNillableFileID sets the "file_id" field if the given value is not nil.

func (*EventUpdateOne) SetNillableHasDiff

func (euo *EventUpdateOne) SetNillableHasDiff(b *bool) *EventUpdateOne

SetNillableHasDiff sets the "has_diff" field if the given value is not nil.

func (*EventUpdateOne) SetNillableMessage

func (euo *EventUpdateOne) SetNillableMessage(s *string) *EventUpdateOne

SetNillableMessage sets the "message" field if the given value is not nil.

func (*EventUpdateOne) SetNillableNew

func (euo *EventUpdateOne) SetNillableNew(s *string) *EventUpdateOne

SetNillableNew sets the "new" field if the given value is not nil.

func (*EventUpdateOne) SetNillableOld

func (euo *EventUpdateOne) SetNillableOld(s *string) *EventUpdateOne

SetNillableOld sets the "old" field if the given value is not nil.

func (*EventUpdateOne) SetNillableUsername

func (euo *EventUpdateOne) SetNillableUsername(s *string) *EventUpdateOne

SetNillableUsername sets the "username" field if the given value is not nil.

func (*EventUpdateOne) SetOld

func (euo *EventUpdateOne) SetOld(s string) *EventUpdateOne

SetOld sets the "old" field.

func (*EventUpdateOne) SetUpdatedAt

func (euo *EventUpdateOne) SetUpdatedAt(t time.Time) *EventUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*EventUpdateOne) SetUsername

func (euo *EventUpdateOne) SetUsername(s string) *EventUpdateOne

SetUsername sets the "username" field.

func (*EventUpdateOne) Where

func (euo *EventUpdateOne) Where(ps ...predicate.Event) *EventUpdateOne

Where appends a list predicates to the EventUpdate builder.

type EventUpsert

type EventUpsert struct {
	*sql.UpdateSet
}

EventUpsert is the "OnConflict" setter.

func (*EventUpsert) AddAction

func (u *EventUpsert) AddAction(v types.EventActionType) *EventUpsert

AddAction adds v to the "action" field.

func (*EventUpsert) ClearDeletedAt

func (u *EventUpsert) ClearDeletedAt() *EventUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*EventUpsert) ClearFileID

func (u *EventUpsert) ClearFileID() *EventUpsert

ClearFileID clears the value of the "file_id" field.

func (*EventUpsert) ClearNew

func (u *EventUpsert) ClearNew() *EventUpsert

ClearNew clears the value of the "new" field.

func (*EventUpsert) ClearOld

func (u *EventUpsert) ClearOld() *EventUpsert

ClearOld clears the value of the "old" field.

func (*EventUpsert) SetAction

func (u *EventUpsert) SetAction(v types.EventActionType) *EventUpsert

SetAction sets the "action" field.

func (*EventUpsert) SetDeletedAt

func (u *EventUpsert) SetDeletedAt(v time.Time) *EventUpsert

SetDeletedAt sets the "deleted_at" field.

func (*EventUpsert) SetDuration

func (u *EventUpsert) SetDuration(v string) *EventUpsert

SetDuration sets the "duration" field.

func (*EventUpsert) SetFileID

func (u *EventUpsert) SetFileID(v int) *EventUpsert

SetFileID sets the "file_id" field.

func (*EventUpsert) SetHasDiff

func (u *EventUpsert) SetHasDiff(v bool) *EventUpsert

SetHasDiff sets the "has_diff" field.

func (*EventUpsert) SetMessage

func (u *EventUpsert) SetMessage(v string) *EventUpsert

SetMessage sets the "message" field.

func (*EventUpsert) SetNew

func (u *EventUpsert) SetNew(v string) *EventUpsert

SetNew sets the "new" field.

func (*EventUpsert) SetOld

func (u *EventUpsert) SetOld(v string) *EventUpsert

SetOld sets the "old" field.

func (*EventUpsert) SetUpdatedAt

func (u *EventUpsert) SetUpdatedAt(v time.Time) *EventUpsert

SetUpdatedAt sets the "updated_at" field.

func (*EventUpsert) SetUsername

func (u *EventUpsert) SetUsername(v string) *EventUpsert

SetUsername sets the "username" field.

func (*EventUpsert) UpdateAction

func (u *EventUpsert) UpdateAction() *EventUpsert

UpdateAction sets the "action" field to the value that was provided on create.

func (*EventUpsert) UpdateDeletedAt

func (u *EventUpsert) UpdateDeletedAt() *EventUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*EventUpsert) UpdateDuration

func (u *EventUpsert) UpdateDuration() *EventUpsert

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*EventUpsert) UpdateFileID

func (u *EventUpsert) UpdateFileID() *EventUpsert

UpdateFileID sets the "file_id" field to the value that was provided on create.

func (*EventUpsert) UpdateHasDiff

func (u *EventUpsert) UpdateHasDiff() *EventUpsert

UpdateHasDiff sets the "has_diff" field to the value that was provided on create.

func (*EventUpsert) UpdateMessage

func (u *EventUpsert) UpdateMessage() *EventUpsert

UpdateMessage sets the "message" field to the value that was provided on create.

func (*EventUpsert) UpdateNew

func (u *EventUpsert) UpdateNew() *EventUpsert

UpdateNew sets the "new" field to the value that was provided on create.

func (*EventUpsert) UpdateOld

func (u *EventUpsert) UpdateOld() *EventUpsert

UpdateOld sets the "old" field to the value that was provided on create.

func (*EventUpsert) UpdateUpdatedAt

func (u *EventUpsert) UpdateUpdatedAt() *EventUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*EventUpsert) UpdateUsername

func (u *EventUpsert) UpdateUsername() *EventUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

type EventUpsertBulk

type EventUpsertBulk struct {
	// contains filtered or unexported fields
}

EventUpsertBulk is the builder for "upsert"-ing a bulk of Event nodes.

func (*EventUpsertBulk) AddAction

AddAction adds v to the "action" field.

func (*EventUpsertBulk) ClearDeletedAt

func (u *EventUpsertBulk) ClearDeletedAt() *EventUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*EventUpsertBulk) ClearFileID

func (u *EventUpsertBulk) ClearFileID() *EventUpsertBulk

ClearFileID clears the value of the "file_id" field.

func (*EventUpsertBulk) ClearNew

func (u *EventUpsertBulk) ClearNew() *EventUpsertBulk

ClearNew clears the value of the "new" field.

func (*EventUpsertBulk) ClearOld

func (u *EventUpsertBulk) ClearOld() *EventUpsertBulk

ClearOld clears the value of the "old" field.

func (*EventUpsertBulk) DoNothing

func (u *EventUpsertBulk) DoNothing() *EventUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*EventUpsertBulk) Exec

func (u *EventUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EventUpsertBulk) ExecX

func (u *EventUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventUpsertBulk) Ignore

func (u *EventUpsertBulk) Ignore() *EventUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Event.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*EventUpsertBulk) SetAction

SetAction sets the "action" field.

func (*EventUpsertBulk) SetDeletedAt

func (u *EventUpsertBulk) SetDeletedAt(v time.Time) *EventUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*EventUpsertBulk) SetDuration

func (u *EventUpsertBulk) SetDuration(v string) *EventUpsertBulk

SetDuration sets the "duration" field.

func (*EventUpsertBulk) SetFileID

func (u *EventUpsertBulk) SetFileID(v int) *EventUpsertBulk

SetFileID sets the "file_id" field.

func (*EventUpsertBulk) SetHasDiff

func (u *EventUpsertBulk) SetHasDiff(v bool) *EventUpsertBulk

SetHasDiff sets the "has_diff" field.

func (*EventUpsertBulk) SetMessage

func (u *EventUpsertBulk) SetMessage(v string) *EventUpsertBulk

SetMessage sets the "message" field.

func (*EventUpsertBulk) SetNew

func (u *EventUpsertBulk) SetNew(v string) *EventUpsertBulk

SetNew sets the "new" field.

func (*EventUpsertBulk) SetOld

func (u *EventUpsertBulk) SetOld(v string) *EventUpsertBulk

SetOld sets the "old" field.

func (*EventUpsertBulk) SetUpdatedAt

func (u *EventUpsertBulk) SetUpdatedAt(v time.Time) *EventUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*EventUpsertBulk) SetUsername

func (u *EventUpsertBulk) SetUsername(v string) *EventUpsertBulk

SetUsername sets the "username" field.

func (*EventUpsertBulk) Update

func (u *EventUpsertBulk) Update(set func(*EventUpsert)) *EventUpsertBulk

Update allows overriding fields `UPDATE` values. See the EventCreateBulk.OnConflict documentation for more info.

func (*EventUpsertBulk) UpdateAction

func (u *EventUpsertBulk) UpdateAction() *EventUpsertBulk

UpdateAction sets the "action" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateDeletedAt

func (u *EventUpsertBulk) UpdateDeletedAt() *EventUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateDuration

func (u *EventUpsertBulk) UpdateDuration() *EventUpsertBulk

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateFileID

func (u *EventUpsertBulk) UpdateFileID() *EventUpsertBulk

UpdateFileID sets the "file_id" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateHasDiff

func (u *EventUpsertBulk) UpdateHasDiff() *EventUpsertBulk

UpdateHasDiff sets the "has_diff" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateMessage

func (u *EventUpsertBulk) UpdateMessage() *EventUpsertBulk

UpdateMessage sets the "message" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateNew

func (u *EventUpsertBulk) UpdateNew() *EventUpsertBulk

UpdateNew sets the "new" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateNewValues

func (u *EventUpsertBulk) UpdateNewValues() *EventUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Event.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*EventUpsertBulk) UpdateOld

func (u *EventUpsertBulk) UpdateOld() *EventUpsertBulk

UpdateOld sets the "old" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateUpdatedAt

func (u *EventUpsertBulk) UpdateUpdatedAt() *EventUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*EventUpsertBulk) UpdateUsername

func (u *EventUpsertBulk) UpdateUsername() *EventUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

type EventUpsertOne

type EventUpsertOne struct {
	// contains filtered or unexported fields
}

EventUpsertOne is the builder for "upsert"-ing

one Event node.

func (*EventUpsertOne) AddAction

AddAction adds v to the "action" field.

func (*EventUpsertOne) ClearDeletedAt

func (u *EventUpsertOne) ClearDeletedAt() *EventUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*EventUpsertOne) ClearFileID

func (u *EventUpsertOne) ClearFileID() *EventUpsertOne

ClearFileID clears the value of the "file_id" field.

func (*EventUpsertOne) ClearNew

func (u *EventUpsertOne) ClearNew() *EventUpsertOne

ClearNew clears the value of the "new" field.

func (*EventUpsertOne) ClearOld

func (u *EventUpsertOne) ClearOld() *EventUpsertOne

ClearOld clears the value of the "old" field.

func (*EventUpsertOne) DoNothing

func (u *EventUpsertOne) DoNothing() *EventUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*EventUpsertOne) Exec

func (u *EventUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*EventUpsertOne) ExecX

func (u *EventUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventUpsertOne) ID

func (u *EventUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*EventUpsertOne) IDX

func (u *EventUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*EventUpsertOne) Ignore

func (u *EventUpsertOne) Ignore() *EventUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Event.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*EventUpsertOne) SetAction

SetAction sets the "action" field.

func (*EventUpsertOne) SetDeletedAt

func (u *EventUpsertOne) SetDeletedAt(v time.Time) *EventUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*EventUpsertOne) SetDuration

func (u *EventUpsertOne) SetDuration(v string) *EventUpsertOne

SetDuration sets the "duration" field.

func (*EventUpsertOne) SetFileID

func (u *EventUpsertOne) SetFileID(v int) *EventUpsertOne

SetFileID sets the "file_id" field.

func (*EventUpsertOne) SetHasDiff

func (u *EventUpsertOne) SetHasDiff(v bool) *EventUpsertOne

SetHasDiff sets the "has_diff" field.

func (*EventUpsertOne) SetMessage

func (u *EventUpsertOne) SetMessage(v string) *EventUpsertOne

SetMessage sets the "message" field.

func (*EventUpsertOne) SetNew

func (u *EventUpsertOne) SetNew(v string) *EventUpsertOne

SetNew sets the "new" field.

func (*EventUpsertOne) SetOld

func (u *EventUpsertOne) SetOld(v string) *EventUpsertOne

SetOld sets the "old" field.

func (*EventUpsertOne) SetUpdatedAt

func (u *EventUpsertOne) SetUpdatedAt(v time.Time) *EventUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*EventUpsertOne) SetUsername

func (u *EventUpsertOne) SetUsername(v string) *EventUpsertOne

SetUsername sets the "username" field.

func (*EventUpsertOne) Update

func (u *EventUpsertOne) Update(set func(*EventUpsert)) *EventUpsertOne

Update allows overriding fields `UPDATE` values. See the EventCreate.OnConflict documentation for more info.

func (*EventUpsertOne) UpdateAction

func (u *EventUpsertOne) UpdateAction() *EventUpsertOne

UpdateAction sets the "action" field to the value that was provided on create.

func (*EventUpsertOne) UpdateDeletedAt

func (u *EventUpsertOne) UpdateDeletedAt() *EventUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*EventUpsertOne) UpdateDuration

func (u *EventUpsertOne) UpdateDuration() *EventUpsertOne

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*EventUpsertOne) UpdateFileID

func (u *EventUpsertOne) UpdateFileID() *EventUpsertOne

UpdateFileID sets the "file_id" field to the value that was provided on create.

func (*EventUpsertOne) UpdateHasDiff

func (u *EventUpsertOne) UpdateHasDiff() *EventUpsertOne

UpdateHasDiff sets the "has_diff" field to the value that was provided on create.

func (*EventUpsertOne) UpdateMessage

func (u *EventUpsertOne) UpdateMessage() *EventUpsertOne

UpdateMessage sets the "message" field to the value that was provided on create.

func (*EventUpsertOne) UpdateNew

func (u *EventUpsertOne) UpdateNew() *EventUpsertOne

UpdateNew sets the "new" field to the value that was provided on create.

func (*EventUpsertOne) UpdateNewValues

func (u *EventUpsertOne) UpdateNewValues() *EventUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Event.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*EventUpsertOne) UpdateOld

func (u *EventUpsertOne) UpdateOld() *EventUpsertOne

UpdateOld sets the "old" field to the value that was provided on create.

func (*EventUpsertOne) UpdateUpdatedAt

func (u *EventUpsertOne) UpdateUpdatedAt() *EventUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*EventUpsertOne) UpdateUsername

func (u *EventUpsertOne) UpdateUsername() *EventUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

type Events

type Events []*Event

Events is a parsable slice of Event.

type Favorite

type Favorite struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// NamespaceID holds the value of the "namespace_id" field.
	NamespaceID int `json:"namespace_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FavoriteQuery when eager-loading is set.
	Edges FavoriteEdges `json:"edges"`
	// contains filtered or unexported fields
}

Favorite is the model entity for the Favorite schema.

func (*Favorite) QueryNamespace

func (f *Favorite) QueryNamespace() *NamespaceQuery

QueryNamespace queries the "namespace" edge of the Favorite entity.

func (*Favorite) String

func (f *Favorite) String() string

String implements the fmt.Stringer.

func (*Favorite) Unwrap

func (f *Favorite) Unwrap() *Favorite

Unwrap unwraps the Favorite 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 (*Favorite) Update

func (f *Favorite) Update() *FavoriteUpdateOne

Update returns a builder for updating this Favorite. Note that you need to call Favorite.Unwrap() before calling this method if this Favorite was returned from a transaction, and the transaction was committed or rolled back.

func (*Favorite) Value

func (f *Favorite) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Favorite. This includes values selected through modifiers, order, etc.

type FavoriteClient

type FavoriteClient struct {
	// contains filtered or unexported fields
}

FavoriteClient is a client for the Favorite schema.

func NewFavoriteClient

func NewFavoriteClient(c config) *FavoriteClient

NewFavoriteClient returns a client for the Favorite from the given config.

func (*FavoriteClient) Create

func (c *FavoriteClient) Create() *FavoriteCreate

Create returns a builder for creating a Favorite entity.

func (*FavoriteClient) CreateBulk

func (c *FavoriteClient) CreateBulk(builders ...*FavoriteCreate) *FavoriteCreateBulk

CreateBulk returns a builder for creating a bulk of Favorite entities.

func (*FavoriteClient) Delete

func (c *FavoriteClient) Delete() *FavoriteDelete

Delete returns a delete builder for Favorite.

func (*FavoriteClient) DeleteOne

func (c *FavoriteClient) DeleteOne(f *Favorite) *FavoriteDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FavoriteClient) DeleteOneID

func (c *FavoriteClient) DeleteOneID(id int) *FavoriteDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*FavoriteClient) Get

func (c *FavoriteClient) Get(ctx context.Context, id int) (*Favorite, error)

Get returns a Favorite entity by its id.

func (*FavoriteClient) GetX

func (c *FavoriteClient) GetX(ctx context.Context, id int) *Favorite

GetX is like Get, but panics if an error occurs.

func (*FavoriteClient) Hooks

func (c *FavoriteClient) Hooks() []Hook

Hooks returns the client hooks.

func (*FavoriteClient) Intercept

func (c *FavoriteClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `favorite.Intercept(f(g(h())))`.

func (*FavoriteClient) Interceptors

func (c *FavoriteClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*FavoriteClient) MapCreateBulk

func (c *FavoriteClient) MapCreateBulk(slice any, setFunc func(*FavoriteCreate, int)) *FavoriteCreateBulk

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 (*FavoriteClient) Query

func (c *FavoriteClient) Query() *FavoriteQuery

Query returns a query builder for Favorite.

func (*FavoriteClient) QueryNamespace

func (c *FavoriteClient) QueryNamespace(f *Favorite) *NamespaceQuery

QueryNamespace queries the namespace edge of a Favorite.

func (*FavoriteClient) Update

func (c *FavoriteClient) Update() *FavoriteUpdate

Update returns an update builder for Favorite.

func (*FavoriteClient) UpdateOne

func (c *FavoriteClient) UpdateOne(f *Favorite) *FavoriteUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FavoriteClient) UpdateOneID

func (c *FavoriteClient) UpdateOneID(id int) *FavoriteUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FavoriteClient) Use

func (c *FavoriteClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `favorite.Hooks(f(g(h())))`.

type FavoriteCreate

type FavoriteCreate struct {
	// contains filtered or unexported fields
}

FavoriteCreate is the builder for creating a Favorite entity.

func (*FavoriteCreate) Exec

func (fc *FavoriteCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FavoriteCreate) ExecX

func (fc *FavoriteCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteCreate) Mutation

func (fc *FavoriteCreate) Mutation() *FavoriteMutation

Mutation returns the FavoriteMutation object of the builder.

func (*FavoriteCreate) OnConflict

func (fc *FavoriteCreate) OnConflict(opts ...sql.ConflictOption) *FavoriteUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Favorite.Create().
	SetEmail(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FavoriteUpsert) {
		SetEmail(v+v).
	}).
	Exec(ctx)

func (*FavoriteCreate) OnConflictColumns

func (fc *FavoriteCreate) OnConflictColumns(columns ...string) *FavoriteUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Favorite.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FavoriteCreate) Save

func (fc *FavoriteCreate) Save(ctx context.Context) (*Favorite, error)

Save creates the Favorite in the database.

func (*FavoriteCreate) SaveX

func (fc *FavoriteCreate) SaveX(ctx context.Context) *Favorite

SaveX calls Save and panics if Save returns an error.

func (*FavoriteCreate) SetEmail

func (fc *FavoriteCreate) SetEmail(s string) *FavoriteCreate

SetEmail sets the "email" field.

func (*FavoriteCreate) SetNamespace

func (fc *FavoriteCreate) SetNamespace(n *Namespace) *FavoriteCreate

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*FavoriteCreate) SetNamespaceID

func (fc *FavoriteCreate) SetNamespaceID(i int) *FavoriteCreate

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteCreate) SetNillableNamespaceID

func (fc *FavoriteCreate) SetNillableNamespaceID(i *int) *FavoriteCreate

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

type FavoriteCreateBulk

type FavoriteCreateBulk struct {
	// contains filtered or unexported fields
}

FavoriteCreateBulk is the builder for creating many Favorite entities in bulk.

func (*FavoriteCreateBulk) Exec

func (fcb *FavoriteCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FavoriteCreateBulk) ExecX

func (fcb *FavoriteCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteCreateBulk) OnConflict

func (fcb *FavoriteCreateBulk) OnConflict(opts ...sql.ConflictOption) *FavoriteUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Favorite.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FavoriteUpsert) {
		SetEmail(v+v).
	}).
	Exec(ctx)

func (*FavoriteCreateBulk) OnConflictColumns

func (fcb *FavoriteCreateBulk) OnConflictColumns(columns ...string) *FavoriteUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Favorite.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FavoriteCreateBulk) Save

func (fcb *FavoriteCreateBulk) Save(ctx context.Context) ([]*Favorite, error)

Save creates the Favorite entities in the database.

func (*FavoriteCreateBulk) SaveX

func (fcb *FavoriteCreateBulk) SaveX(ctx context.Context) []*Favorite

SaveX is like Save, but panics if an error occurs.

type FavoriteDelete

type FavoriteDelete struct {
	// contains filtered or unexported fields
}

FavoriteDelete is the builder for deleting a Favorite entity.

func (*FavoriteDelete) Exec

func (fd *FavoriteDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*FavoriteDelete) ExecX

func (fd *FavoriteDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteDelete) Where

func (fd *FavoriteDelete) Where(ps ...predicate.Favorite) *FavoriteDelete

Where appends a list predicates to the FavoriteDelete builder.

type FavoriteDeleteOne

type FavoriteDeleteOne struct {
	// contains filtered or unexported fields
}

FavoriteDeleteOne is the builder for deleting a single Favorite entity.

func (*FavoriteDeleteOne) Exec

func (fdo *FavoriteDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FavoriteDeleteOne) ExecX

func (fdo *FavoriteDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteDeleteOne) Where

Where appends a list predicates to the FavoriteDelete builder.

type FavoriteEdges

type FavoriteEdges struct {
	// Namespace holds the value of the namespace edge.
	Namespace *Namespace `json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

FavoriteEdges holds the relations/edges for other nodes in the graph.

func (FavoriteEdges) NamespaceOrErr

func (e FavoriteEdges) NamespaceOrErr() (*Namespace, error)

NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type FavoriteGroupBy

type FavoriteGroupBy struct {
	// contains filtered or unexported fields
}

FavoriteGroupBy is the group-by builder for Favorite entities.

func (*FavoriteGroupBy) Aggregate

func (fgb *FavoriteGroupBy) Aggregate(fns ...AggregateFunc) *FavoriteGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*FavoriteGroupBy) Bool

func (s *FavoriteGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) BoolX

func (s *FavoriteGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FavoriteGroupBy) Bools

func (s *FavoriteGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) BoolsX

func (s *FavoriteGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FavoriteGroupBy) Float64

func (s *FavoriteGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) Float64X

func (s *FavoriteGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FavoriteGroupBy) Float64s

func (s *FavoriteGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) Float64sX

func (s *FavoriteGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FavoriteGroupBy) Int

func (s *FavoriteGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) IntX

func (s *FavoriteGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FavoriteGroupBy) Ints

func (s *FavoriteGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) IntsX

func (s *FavoriteGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FavoriteGroupBy) Scan

func (fgb *FavoriteGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FavoriteGroupBy) ScanX

func (s *FavoriteGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FavoriteGroupBy) String

func (s *FavoriteGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) StringX

func (s *FavoriteGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FavoriteGroupBy) Strings

func (s *FavoriteGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FavoriteGroupBy) StringsX

func (s *FavoriteGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FavoriteMutation

type FavoriteMutation struct {
	// contains filtered or unexported fields
}

FavoriteMutation represents an operation that mutates the Favorite nodes in the graph.

func (*FavoriteMutation) AddField

func (m *FavoriteMutation) 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 (*FavoriteMutation) AddedEdges

func (m *FavoriteMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*FavoriteMutation) AddedField

func (m *FavoriteMutation) 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 (*FavoriteMutation) AddedFields

func (m *FavoriteMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*FavoriteMutation) AddedIDs

func (m *FavoriteMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*FavoriteMutation) ClearEdge

func (m *FavoriteMutation) 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 (*FavoriteMutation) ClearField

func (m *FavoriteMutation) 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 (*FavoriteMutation) ClearNamespace

func (m *FavoriteMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*FavoriteMutation) ClearNamespaceID

func (m *FavoriteMutation) ClearNamespaceID()

ClearNamespaceID clears the value of the "namespace_id" field.

func (*FavoriteMutation) ClearedEdges

func (m *FavoriteMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*FavoriteMutation) ClearedFields

func (m *FavoriteMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (FavoriteMutation) Client

func (m FavoriteMutation) 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 (*FavoriteMutation) EdgeCleared

func (m *FavoriteMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*FavoriteMutation) Email

func (m *FavoriteMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*FavoriteMutation) Field

func (m *FavoriteMutation) 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 (*FavoriteMutation) FieldCleared

func (m *FavoriteMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*FavoriteMutation) Fields

func (m *FavoriteMutation) 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 (*FavoriteMutation) ID

func (m *FavoriteMutation) 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 (*FavoriteMutation) IDs

func (m *FavoriteMutation) 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 (*FavoriteMutation) NamespaceCleared

func (m *FavoriteMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the Namespace entity was cleared.

func (*FavoriteMutation) NamespaceID

func (m *FavoriteMutation) NamespaceID() (r int, exists bool)

NamespaceID returns the value of the "namespace_id" field in the mutation.

func (*FavoriteMutation) NamespaceIDCleared

func (m *FavoriteMutation) NamespaceIDCleared() bool

NamespaceIDCleared returns if the "namespace_id" field was cleared in this mutation.

func (*FavoriteMutation) NamespaceIDs

func (m *FavoriteMutation) NamespaceIDs() (ids []int)

NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.

func (*FavoriteMutation) OldEmail

func (m *FavoriteMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Favorite entity. If the Favorite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FavoriteMutation) OldField

func (m *FavoriteMutation) 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 (*FavoriteMutation) OldNamespaceID

func (m *FavoriteMutation) OldNamespaceID(ctx context.Context) (v int, err error)

OldNamespaceID returns the old "namespace_id" field's value of the Favorite entity. If the Favorite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FavoriteMutation) Op

func (m *FavoriteMutation) Op() Op

Op returns the operation name.

func (*FavoriteMutation) RemovedEdges

func (m *FavoriteMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*FavoriteMutation) RemovedIDs

func (m *FavoriteMutation) 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 (*FavoriteMutation) ResetEdge

func (m *FavoriteMutation) 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 (*FavoriteMutation) ResetEmail

func (m *FavoriteMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*FavoriteMutation) ResetField

func (m *FavoriteMutation) 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 (*FavoriteMutation) ResetNamespace

func (m *FavoriteMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" edge.

func (*FavoriteMutation) ResetNamespaceID

func (m *FavoriteMutation) ResetNamespaceID()

ResetNamespaceID resets all changes to the "namespace_id" field.

func (*FavoriteMutation) SetEmail

func (m *FavoriteMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*FavoriteMutation) SetField

func (m *FavoriteMutation) 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 (*FavoriteMutation) SetNamespaceID

func (m *FavoriteMutation) SetNamespaceID(i int)

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteMutation) SetOp

func (m *FavoriteMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (FavoriteMutation) Tx

func (m FavoriteMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*FavoriteMutation) Type

func (m *FavoriteMutation) Type() string

Type returns the node type of this mutation (Favorite).

func (*FavoriteMutation) Where

func (m *FavoriteMutation) Where(ps ...predicate.Favorite)

Where appends a list predicates to the FavoriteMutation builder.

func (*FavoriteMutation) WhereP

func (m *FavoriteMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the FavoriteMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type FavoriteQuery

type FavoriteQuery struct {
	// contains filtered or unexported fields
}

FavoriteQuery is the builder for querying Favorite entities.

func (*FavoriteQuery) Aggregate

func (fq *FavoriteQuery) Aggregate(fns ...AggregateFunc) *FavoriteSelect

Aggregate returns a FavoriteSelect configured with the given aggregations.

func (*FavoriteQuery) All

func (fq *FavoriteQuery) All(ctx context.Context) ([]*Favorite, error)

All executes the query and returns a list of Favorites.

func (*FavoriteQuery) AllX

func (fq *FavoriteQuery) AllX(ctx context.Context) []*Favorite

AllX is like All, but panics if an error occurs.

func (*FavoriteQuery) Clone

func (fq *FavoriteQuery) Clone() *FavoriteQuery

Clone returns a duplicate of the FavoriteQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*FavoriteQuery) Count

func (fq *FavoriteQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FavoriteQuery) CountX

func (fq *FavoriteQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*FavoriteQuery) Exist

func (fq *FavoriteQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*FavoriteQuery) ExistX

func (fq *FavoriteQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*FavoriteQuery) First

func (fq *FavoriteQuery) First(ctx context.Context) (*Favorite, error)

First returns the first Favorite entity from the query. Returns a *NotFoundError when no Favorite was found.

func (*FavoriteQuery) FirstID

func (fq *FavoriteQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Favorite ID from the query. Returns a *NotFoundError when no Favorite ID was found.

func (*FavoriteQuery) FirstIDX

func (fq *FavoriteQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*FavoriteQuery) FirstX

func (fq *FavoriteQuery) FirstX(ctx context.Context) *Favorite

FirstX is like First, but panics if an error occurs.

func (*FavoriteQuery) ForShare

func (fq *FavoriteQuery) ForShare(opts ...sql.LockOption) *FavoriteQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*FavoriteQuery) ForUpdate

func (fq *FavoriteQuery) ForUpdate(opts ...sql.LockOption) *FavoriteQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*FavoriteQuery) GroupBy

func (fq *FavoriteQuery) GroupBy(field string, fields ...string) *FavoriteGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Favorite.Query().
	GroupBy(favorite.FieldEmail).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FavoriteQuery) IDs

func (fq *FavoriteQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Favorite IDs.

func (*FavoriteQuery) IDsX

func (fq *FavoriteQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*FavoriteQuery) Limit

func (fq *FavoriteQuery) Limit(limit int) *FavoriteQuery

Limit the number of records to be returned by this query.

func (*FavoriteQuery) Offset

func (fq *FavoriteQuery) Offset(offset int) *FavoriteQuery

Offset to start from.

func (*FavoriteQuery) Only

func (fq *FavoriteQuery) Only(ctx context.Context) (*Favorite, error)

Only returns a single Favorite entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Favorite entity is found. Returns a *NotFoundError when no Favorite entities are found.

func (*FavoriteQuery) OnlyID

func (fq *FavoriteQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Favorite ID in the query. Returns a *NotSingularError when more than one Favorite ID is found. Returns a *NotFoundError when no entities are found.

func (*FavoriteQuery) OnlyIDX

func (fq *FavoriteQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*FavoriteQuery) OnlyX

func (fq *FavoriteQuery) OnlyX(ctx context.Context) *Favorite

OnlyX is like Only, but panics if an error occurs.

func (*FavoriteQuery) Order

Order specifies how the records should be ordered.

func (*FavoriteQuery) QueryNamespace

func (fq *FavoriteQuery) QueryNamespace() *NamespaceQuery

QueryNamespace chains the current query on the "namespace" edge.

func (*FavoriteQuery) Select

func (fq *FavoriteQuery) Select(fields ...string) *FavoriteSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
}

client.Favorite.Query().
	Select(favorite.FieldEmail).
	Scan(ctx, &v)

func (*FavoriteQuery) Unique

func (fq *FavoriteQuery) Unique(unique bool) *FavoriteQuery

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 (*FavoriteQuery) Where

func (fq *FavoriteQuery) Where(ps ...predicate.Favorite) *FavoriteQuery

Where adds a new predicate for the FavoriteQuery builder.

func (*FavoriteQuery) WithNamespace

func (fq *FavoriteQuery) WithNamespace(opts ...func(*NamespaceQuery)) *FavoriteQuery

WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. The optional arguments are used to configure the query builder of the edge.

type FavoriteSelect

type FavoriteSelect struct {
	*FavoriteQuery
	// contains filtered or unexported fields
}

FavoriteSelect is the builder for selecting fields of Favorite entities.

func (*FavoriteSelect) Aggregate

func (fs *FavoriteSelect) Aggregate(fns ...AggregateFunc) *FavoriteSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FavoriteSelect) Bool

func (s *FavoriteSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) BoolX

func (s *FavoriteSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FavoriteSelect) Bools

func (s *FavoriteSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) BoolsX

func (s *FavoriteSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FavoriteSelect) Float64

func (s *FavoriteSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) Float64X

func (s *FavoriteSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FavoriteSelect) Float64s

func (s *FavoriteSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) Float64sX

func (s *FavoriteSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FavoriteSelect) Int

func (s *FavoriteSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) IntX

func (s *FavoriteSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FavoriteSelect) Ints

func (s *FavoriteSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) IntsX

func (s *FavoriteSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FavoriteSelect) Scan

func (fs *FavoriteSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FavoriteSelect) ScanX

func (s *FavoriteSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FavoriteSelect) String

func (s *FavoriteSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) StringX

func (s *FavoriteSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FavoriteSelect) Strings

func (s *FavoriteSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FavoriteSelect) StringsX

func (s *FavoriteSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FavoriteUpdate

type FavoriteUpdate struct {
	// contains filtered or unexported fields
}

FavoriteUpdate is the builder for updating Favorite entities.

func (*FavoriteUpdate) ClearNamespace

func (fu *FavoriteUpdate) ClearNamespace() *FavoriteUpdate

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*FavoriteUpdate) ClearNamespaceID

func (fu *FavoriteUpdate) ClearNamespaceID() *FavoriteUpdate

ClearNamespaceID clears the value of the "namespace_id" field.

func (*FavoriteUpdate) Exec

func (fu *FavoriteUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FavoriteUpdate) ExecX

func (fu *FavoriteUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteUpdate) Mutation

func (fu *FavoriteUpdate) Mutation() *FavoriteMutation

Mutation returns the FavoriteMutation object of the builder.

func (*FavoriteUpdate) Save

func (fu *FavoriteUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*FavoriteUpdate) SaveX

func (fu *FavoriteUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*FavoriteUpdate) SetEmail

func (fu *FavoriteUpdate) SetEmail(s string) *FavoriteUpdate

SetEmail sets the "email" field.

func (*FavoriteUpdate) SetNamespace

func (fu *FavoriteUpdate) SetNamespace(n *Namespace) *FavoriteUpdate

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*FavoriteUpdate) SetNamespaceID

func (fu *FavoriteUpdate) SetNamespaceID(i int) *FavoriteUpdate

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteUpdate) SetNillableEmail

func (fu *FavoriteUpdate) SetNillableEmail(s *string) *FavoriteUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*FavoriteUpdate) SetNillableNamespaceID

func (fu *FavoriteUpdate) SetNillableNamespaceID(i *int) *FavoriteUpdate

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*FavoriteUpdate) Where

func (fu *FavoriteUpdate) Where(ps ...predicate.Favorite) *FavoriteUpdate

Where appends a list predicates to the FavoriteUpdate builder.

type FavoriteUpdateOne

type FavoriteUpdateOne struct {
	// contains filtered or unexported fields
}

FavoriteUpdateOne is the builder for updating a single Favorite entity.

func (*FavoriteUpdateOne) ClearNamespace

func (fuo *FavoriteUpdateOne) ClearNamespace() *FavoriteUpdateOne

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*FavoriteUpdateOne) ClearNamespaceID

func (fuo *FavoriteUpdateOne) ClearNamespaceID() *FavoriteUpdateOne

ClearNamespaceID clears the value of the "namespace_id" field.

func (*FavoriteUpdateOne) Exec

func (fuo *FavoriteUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FavoriteUpdateOne) ExecX

func (fuo *FavoriteUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteUpdateOne) Mutation

func (fuo *FavoriteUpdateOne) Mutation() *FavoriteMutation

Mutation returns the FavoriteMutation object of the builder.

func (*FavoriteUpdateOne) Save

func (fuo *FavoriteUpdateOne) Save(ctx context.Context) (*Favorite, error)

Save executes the query and returns the updated Favorite entity.

func (*FavoriteUpdateOne) SaveX

func (fuo *FavoriteUpdateOne) SaveX(ctx context.Context) *Favorite

SaveX is like Save, but panics if an error occurs.

func (*FavoriteUpdateOne) Select

func (fuo *FavoriteUpdateOne) Select(field string, fields ...string) *FavoriteUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*FavoriteUpdateOne) SetEmail

func (fuo *FavoriteUpdateOne) SetEmail(s string) *FavoriteUpdateOne

SetEmail sets the "email" field.

func (*FavoriteUpdateOne) SetNamespace

func (fuo *FavoriteUpdateOne) SetNamespace(n *Namespace) *FavoriteUpdateOne

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*FavoriteUpdateOne) SetNamespaceID

func (fuo *FavoriteUpdateOne) SetNamespaceID(i int) *FavoriteUpdateOne

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteUpdateOne) SetNillableEmail

func (fuo *FavoriteUpdateOne) SetNillableEmail(s *string) *FavoriteUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*FavoriteUpdateOne) SetNillableNamespaceID

func (fuo *FavoriteUpdateOne) SetNillableNamespaceID(i *int) *FavoriteUpdateOne

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*FavoriteUpdateOne) Where

Where appends a list predicates to the FavoriteUpdate builder.

type FavoriteUpsert

type FavoriteUpsert struct {
	*sql.UpdateSet
}

FavoriteUpsert is the "OnConflict" setter.

func (*FavoriteUpsert) ClearNamespaceID

func (u *FavoriteUpsert) ClearNamespaceID() *FavoriteUpsert

ClearNamespaceID clears the value of the "namespace_id" field.

func (*FavoriteUpsert) SetEmail

func (u *FavoriteUpsert) SetEmail(v string) *FavoriteUpsert

SetEmail sets the "email" field.

func (*FavoriteUpsert) SetNamespaceID

func (u *FavoriteUpsert) SetNamespaceID(v int) *FavoriteUpsert

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteUpsert) UpdateEmail

func (u *FavoriteUpsert) UpdateEmail() *FavoriteUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*FavoriteUpsert) UpdateNamespaceID

func (u *FavoriteUpsert) UpdateNamespaceID() *FavoriteUpsert

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

type FavoriteUpsertBulk

type FavoriteUpsertBulk struct {
	// contains filtered or unexported fields
}

FavoriteUpsertBulk is the builder for "upsert"-ing a bulk of Favorite nodes.

func (*FavoriteUpsertBulk) ClearNamespaceID

func (u *FavoriteUpsertBulk) ClearNamespaceID() *FavoriteUpsertBulk

ClearNamespaceID clears the value of the "namespace_id" field.

func (*FavoriteUpsertBulk) DoNothing

func (u *FavoriteUpsertBulk) DoNothing() *FavoriteUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FavoriteUpsertBulk) Exec

func (u *FavoriteUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FavoriteUpsertBulk) ExecX

func (u *FavoriteUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Favorite.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*FavoriteUpsertBulk) SetEmail

SetEmail sets the "email" field.

func (*FavoriteUpsertBulk) SetNamespaceID

func (u *FavoriteUpsertBulk) SetNamespaceID(v int) *FavoriteUpsertBulk

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteUpsertBulk) Update

func (u *FavoriteUpsertBulk) Update(set func(*FavoriteUpsert)) *FavoriteUpsertBulk

Update allows overriding fields `UPDATE` values. See the FavoriteCreateBulk.OnConflict documentation for more info.

func (*FavoriteUpsertBulk) UpdateEmail

func (u *FavoriteUpsertBulk) UpdateEmail() *FavoriteUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*FavoriteUpsertBulk) UpdateNamespaceID

func (u *FavoriteUpsertBulk) UpdateNamespaceID() *FavoriteUpsertBulk

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*FavoriteUpsertBulk) UpdateNewValues

func (u *FavoriteUpsertBulk) UpdateNewValues() *FavoriteUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Favorite.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type FavoriteUpsertOne

type FavoriteUpsertOne struct {
	// contains filtered or unexported fields
}

FavoriteUpsertOne is the builder for "upsert"-ing

one Favorite node.

func (*FavoriteUpsertOne) ClearNamespaceID

func (u *FavoriteUpsertOne) ClearNamespaceID() *FavoriteUpsertOne

ClearNamespaceID clears the value of the "namespace_id" field.

func (*FavoriteUpsertOne) DoNothing

func (u *FavoriteUpsertOne) DoNothing() *FavoriteUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FavoriteUpsertOne) Exec

func (u *FavoriteUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FavoriteUpsertOne) ExecX

func (u *FavoriteUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FavoriteUpsertOne) ID

func (u *FavoriteUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*FavoriteUpsertOne) IDX

func (u *FavoriteUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*FavoriteUpsertOne) Ignore

func (u *FavoriteUpsertOne) Ignore() *FavoriteUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Favorite.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*FavoriteUpsertOne) SetEmail

func (u *FavoriteUpsertOne) SetEmail(v string) *FavoriteUpsertOne

SetEmail sets the "email" field.

func (*FavoriteUpsertOne) SetNamespaceID

func (u *FavoriteUpsertOne) SetNamespaceID(v int) *FavoriteUpsertOne

SetNamespaceID sets the "namespace_id" field.

func (*FavoriteUpsertOne) Update

func (u *FavoriteUpsertOne) Update(set func(*FavoriteUpsert)) *FavoriteUpsertOne

Update allows overriding fields `UPDATE` values. See the FavoriteCreate.OnConflict documentation for more info.

func (*FavoriteUpsertOne) UpdateEmail

func (u *FavoriteUpsertOne) UpdateEmail() *FavoriteUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*FavoriteUpsertOne) UpdateNamespaceID

func (u *FavoriteUpsertOne) UpdateNamespaceID() *FavoriteUpsertOne

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*FavoriteUpsertOne) UpdateNewValues

func (u *FavoriteUpsertOne) UpdateNewValues() *FavoriteUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Favorite.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type Favorites

type Favorites []*Favorite

Favorites is a parsable slice of Favorite.

type File

type File struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// UploadType holds the value of the "upload_type" field.
	UploadType schematype.UploadType `json:"upload_type,omitempty"`
	// 文件全路径
	Path string `json:"path,omitempty"`
	// 文件大小
	Size uint64 `json:"size,omitempty"`
	// 用户名称
	Username string `json:"username,omitempty"`
	// Namespace holds the value of the "namespace" field.
	Namespace string `json:"namespace,omitempty"`
	// Pod holds the value of the "pod" field.
	Pod string `json:"pod,omitempty"`
	// Container holds the value of the "container" field.
	Container string `json:"container,omitempty"`
	// 容器中的文件路径
	ContainerPath string `json:"container_path,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FileQuery when eager-loading is set.
	Edges FileEdges `json:"edges"`
	// contains filtered or unexported fields
}

File is the model entity for the File schema.

func (*File) QueryEvents

func (f *File) QueryEvents() *EventQuery

QueryEvents queries the "events" edge of the File entity.

func (*File) String

func (f *File) String() string

String implements the fmt.Stringer.

func (*File) Unwrap

func (f *File) Unwrap() *File

Unwrap unwraps the File 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 (*File) Update

func (f *File) Update() *FileUpdateOne

Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.

func (*File) Value

func (f *File) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the File. This includes values selected through modifiers, order, etc.

type FileClient

type FileClient struct {
	// contains filtered or unexported fields
}

FileClient is a client for the File schema.

func NewFileClient

func NewFileClient(c config) *FileClient

NewFileClient returns a client for the File from the given config.

func (*FileClient) Create

func (c *FileClient) Create() *FileCreate

Create returns a builder for creating a File entity.

func (*FileClient) CreateBulk

func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk

CreateBulk returns a builder for creating a bulk of File entities.

func (*FileClient) Delete

func (c *FileClient) Delete() *FileDelete

Delete returns a delete builder for File.

func (*FileClient) DeleteOne

func (c *FileClient) DeleteOne(f *File) *FileDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*FileClient) DeleteOneID

func (c *FileClient) DeleteOneID(id int) *FileDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*FileClient) Get

func (c *FileClient) Get(ctx context.Context, id int) (*File, error)

Get returns a File entity by its id.

func (*FileClient) GetX

func (c *FileClient) GetX(ctx context.Context, id int) *File

GetX is like Get, but panics if an error occurs.

func (*FileClient) Hooks

func (c *FileClient) Hooks() []Hook

Hooks returns the client hooks.

func (*FileClient) Intercept

func (c *FileClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.

func (*FileClient) Interceptors

func (c *FileClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*FileClient) MapCreateBulk

func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk

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 (*FileClient) Query

func (c *FileClient) Query() *FileQuery

Query returns a query builder for File.

func (*FileClient) QueryEvents

func (c *FileClient) QueryEvents(f *File) *EventQuery

QueryEvents queries the events edge of a File.

func (*FileClient) Update

func (c *FileClient) Update() *FileUpdate

Update returns an update builder for File.

func (*FileClient) UpdateOne

func (c *FileClient) UpdateOne(f *File) *FileUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FileClient) UpdateOneID

func (c *FileClient) UpdateOneID(id int) *FileUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FileClient) Use

func (c *FileClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.

type FileCreate

type FileCreate struct {
	// contains filtered or unexported fields
}

FileCreate is the builder for creating a File entity.

func (*FileCreate) AddEventIDs

func (fc *FileCreate) AddEventIDs(ids ...int) *FileCreate

AddEventIDs adds the "events" edge to the Event entity by IDs.

func (*FileCreate) AddEvents

func (fc *FileCreate) AddEvents(e ...*Event) *FileCreate

AddEvents adds the "events" edges to the Event entity.

func (*FileCreate) Exec

func (fc *FileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileCreate) ExecX

func (fc *FileCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileCreate) Mutation

func (fc *FileCreate) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileCreate) OnConflict

func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.File.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FileUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*FileCreate) OnConflictColumns

func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.File.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileCreate) Save

func (fc *FileCreate) Save(ctx context.Context) (*File, error)

Save creates the File in the database.

func (*FileCreate) SaveX

func (fc *FileCreate) SaveX(ctx context.Context) *File

SaveX calls Save and panics if Save returns an error.

func (*FileCreate) SetContainer

func (fc *FileCreate) SetContainer(s string) *FileCreate

SetContainer sets the "container" field.

func (*FileCreate) SetContainerPath

func (fc *FileCreate) SetContainerPath(s string) *FileCreate

SetContainerPath sets the "container_path" field.

func (*FileCreate) SetCreatedAt

func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate

SetCreatedAt sets the "created_at" field.

func (*FileCreate) SetDeletedAt

func (fc *FileCreate) SetDeletedAt(t time.Time) *FileCreate

SetDeletedAt sets the "deleted_at" field.

func (*FileCreate) SetNamespace

func (fc *FileCreate) SetNamespace(s string) *FileCreate

SetNamespace sets the "namespace" field.

func (*FileCreate) SetNillableContainer

func (fc *FileCreate) SetNillableContainer(s *string) *FileCreate

SetNillableContainer sets the "container" field if the given value is not nil.

func (*FileCreate) SetNillableContainerPath

func (fc *FileCreate) SetNillableContainerPath(s *string) *FileCreate

SetNillableContainerPath sets the "container_path" field if the given value is not nil.

func (*FileCreate) SetNillableCreatedAt

func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*FileCreate) SetNillableDeletedAt

func (fc *FileCreate) SetNillableDeletedAt(t *time.Time) *FileCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*FileCreate) SetNillableNamespace

func (fc *FileCreate) SetNillableNamespace(s *string) *FileCreate

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*FileCreate) SetNillablePod

func (fc *FileCreate) SetNillablePod(s *string) *FileCreate

SetNillablePod sets the "pod" field if the given value is not nil.

func (*FileCreate) SetNillableSize

func (fc *FileCreate) SetNillableSize(u *uint64) *FileCreate

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileCreate) SetNillableUpdatedAt

func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*FileCreate) SetNillableUploadType

func (fc *FileCreate) SetNillableUploadType(st *schematype.UploadType) *FileCreate

SetNillableUploadType sets the "upload_type" field if the given value is not nil.

func (*FileCreate) SetNillableUsername

func (fc *FileCreate) SetNillableUsername(s *string) *FileCreate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*FileCreate) SetPath

func (fc *FileCreate) SetPath(s string) *FileCreate

SetPath sets the "path" field.

func (*FileCreate) SetPod

func (fc *FileCreate) SetPod(s string) *FileCreate

SetPod sets the "pod" field.

func (*FileCreate) SetSize

func (fc *FileCreate) SetSize(u uint64) *FileCreate

SetSize sets the "size" field.

func (*FileCreate) SetUpdatedAt

func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate

SetUpdatedAt sets the "updated_at" field.

func (*FileCreate) SetUploadType

func (fc *FileCreate) SetUploadType(st schematype.UploadType) *FileCreate

SetUploadType sets the "upload_type" field.

func (*FileCreate) SetUsername

func (fc *FileCreate) SetUsername(s string) *FileCreate

SetUsername sets the "username" field.

type FileCreateBulk

type FileCreateBulk struct {
	// contains filtered or unexported fields
}

FileCreateBulk is the builder for creating many File entities in bulk.

func (*FileCreateBulk) Exec

func (fcb *FileCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileCreateBulk) ExecX

func (fcb *FileCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileCreateBulk) OnConflict

func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.File.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.FileUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*FileCreateBulk) OnConflictColumns

func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.File.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*FileCreateBulk) Save

func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)

Save creates the File entities in the database.

func (*FileCreateBulk) SaveX

func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File

SaveX is like Save, but panics if an error occurs.

type FileDelete

type FileDelete struct {
	// contains filtered or unexported fields
}

FileDelete is the builder for deleting a File entity.

func (*FileDelete) Exec

func (fd *FileDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*FileDelete) ExecX

func (fd *FileDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*FileDelete) Where

func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete

Where appends a list predicates to the FileDelete builder.

type FileDeleteOne

type FileDeleteOne struct {
	// contains filtered or unexported fields
}

FileDeleteOne is the builder for deleting a single File entity.

func (*FileDeleteOne) Exec

func (fdo *FileDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FileDeleteOne) ExecX

func (fdo *FileDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileDeleteOne) Where

func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne

Where appends a list predicates to the FileDelete builder.

type FileEdges

type FileEdges struct {
	// Events holds the value of the events edge.
	Events []*Event `json:"events,omitempty"`
	// contains filtered or unexported fields
}

FileEdges holds the relations/edges for other nodes in the graph.

func (FileEdges) EventsOrErr

func (e FileEdges) EventsOrErr() ([]*Event, error)

EventsOrErr returns the Events value or an error if the edge was not loaded in eager-loading.

type FileGroupBy

type FileGroupBy struct {
	// contains filtered or unexported fields
}

FileGroupBy is the group-by builder for File entities.

func (*FileGroupBy) Aggregate

func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*FileGroupBy) Bool

func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) BoolX

func (s *FileGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileGroupBy) Bools

func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) BoolsX

func (s *FileGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileGroupBy) Float64

func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) Float64X

func (s *FileGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileGroupBy) Float64s

func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) Float64sX

func (s *FileGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileGroupBy) Int

func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) IntX

func (s *FileGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileGroupBy) Ints

func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) IntsX

func (s *FileGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileGroupBy) Scan

func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileGroupBy) ScanX

func (s *FileGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileGroupBy) String

func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) StringX

func (s *FileGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileGroupBy) Strings

func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileGroupBy) StringsX

func (s *FileGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileMutation

type FileMutation struct {
	// contains filtered or unexported fields
}

FileMutation represents an operation that mutates the File nodes in the graph.

func (*FileMutation) AddEventIDs

func (m *FileMutation) AddEventIDs(ids ...int)

AddEventIDs adds the "events" edge to the Event entity by ids.

func (*FileMutation) AddField

func (m *FileMutation) 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 (*FileMutation) AddSize

func (m *FileMutation) AddSize(u int64)

AddSize adds u to the "size" field.

func (*FileMutation) AddedEdges

func (m *FileMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*FileMutation) AddedField

func (m *FileMutation) 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 (*FileMutation) AddedFields

func (m *FileMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*FileMutation) AddedIDs

func (m *FileMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*FileMutation) AddedSize

func (m *FileMutation) AddedSize() (r int64, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*FileMutation) ClearDeletedAt

func (m *FileMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FileMutation) ClearEdge

func (m *FileMutation) 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 (*FileMutation) ClearEvents

func (m *FileMutation) ClearEvents()

ClearEvents clears the "events" edge to the Event entity.

func (*FileMutation) ClearField

func (m *FileMutation) 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 (*FileMutation) ClearedEdges

func (m *FileMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*FileMutation) ClearedFields

func (m *FileMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (FileMutation) Client

func (m FileMutation) 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 (*FileMutation) Container

func (m *FileMutation) Container() (r string, exists bool)

Container returns the value of the "container" field in the mutation.

func (*FileMutation) ContainerPath

func (m *FileMutation) ContainerPath() (r string, exists bool)

ContainerPath returns the value of the "container_path" field in the mutation.

func (*FileMutation) CreatedAt

func (m *FileMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*FileMutation) DeletedAt

func (m *FileMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*FileMutation) DeletedAtCleared

func (m *FileMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*FileMutation) EdgeCleared

func (m *FileMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*FileMutation) EventsCleared

func (m *FileMutation) EventsCleared() bool

EventsCleared reports if the "events" edge to the Event entity was cleared.

func (*FileMutation) EventsIDs

func (m *FileMutation) EventsIDs() (ids []int)

EventsIDs returns the "events" edge IDs in the mutation.

func (*FileMutation) Field

func (m *FileMutation) 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 (*FileMutation) FieldCleared

func (m *FileMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*FileMutation) Fields

func (m *FileMutation) 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 (*FileMutation) ID

func (m *FileMutation) 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 (*FileMutation) IDs

func (m *FileMutation) 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 (*FileMutation) Namespace

func (m *FileMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*FileMutation) OldContainer

func (m *FileMutation) OldContainer(ctx context.Context) (v string, err error)

OldContainer returns the old "container" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldContainerPath

func (m *FileMutation) OldContainerPath(ctx context.Context) (v string, err error)

OldContainerPath returns the old "container_path" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldCreatedAt

func (m *FileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldDeletedAt

func (m *FileMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldField

func (m *FileMutation) 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 (*FileMutation) OldNamespace

func (m *FileMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldPath

func (m *FileMutation) OldPath(ctx context.Context) (v string, err error)

OldPath returns the old "path" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldPod

func (m *FileMutation) OldPod(ctx context.Context) (v string, err error)

OldPod returns the old "pod" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldSize

func (m *FileMutation) OldSize(ctx context.Context) (v uint64, err error)

OldSize returns the old "size" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldUpdatedAt

func (m *FileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldUploadType

func (m *FileMutation) OldUploadType(ctx context.Context) (v schematype.UploadType, err error)

OldUploadType returns the old "upload_type" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) OldUsername

func (m *FileMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*FileMutation) Op

func (m *FileMutation) Op() Op

Op returns the operation name.

func (*FileMutation) Path

func (m *FileMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*FileMutation) Pod

func (m *FileMutation) Pod() (r string, exists bool)

Pod returns the value of the "pod" field in the mutation.

func (*FileMutation) RemoveEventIDs

func (m *FileMutation) RemoveEventIDs(ids ...int)

RemoveEventIDs removes the "events" edge to the Event entity by IDs.

func (*FileMutation) RemovedEdges

func (m *FileMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*FileMutation) RemovedEventsIDs

func (m *FileMutation) RemovedEventsIDs() (ids []int)

RemovedEvents returns the removed IDs of the "events" edge to the Event entity.

func (*FileMutation) RemovedIDs

func (m *FileMutation) 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 (*FileMutation) ResetContainer

func (m *FileMutation) ResetContainer()

ResetContainer resets all changes to the "container" field.

func (*FileMutation) ResetContainerPath

func (m *FileMutation) ResetContainerPath()

ResetContainerPath resets all changes to the "container_path" field.

func (*FileMutation) ResetCreatedAt

func (m *FileMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*FileMutation) ResetDeletedAt

func (m *FileMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*FileMutation) ResetEdge

func (m *FileMutation) 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 (*FileMutation) ResetEvents

func (m *FileMutation) ResetEvents()

ResetEvents resets all changes to the "events" edge.

func (*FileMutation) ResetField

func (m *FileMutation) 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 (*FileMutation) ResetNamespace

func (m *FileMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*FileMutation) ResetPath

func (m *FileMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*FileMutation) ResetPod

func (m *FileMutation) ResetPod()

ResetPod resets all changes to the "pod" field.

func (*FileMutation) ResetSize

func (m *FileMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*FileMutation) ResetUpdatedAt

func (m *FileMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*FileMutation) ResetUploadType

func (m *FileMutation) ResetUploadType()

ResetUploadType resets all changes to the "upload_type" field.

func (*FileMutation) ResetUsername

func (m *FileMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*FileMutation) SetContainer

func (m *FileMutation) SetContainer(s string)

SetContainer sets the "container" field.

func (*FileMutation) SetContainerPath

func (m *FileMutation) SetContainerPath(s string)

SetContainerPath sets the "container_path" field.

func (*FileMutation) SetCreatedAt

func (m *FileMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*FileMutation) SetDeletedAt

func (m *FileMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*FileMutation) SetField

func (m *FileMutation) 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 (*FileMutation) SetNamespace

func (m *FileMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*FileMutation) SetOp

func (m *FileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*FileMutation) SetPath

func (m *FileMutation) SetPath(s string)

SetPath sets the "path" field.

func (*FileMutation) SetPod

func (m *FileMutation) SetPod(s string)

SetPod sets the "pod" field.

func (*FileMutation) SetSize

func (m *FileMutation) SetSize(u uint64)

SetSize sets the "size" field.

func (*FileMutation) SetUpdatedAt

func (m *FileMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*FileMutation) SetUploadType

func (m *FileMutation) SetUploadType(st schematype.UploadType)

SetUploadType sets the "upload_type" field.

func (*FileMutation) SetUsername

func (m *FileMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*FileMutation) Size

func (m *FileMutation) Size() (r uint64, exists bool)

Size returns the value of the "size" field in the mutation.

func (FileMutation) Tx

func (m FileMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*FileMutation) Type

func (m *FileMutation) Type() string

Type returns the node type of this mutation (File).

func (*FileMutation) UpdatedAt

func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*FileMutation) UploadType

func (m *FileMutation) UploadType() (r schematype.UploadType, exists bool)

UploadType returns the value of the "upload_type" field in the mutation.

func (*FileMutation) Username

func (m *FileMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*FileMutation) Where

func (m *FileMutation) Where(ps ...predicate.File)

Where appends a list predicates to the FileMutation builder.

func (*FileMutation) WhereP

func (m *FileMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type FileQuery

type FileQuery struct {
	// contains filtered or unexported fields
}

FileQuery is the builder for querying File entities.

func (*FileQuery) Aggregate

func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect

Aggregate returns a FileSelect configured with the given aggregations.

func (*FileQuery) All

func (fq *FileQuery) All(ctx context.Context) ([]*File, error)

All executes the query and returns a list of Files.

func (*FileQuery) AllX

func (fq *FileQuery) AllX(ctx context.Context) []*File

AllX is like All, but panics if an error occurs.

func (*FileQuery) Clone

func (fq *FileQuery) Clone() *FileQuery

Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*FileQuery) Count

func (fq *FileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FileQuery) CountX

func (fq *FileQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*FileQuery) Exist

func (fq *FileQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*FileQuery) ExistX

func (fq *FileQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*FileQuery) First

func (fq *FileQuery) First(ctx context.Context) (*File, error)

First returns the first File entity from the query. Returns a *NotFoundError when no File was found.

func (*FileQuery) FirstID

func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.

func (*FileQuery) FirstIDX

func (fq *FileQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*FileQuery) FirstX

func (fq *FileQuery) FirstX(ctx context.Context) *File

FirstX is like First, but panics if an error occurs.

func (*FileQuery) ForShare

func (fq *FileQuery) ForShare(opts ...sql.LockOption) *FileQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*FileQuery) ForUpdate

func (fq *FileQuery) ForUpdate(opts ...sql.LockOption) *FileQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*FileQuery) GroupBy

func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.File.Query().
	GroupBy(file.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FileQuery) IDs

func (fq *FileQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of File IDs.

func (*FileQuery) IDsX

func (fq *FileQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*FileQuery) Limit

func (fq *FileQuery) Limit(limit int) *FileQuery

Limit the number of records to be returned by this query.

func (*FileQuery) Offset

func (fq *FileQuery) Offset(offset int) *FileQuery

Offset to start from.

func (*FileQuery) Only

func (fq *FileQuery) Only(ctx context.Context) (*File, error)

Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.

func (*FileQuery) OnlyID

func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.

func (*FileQuery) OnlyIDX

func (fq *FileQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*FileQuery) OnlyX

func (fq *FileQuery) OnlyX(ctx context.Context) *File

OnlyX is like Only, but panics if an error occurs.

func (*FileQuery) Order

func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery

Order specifies how the records should be ordered.

func (*FileQuery) QueryEvents

func (fq *FileQuery) QueryEvents() *EventQuery

QueryEvents chains the current query on the "events" edge.

func (*FileQuery) Select

func (fq *FileQuery) Select(fields ...string) *FileSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.File.Query().
	Select(file.FieldCreatedAt).
	Scan(ctx, &v)

func (*FileQuery) Unique

func (fq *FileQuery) Unique(unique bool) *FileQuery

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 (*FileQuery) Where

func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery

Where adds a new predicate for the FileQuery builder.

func (*FileQuery) WithEvents

func (fq *FileQuery) WithEvents(opts ...func(*EventQuery)) *FileQuery

WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.

type FileSelect

type FileSelect struct {
	*FileQuery
	// contains filtered or unexported fields
}

FileSelect is the builder for selecting fields of File entities.

func (*FileSelect) Aggregate

func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect

Aggregate adds the given aggregation functions to the selector query.

func (*FileSelect) Bool

func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*FileSelect) BoolX

func (s *FileSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*FileSelect) Bools

func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*FileSelect) BoolsX

func (s *FileSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*FileSelect) Float64

func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*FileSelect) Float64X

func (s *FileSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*FileSelect) Float64s

func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*FileSelect) Float64sX

func (s *FileSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*FileSelect) Int

func (s *FileSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*FileSelect) IntX

func (s *FileSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*FileSelect) Ints

func (s *FileSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*FileSelect) IntsX

func (s *FileSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*FileSelect) Scan

func (fs *FileSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*FileSelect) ScanX

func (s *FileSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*FileSelect) String

func (s *FileSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*FileSelect) StringX

func (s *FileSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*FileSelect) Strings

func (s *FileSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*FileSelect) StringsX

func (s *FileSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type FileUpdate

type FileUpdate struct {
	// contains filtered or unexported fields
}

FileUpdate is the builder for updating File entities.

func (*FileUpdate) AddEventIDs

func (fu *FileUpdate) AddEventIDs(ids ...int) *FileUpdate

AddEventIDs adds the "events" edge to the Event entity by IDs.

func (*FileUpdate) AddEvents

func (fu *FileUpdate) AddEvents(e ...*Event) *FileUpdate

AddEvents adds the "events" edges to the Event entity.

func (*FileUpdate) AddSize

func (fu *FileUpdate) AddSize(u int64) *FileUpdate

AddSize adds u to the "size" field.

func (*FileUpdate) ClearDeletedAt

func (fu *FileUpdate) ClearDeletedAt() *FileUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FileUpdate) ClearEvents

func (fu *FileUpdate) ClearEvents() *FileUpdate

ClearEvents clears all "events" edges to the Event entity.

func (*FileUpdate) Exec

func (fu *FileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpdate) ExecX

func (fu *FileUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpdate) Mutation

func (fu *FileUpdate) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileUpdate) RemoveEventIDs

func (fu *FileUpdate) RemoveEventIDs(ids ...int) *FileUpdate

RemoveEventIDs removes the "events" edge to Event entities by IDs.

func (*FileUpdate) RemoveEvents

func (fu *FileUpdate) RemoveEvents(e ...*Event) *FileUpdate

RemoveEvents removes "events" edges to Event entities.

func (*FileUpdate) Save

func (fu *FileUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*FileUpdate) SaveX

func (fu *FileUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*FileUpdate) SetContainer

func (fu *FileUpdate) SetContainer(s string) *FileUpdate

SetContainer sets the "container" field.

func (*FileUpdate) SetContainerPath

func (fu *FileUpdate) SetContainerPath(s string) *FileUpdate

SetContainerPath sets the "container_path" field.

func (*FileUpdate) SetDeletedAt

func (fu *FileUpdate) SetDeletedAt(t time.Time) *FileUpdate

SetDeletedAt sets the "deleted_at" field.

func (*FileUpdate) SetNamespace

func (fu *FileUpdate) SetNamespace(s string) *FileUpdate

SetNamespace sets the "namespace" field.

func (*FileUpdate) SetNillableContainer

func (fu *FileUpdate) SetNillableContainer(s *string) *FileUpdate

SetNillableContainer sets the "container" field if the given value is not nil.

func (*FileUpdate) SetNillableContainerPath

func (fu *FileUpdate) SetNillableContainerPath(s *string) *FileUpdate

SetNillableContainerPath sets the "container_path" field if the given value is not nil.

func (*FileUpdate) SetNillableDeletedAt

func (fu *FileUpdate) SetNillableDeletedAt(t *time.Time) *FileUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*FileUpdate) SetNillableNamespace

func (fu *FileUpdate) SetNillableNamespace(s *string) *FileUpdate

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*FileUpdate) SetNillablePath

func (fu *FileUpdate) SetNillablePath(s *string) *FileUpdate

SetNillablePath sets the "path" field if the given value is not nil.

func (*FileUpdate) SetNillablePod

func (fu *FileUpdate) SetNillablePod(s *string) *FileUpdate

SetNillablePod sets the "pod" field if the given value is not nil.

func (*FileUpdate) SetNillableSize

func (fu *FileUpdate) SetNillableSize(u *uint64) *FileUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileUpdate) SetNillableUploadType

func (fu *FileUpdate) SetNillableUploadType(st *schematype.UploadType) *FileUpdate

SetNillableUploadType sets the "upload_type" field if the given value is not nil.

func (*FileUpdate) SetNillableUsername

func (fu *FileUpdate) SetNillableUsername(s *string) *FileUpdate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*FileUpdate) SetPath

func (fu *FileUpdate) SetPath(s string) *FileUpdate

SetPath sets the "path" field.

func (*FileUpdate) SetPod

func (fu *FileUpdate) SetPod(s string) *FileUpdate

SetPod sets the "pod" field.

func (*FileUpdate) SetSize

func (fu *FileUpdate) SetSize(u uint64) *FileUpdate

SetSize sets the "size" field.

func (*FileUpdate) SetUpdatedAt

func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate

SetUpdatedAt sets the "updated_at" field.

func (*FileUpdate) SetUploadType

func (fu *FileUpdate) SetUploadType(st schematype.UploadType) *FileUpdate

SetUploadType sets the "upload_type" field.

func (*FileUpdate) SetUsername

func (fu *FileUpdate) SetUsername(s string) *FileUpdate

SetUsername sets the "username" field.

func (*FileUpdate) Where

func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate

Where appends a list predicates to the FileUpdate builder.

type FileUpdateOne

type FileUpdateOne struct {
	// contains filtered or unexported fields
}

FileUpdateOne is the builder for updating a single File entity.

func (*FileUpdateOne) AddEventIDs

func (fuo *FileUpdateOne) AddEventIDs(ids ...int) *FileUpdateOne

AddEventIDs adds the "events" edge to the Event entity by IDs.

func (*FileUpdateOne) AddEvents

func (fuo *FileUpdateOne) AddEvents(e ...*Event) *FileUpdateOne

AddEvents adds the "events" edges to the Event entity.

func (*FileUpdateOne) AddSize

func (fuo *FileUpdateOne) AddSize(u int64) *FileUpdateOne

AddSize adds u to the "size" field.

func (*FileUpdateOne) ClearDeletedAt

func (fuo *FileUpdateOne) ClearDeletedAt() *FileUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FileUpdateOne) ClearEvents

func (fuo *FileUpdateOne) ClearEvents() *FileUpdateOne

ClearEvents clears all "events" edges to the Event entity.

func (*FileUpdateOne) Exec

func (fuo *FileUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FileUpdateOne) ExecX

func (fuo *FileUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpdateOne) Mutation

func (fuo *FileUpdateOne) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileUpdateOne) RemoveEventIDs

func (fuo *FileUpdateOne) RemoveEventIDs(ids ...int) *FileUpdateOne

RemoveEventIDs removes the "events" edge to Event entities by IDs.

func (*FileUpdateOne) RemoveEvents

func (fuo *FileUpdateOne) RemoveEvents(e ...*Event) *FileUpdateOne

RemoveEvents removes "events" edges to Event entities.

func (*FileUpdateOne) Save

func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)

Save executes the query and returns the updated File entity.

func (*FileUpdateOne) SaveX

func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File

SaveX is like Save, but panics if an error occurs.

func (*FileUpdateOne) Select

func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*FileUpdateOne) SetContainer

func (fuo *FileUpdateOne) SetContainer(s string) *FileUpdateOne

SetContainer sets the "container" field.

func (*FileUpdateOne) SetContainerPath

func (fuo *FileUpdateOne) SetContainerPath(s string) *FileUpdateOne

SetContainerPath sets the "container_path" field.

func (*FileUpdateOne) SetDeletedAt

func (fuo *FileUpdateOne) SetDeletedAt(t time.Time) *FileUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*FileUpdateOne) SetNamespace

func (fuo *FileUpdateOne) SetNamespace(s string) *FileUpdateOne

SetNamespace sets the "namespace" field.

func (*FileUpdateOne) SetNillableContainer

func (fuo *FileUpdateOne) SetNillableContainer(s *string) *FileUpdateOne

SetNillableContainer sets the "container" field if the given value is not nil.

func (*FileUpdateOne) SetNillableContainerPath

func (fuo *FileUpdateOne) SetNillableContainerPath(s *string) *FileUpdateOne

SetNillableContainerPath sets the "container_path" field if the given value is not nil.

func (*FileUpdateOne) SetNillableDeletedAt

func (fuo *FileUpdateOne) SetNillableDeletedAt(t *time.Time) *FileUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*FileUpdateOne) SetNillableNamespace

func (fuo *FileUpdateOne) SetNillableNamespace(s *string) *FileUpdateOne

SetNillableNamespace sets the "namespace" field if the given value is not nil.

func (*FileUpdateOne) SetNillablePath

func (fuo *FileUpdateOne) SetNillablePath(s *string) *FileUpdateOne

SetNillablePath sets the "path" field if the given value is not nil.

func (*FileUpdateOne) SetNillablePod

func (fuo *FileUpdateOne) SetNillablePod(s *string) *FileUpdateOne

SetNillablePod sets the "pod" field if the given value is not nil.

func (*FileUpdateOne) SetNillableSize

func (fuo *FileUpdateOne) SetNillableSize(u *uint64) *FileUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileUpdateOne) SetNillableUploadType

func (fuo *FileUpdateOne) SetNillableUploadType(st *schematype.UploadType) *FileUpdateOne

SetNillableUploadType sets the "upload_type" field if the given value is not nil.

func (*FileUpdateOne) SetNillableUsername

func (fuo *FileUpdateOne) SetNillableUsername(s *string) *FileUpdateOne

SetNillableUsername sets the "username" field if the given value is not nil.

func (*FileUpdateOne) SetPath

func (fuo *FileUpdateOne) SetPath(s string) *FileUpdateOne

SetPath sets the "path" field.

func (*FileUpdateOne) SetPod

func (fuo *FileUpdateOne) SetPod(s string) *FileUpdateOne

SetPod sets the "pod" field.

func (*FileUpdateOne) SetSize

func (fuo *FileUpdateOne) SetSize(u uint64) *FileUpdateOne

SetSize sets the "size" field.

func (*FileUpdateOne) SetUpdatedAt

func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*FileUpdateOne) SetUploadType

func (fuo *FileUpdateOne) SetUploadType(st schematype.UploadType) *FileUpdateOne

SetUploadType sets the "upload_type" field.

func (*FileUpdateOne) SetUsername

func (fuo *FileUpdateOne) SetUsername(s string) *FileUpdateOne

SetUsername sets the "username" field.

func (*FileUpdateOne) Where

func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne

Where appends a list predicates to the FileUpdate builder.

type FileUpsert

type FileUpsert struct {
	*sql.UpdateSet
}

FileUpsert is the "OnConflict" setter.

func (*FileUpsert) AddSize

func (u *FileUpsert) AddSize(v uint64) *FileUpsert

AddSize adds v to the "size" field.

func (*FileUpsert) ClearDeletedAt

func (u *FileUpsert) ClearDeletedAt() *FileUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FileUpsert) SetContainer

func (u *FileUpsert) SetContainer(v string) *FileUpsert

SetContainer sets the "container" field.

func (*FileUpsert) SetContainerPath

func (u *FileUpsert) SetContainerPath(v string) *FileUpsert

SetContainerPath sets the "container_path" field.

func (*FileUpsert) SetDeletedAt

func (u *FileUpsert) SetDeletedAt(v time.Time) *FileUpsert

SetDeletedAt sets the "deleted_at" field.

func (*FileUpsert) SetNamespace

func (u *FileUpsert) SetNamespace(v string) *FileUpsert

SetNamespace sets the "namespace" field.

func (*FileUpsert) SetPath

func (u *FileUpsert) SetPath(v string) *FileUpsert

SetPath sets the "path" field.

func (*FileUpsert) SetPod

func (u *FileUpsert) SetPod(v string) *FileUpsert

SetPod sets the "pod" field.

func (*FileUpsert) SetSize

func (u *FileUpsert) SetSize(v uint64) *FileUpsert

SetSize sets the "size" field.

func (*FileUpsert) SetUpdatedAt

func (u *FileUpsert) SetUpdatedAt(v time.Time) *FileUpsert

SetUpdatedAt sets the "updated_at" field.

func (*FileUpsert) SetUploadType

func (u *FileUpsert) SetUploadType(v schematype.UploadType) *FileUpsert

SetUploadType sets the "upload_type" field.

func (*FileUpsert) SetUsername

func (u *FileUpsert) SetUsername(v string) *FileUpsert

SetUsername sets the "username" field.

func (*FileUpsert) UpdateContainer

func (u *FileUpsert) UpdateContainer() *FileUpsert

UpdateContainer sets the "container" field to the value that was provided on create.

func (*FileUpsert) UpdateContainerPath

func (u *FileUpsert) UpdateContainerPath() *FileUpsert

UpdateContainerPath sets the "container_path" field to the value that was provided on create.

func (*FileUpsert) UpdateDeletedAt

func (u *FileUpsert) UpdateDeletedAt() *FileUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*FileUpsert) UpdateNamespace

func (u *FileUpsert) UpdateNamespace() *FileUpsert

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*FileUpsert) UpdatePath

func (u *FileUpsert) UpdatePath() *FileUpsert

UpdatePath sets the "path" field to the value that was provided on create.

func (*FileUpsert) UpdatePod

func (u *FileUpsert) UpdatePod() *FileUpsert

UpdatePod sets the "pod" field to the value that was provided on create.

func (*FileUpsert) UpdateSize

func (u *FileUpsert) UpdateSize() *FileUpsert

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsert) UpdateUpdatedAt

func (u *FileUpsert) UpdateUpdatedAt() *FileUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileUpsert) UpdateUploadType

func (u *FileUpsert) UpdateUploadType() *FileUpsert

UpdateUploadType sets the "upload_type" field to the value that was provided on create.

func (*FileUpsert) UpdateUsername

func (u *FileUpsert) UpdateUsername() *FileUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

type FileUpsertBulk

type FileUpsertBulk struct {
	// contains filtered or unexported fields
}

FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.

func (*FileUpsertBulk) AddSize

func (u *FileUpsertBulk) AddSize(v uint64) *FileUpsertBulk

AddSize adds v to the "size" field.

func (*FileUpsertBulk) ClearDeletedAt

func (u *FileUpsertBulk) ClearDeletedAt() *FileUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FileUpsertBulk) DoNothing

func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileUpsertBulk) Exec

func (u *FileUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpsertBulk) ExecX

func (u *FileUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpsertBulk) Ignore

func (u *FileUpsertBulk) Ignore() *FileUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.File.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*FileUpsertBulk) SetContainer

func (u *FileUpsertBulk) SetContainer(v string) *FileUpsertBulk

SetContainer sets the "container" field.

func (*FileUpsertBulk) SetContainerPath

func (u *FileUpsertBulk) SetContainerPath(v string) *FileUpsertBulk

SetContainerPath sets the "container_path" field.

func (*FileUpsertBulk) SetDeletedAt

func (u *FileUpsertBulk) SetDeletedAt(v time.Time) *FileUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*FileUpsertBulk) SetNamespace

func (u *FileUpsertBulk) SetNamespace(v string) *FileUpsertBulk

SetNamespace sets the "namespace" field.

func (*FileUpsertBulk) SetPath

func (u *FileUpsertBulk) SetPath(v string) *FileUpsertBulk

SetPath sets the "path" field.

func (*FileUpsertBulk) SetPod

func (u *FileUpsertBulk) SetPod(v string) *FileUpsertBulk

SetPod sets the "pod" field.

func (*FileUpsertBulk) SetSize

func (u *FileUpsertBulk) SetSize(v uint64) *FileUpsertBulk

SetSize sets the "size" field.

func (*FileUpsertBulk) SetUpdatedAt

func (u *FileUpsertBulk) SetUpdatedAt(v time.Time) *FileUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*FileUpsertBulk) SetUploadType

func (u *FileUpsertBulk) SetUploadType(v schematype.UploadType) *FileUpsertBulk

SetUploadType sets the "upload_type" field.

func (*FileUpsertBulk) SetUsername

func (u *FileUpsertBulk) SetUsername(v string) *FileUpsertBulk

SetUsername sets the "username" field.

func (*FileUpsertBulk) Update

func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk

Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.

func (*FileUpsertBulk) UpdateContainer

func (u *FileUpsertBulk) UpdateContainer() *FileUpsertBulk

UpdateContainer sets the "container" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateContainerPath

func (u *FileUpsertBulk) UpdateContainerPath() *FileUpsertBulk

UpdateContainerPath sets the "container_path" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateDeletedAt

func (u *FileUpsertBulk) UpdateDeletedAt() *FileUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateNamespace

func (u *FileUpsertBulk) UpdateNamespace() *FileUpsertBulk

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateNewValues

func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.File.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*FileUpsertBulk) UpdatePath

func (u *FileUpsertBulk) UpdatePath() *FileUpsertBulk

UpdatePath sets the "path" field to the value that was provided on create.

func (*FileUpsertBulk) UpdatePod

func (u *FileUpsertBulk) UpdatePod() *FileUpsertBulk

UpdatePod sets the "pod" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateSize

func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateUpdatedAt

func (u *FileUpsertBulk) UpdateUpdatedAt() *FileUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateUploadType

func (u *FileUpsertBulk) UpdateUploadType() *FileUpsertBulk

UpdateUploadType sets the "upload_type" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateUsername

func (u *FileUpsertBulk) UpdateUsername() *FileUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

type FileUpsertOne

type FileUpsertOne struct {
	// contains filtered or unexported fields
}

FileUpsertOne is the builder for "upsert"-ing

one File node.

func (*FileUpsertOne) AddSize

func (u *FileUpsertOne) AddSize(v uint64) *FileUpsertOne

AddSize adds v to the "size" field.

func (*FileUpsertOne) ClearDeletedAt

func (u *FileUpsertOne) ClearDeletedAt() *FileUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FileUpsertOne) DoNothing

func (u *FileUpsertOne) DoNothing() *FileUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*FileUpsertOne) Exec

func (u *FileUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpsertOne) ExecX

func (u *FileUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*FileUpsertOne) ID

func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*FileUpsertOne) IDX

func (u *FileUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*FileUpsertOne) Ignore

func (u *FileUpsertOne) Ignore() *FileUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.File.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*FileUpsertOne) SetContainer

func (u *FileUpsertOne) SetContainer(v string) *FileUpsertOne

SetContainer sets the "container" field.

func (*FileUpsertOne) SetContainerPath

func (u *FileUpsertOne) SetContainerPath(v string) *FileUpsertOne

SetContainerPath sets the "container_path" field.

func (*FileUpsertOne) SetDeletedAt

func (u *FileUpsertOne) SetDeletedAt(v time.Time) *FileUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*FileUpsertOne) SetNamespace

func (u *FileUpsertOne) SetNamespace(v string) *FileUpsertOne

SetNamespace sets the "namespace" field.

func (*FileUpsertOne) SetPath

func (u *FileUpsertOne) SetPath(v string) *FileUpsertOne

SetPath sets the "path" field.

func (*FileUpsertOne) SetPod

func (u *FileUpsertOne) SetPod(v string) *FileUpsertOne

SetPod sets the "pod" field.

func (*FileUpsertOne) SetSize

func (u *FileUpsertOne) SetSize(v uint64) *FileUpsertOne

SetSize sets the "size" field.

func (*FileUpsertOne) SetUpdatedAt

func (u *FileUpsertOne) SetUpdatedAt(v time.Time) *FileUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*FileUpsertOne) SetUploadType

func (u *FileUpsertOne) SetUploadType(v schematype.UploadType) *FileUpsertOne

SetUploadType sets the "upload_type" field.

func (*FileUpsertOne) SetUsername

func (u *FileUpsertOne) SetUsername(v string) *FileUpsertOne

SetUsername sets the "username" field.

func (*FileUpsertOne) Update

func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne

Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.

func (*FileUpsertOne) UpdateContainer

func (u *FileUpsertOne) UpdateContainer() *FileUpsertOne

UpdateContainer sets the "container" field to the value that was provided on create.

func (*FileUpsertOne) UpdateContainerPath

func (u *FileUpsertOne) UpdateContainerPath() *FileUpsertOne

UpdateContainerPath sets the "container_path" field to the value that was provided on create.

func (*FileUpsertOne) UpdateDeletedAt

func (u *FileUpsertOne) UpdateDeletedAt() *FileUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*FileUpsertOne) UpdateNamespace

func (u *FileUpsertOne) UpdateNamespace() *FileUpsertOne

UpdateNamespace sets the "namespace" field to the value that was provided on create.

func (*FileUpsertOne) UpdateNewValues

func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.File.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*FileUpsertOne) UpdatePath

func (u *FileUpsertOne) UpdatePath() *FileUpsertOne

UpdatePath sets the "path" field to the value that was provided on create.

func (*FileUpsertOne) UpdatePod

func (u *FileUpsertOne) UpdatePod() *FileUpsertOne

UpdatePod sets the "pod" field to the value that was provided on create.

func (*FileUpsertOne) UpdateSize

func (u *FileUpsertOne) UpdateSize() *FileUpsertOne

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsertOne) UpdateUpdatedAt

func (u *FileUpsertOne) UpdateUpdatedAt() *FileUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*FileUpsertOne) UpdateUploadType

func (u *FileUpsertOne) UpdateUploadType() *FileUpsertOne

UpdateUploadType sets the "upload_type" field to the value that was provided on create.

func (*FileUpsertOne) UpdateUsername

func (u *FileUpsertOne) UpdateUsername() *FileUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

type Files

type Files []*File

Files is a parsable slice of File.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type Member

type Member struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// NamespaceID holds the value of the "namespace_id" field.
	NamespaceID int `json:"namespace_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MemberQuery when eager-loading is set.
	Edges MemberEdges `json:"edges"`
	// contains filtered or unexported fields
}

Member is the model entity for the Member schema.

func (*Member) QueryNamespace

func (m *Member) QueryNamespace() *NamespaceQuery

QueryNamespace queries the "namespace" edge of the Member entity.

func (*Member) String

func (m *Member) String() string

String implements the fmt.Stringer.

func (*Member) Unwrap

func (m *Member) Unwrap() *Member

Unwrap unwraps the Member 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 (*Member) Update

func (m *Member) Update() *MemberUpdateOne

Update returns a builder for updating this Member. Note that you need to call Member.Unwrap() before calling this method if this Member was returned from a transaction, and the transaction was committed or rolled back.

func (*Member) Value

func (m *Member) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Member. This includes values selected through modifiers, order, etc.

type MemberClient

type MemberClient struct {
	// contains filtered or unexported fields
}

MemberClient is a client for the Member schema.

func NewMemberClient

func NewMemberClient(c config) *MemberClient

NewMemberClient returns a client for the Member from the given config.

func (*MemberClient) Create

func (c *MemberClient) Create() *MemberCreate

Create returns a builder for creating a Member entity.

func (*MemberClient) CreateBulk

func (c *MemberClient) CreateBulk(builders ...*MemberCreate) *MemberCreateBulk

CreateBulk returns a builder for creating a bulk of Member entities.

func (*MemberClient) Delete

func (c *MemberClient) Delete() *MemberDelete

Delete returns a delete builder for Member.

func (*MemberClient) DeleteOne

func (c *MemberClient) DeleteOne(m *Member) *MemberDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MemberClient) DeleteOneID

func (c *MemberClient) DeleteOneID(id int) *MemberDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MemberClient) Get

func (c *MemberClient) Get(ctx context.Context, id int) (*Member, error)

Get returns a Member entity by its id.

func (*MemberClient) GetX

func (c *MemberClient) GetX(ctx context.Context, id int) *Member

GetX is like Get, but panics if an error occurs.

func (*MemberClient) Hooks

func (c *MemberClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MemberClient) Intercept

func (c *MemberClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `member.Intercept(f(g(h())))`.

func (*MemberClient) Interceptors

func (c *MemberClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MemberClient) MapCreateBulk

func (c *MemberClient) MapCreateBulk(slice any, setFunc func(*MemberCreate, int)) *MemberCreateBulk

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 (*MemberClient) Query

func (c *MemberClient) Query() *MemberQuery

Query returns a query builder for Member.

func (*MemberClient) QueryNamespace

func (c *MemberClient) QueryNamespace(m *Member) *NamespaceQuery

QueryNamespace queries the namespace edge of a Member.

func (*MemberClient) Update

func (c *MemberClient) Update() *MemberUpdate

Update returns an update builder for Member.

func (*MemberClient) UpdateOne

func (c *MemberClient) UpdateOne(m *Member) *MemberUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MemberClient) UpdateOneID

func (c *MemberClient) UpdateOneID(id int) *MemberUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MemberClient) Use

func (c *MemberClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `member.Hooks(f(g(h())))`.

type MemberCreate

type MemberCreate struct {
	// contains filtered or unexported fields
}

MemberCreate is the builder for creating a Member entity.

func (*MemberCreate) Exec

func (mc *MemberCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberCreate) ExecX

func (mc *MemberCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberCreate) Mutation

func (mc *MemberCreate) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberCreate) OnConflict

func (mc *MemberCreate) OnConflict(opts ...sql.ConflictOption) *MemberUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Member.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MemberUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*MemberCreate) OnConflictColumns

func (mc *MemberCreate) OnConflictColumns(columns ...string) *MemberUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Member.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MemberCreate) Save

func (mc *MemberCreate) Save(ctx context.Context) (*Member, error)

Save creates the Member in the database.

func (*MemberCreate) SaveX

func (mc *MemberCreate) SaveX(ctx context.Context) *Member

SaveX calls Save and panics if Save returns an error.

func (*MemberCreate) SetCreatedAt

func (mc *MemberCreate) SetCreatedAt(t time.Time) *MemberCreate

SetCreatedAt sets the "created_at" field.

func (*MemberCreate) SetDeletedAt

func (mc *MemberCreate) SetDeletedAt(t time.Time) *MemberCreate

SetDeletedAt sets the "deleted_at" field.

func (*MemberCreate) SetEmail

func (mc *MemberCreate) SetEmail(s string) *MemberCreate

SetEmail sets the "email" field.

func (*MemberCreate) SetNamespace

func (mc *MemberCreate) SetNamespace(n *Namespace) *MemberCreate

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*MemberCreate) SetNamespaceID

func (mc *MemberCreate) SetNamespaceID(i int) *MemberCreate

SetNamespaceID sets the "namespace_id" field.

func (*MemberCreate) SetNillableCreatedAt

func (mc *MemberCreate) SetNillableCreatedAt(t *time.Time) *MemberCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MemberCreate) SetNillableDeletedAt

func (mc *MemberCreate) SetNillableDeletedAt(t *time.Time) *MemberCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*MemberCreate) SetNillableNamespaceID

func (mc *MemberCreate) SetNillableNamespaceID(i *int) *MemberCreate

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*MemberCreate) SetNillableUpdatedAt

func (mc *MemberCreate) SetNillableUpdatedAt(t *time.Time) *MemberCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MemberCreate) SetUpdatedAt

func (mc *MemberCreate) SetUpdatedAt(t time.Time) *MemberCreate

SetUpdatedAt sets the "updated_at" field.

type MemberCreateBulk

type MemberCreateBulk struct {
	// contains filtered or unexported fields
}

MemberCreateBulk is the builder for creating many Member entities in bulk.

func (*MemberCreateBulk) Exec

func (mcb *MemberCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberCreateBulk) ExecX

func (mcb *MemberCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberCreateBulk) OnConflict

func (mcb *MemberCreateBulk) OnConflict(opts ...sql.ConflictOption) *MemberUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Member.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MemberUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*MemberCreateBulk) OnConflictColumns

func (mcb *MemberCreateBulk) OnConflictColumns(columns ...string) *MemberUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Member.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MemberCreateBulk) Save

func (mcb *MemberCreateBulk) Save(ctx context.Context) ([]*Member, error)

Save creates the Member entities in the database.

func (*MemberCreateBulk) SaveX

func (mcb *MemberCreateBulk) SaveX(ctx context.Context) []*Member

SaveX is like Save, but panics if an error occurs.

type MemberDelete

type MemberDelete struct {
	// contains filtered or unexported fields
}

MemberDelete is the builder for deleting a Member entity.

func (*MemberDelete) Exec

func (md *MemberDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MemberDelete) ExecX

func (md *MemberDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MemberDelete) Where

func (md *MemberDelete) Where(ps ...predicate.Member) *MemberDelete

Where appends a list predicates to the MemberDelete builder.

type MemberDeleteOne

type MemberDeleteOne struct {
	// contains filtered or unexported fields
}

MemberDeleteOne is the builder for deleting a single Member entity.

func (*MemberDeleteOne) Exec

func (mdo *MemberDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MemberDeleteOne) ExecX

func (mdo *MemberDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberDeleteOne) Where

func (mdo *MemberDeleteOne) Where(ps ...predicate.Member) *MemberDeleteOne

Where appends a list predicates to the MemberDelete builder.

type MemberEdges

type MemberEdges struct {
	// Namespace holds the value of the namespace edge.
	Namespace *Namespace `json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

MemberEdges holds the relations/edges for other nodes in the graph.

func (MemberEdges) NamespaceOrErr

func (e MemberEdges) NamespaceOrErr() (*Namespace, error)

NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MemberGroupBy

type MemberGroupBy struct {
	// contains filtered or unexported fields
}

MemberGroupBy is the group-by builder for Member entities.

func (*MemberGroupBy) Aggregate

func (mgb *MemberGroupBy) Aggregate(fns ...AggregateFunc) *MemberGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MemberGroupBy) Bool

func (s *MemberGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) BoolX

func (s *MemberGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MemberGroupBy) Bools

func (s *MemberGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) BoolsX

func (s *MemberGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MemberGroupBy) Float64

func (s *MemberGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) Float64X

func (s *MemberGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MemberGroupBy) Float64s

func (s *MemberGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) Float64sX

func (s *MemberGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MemberGroupBy) Int

func (s *MemberGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) IntX

func (s *MemberGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MemberGroupBy) Ints

func (s *MemberGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) IntsX

func (s *MemberGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MemberGroupBy) Scan

func (mgb *MemberGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MemberGroupBy) ScanX

func (s *MemberGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MemberGroupBy) String

func (s *MemberGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) StringX

func (s *MemberGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MemberGroupBy) Strings

func (s *MemberGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MemberGroupBy) StringsX

func (s *MemberGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MemberMutation

type MemberMutation struct {
	// contains filtered or unexported fields
}

MemberMutation represents an operation that mutates the Member nodes in the graph.

func (*MemberMutation) AddField

func (m *MemberMutation) 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 (*MemberMutation) AddedEdges

func (m *MemberMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MemberMutation) AddedField

func (m *MemberMutation) 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 (*MemberMutation) AddedFields

func (m *MemberMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MemberMutation) AddedIDs

func (m *MemberMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MemberMutation) ClearDeletedAt

func (m *MemberMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*MemberMutation) ClearEdge

func (m *MemberMutation) 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 (*MemberMutation) ClearField

func (m *MemberMutation) 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 (*MemberMutation) ClearNamespace

func (m *MemberMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*MemberMutation) ClearNamespaceID

func (m *MemberMutation) ClearNamespaceID()

ClearNamespaceID clears the value of the "namespace_id" field.

func (*MemberMutation) ClearedEdges

func (m *MemberMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MemberMutation) ClearedFields

func (m *MemberMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MemberMutation) Client

func (m MemberMutation) 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 (*MemberMutation) CreatedAt

func (m *MemberMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MemberMutation) DeletedAt

func (m *MemberMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*MemberMutation) DeletedAtCleared

func (m *MemberMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*MemberMutation) EdgeCleared

func (m *MemberMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MemberMutation) Email

func (m *MemberMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*MemberMutation) Field

func (m *MemberMutation) 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 (*MemberMutation) FieldCleared

func (m *MemberMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MemberMutation) Fields

func (m *MemberMutation) 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 (*MemberMutation) ID

func (m *MemberMutation) 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 (*MemberMutation) IDs

func (m *MemberMutation) 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 (*MemberMutation) NamespaceCleared

func (m *MemberMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the Namespace entity was cleared.

func (*MemberMutation) NamespaceID

func (m *MemberMutation) NamespaceID() (r int, exists bool)

NamespaceID returns the value of the "namespace_id" field in the mutation.

func (*MemberMutation) NamespaceIDCleared

func (m *MemberMutation) NamespaceIDCleared() bool

NamespaceIDCleared returns if the "namespace_id" field was cleared in this mutation.

func (*MemberMutation) NamespaceIDs

func (m *MemberMutation) NamespaceIDs() (ids []int)

NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.

func (*MemberMutation) OldCreatedAt

func (m *MemberMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldDeletedAt

func (m *MemberMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldEmail

func (m *MemberMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldField

func (m *MemberMutation) 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 (*MemberMutation) OldNamespaceID

func (m *MemberMutation) OldNamespaceID(ctx context.Context) (v int, err error)

OldNamespaceID returns the old "namespace_id" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) OldUpdatedAt

func (m *MemberMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Member entity. If the Member object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MemberMutation) Op

func (m *MemberMutation) Op() Op

Op returns the operation name.

func (*MemberMutation) RemovedEdges

func (m *MemberMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MemberMutation) RemovedIDs

func (m *MemberMutation) 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 (*MemberMutation) ResetCreatedAt

func (m *MemberMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MemberMutation) ResetDeletedAt

func (m *MemberMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*MemberMutation) ResetEdge

func (m *MemberMutation) 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 (*MemberMutation) ResetEmail

func (m *MemberMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*MemberMutation) ResetField

func (m *MemberMutation) 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 (*MemberMutation) ResetNamespace

func (m *MemberMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" edge.

func (*MemberMutation) ResetNamespaceID

func (m *MemberMutation) ResetNamespaceID()

ResetNamespaceID resets all changes to the "namespace_id" field.

func (*MemberMutation) ResetUpdatedAt

func (m *MemberMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MemberMutation) SetCreatedAt

func (m *MemberMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MemberMutation) SetDeletedAt

func (m *MemberMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*MemberMutation) SetEmail

func (m *MemberMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*MemberMutation) SetField

func (m *MemberMutation) 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 (*MemberMutation) SetNamespaceID

func (m *MemberMutation) SetNamespaceID(i int)

SetNamespaceID sets the "namespace_id" field.

func (*MemberMutation) SetOp

func (m *MemberMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MemberMutation) SetUpdatedAt

func (m *MemberMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (MemberMutation) Tx

func (m MemberMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MemberMutation) Type

func (m *MemberMutation) Type() string

Type returns the node type of this mutation (Member).

func (*MemberMutation) UpdatedAt

func (m *MemberMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MemberMutation) Where

func (m *MemberMutation) Where(ps ...predicate.Member)

Where appends a list predicates to the MemberMutation builder.

func (*MemberMutation) WhereP

func (m *MemberMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MemberMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MemberQuery

type MemberQuery struct {
	// contains filtered or unexported fields
}

MemberQuery is the builder for querying Member entities.

func (*MemberQuery) Aggregate

func (mq *MemberQuery) Aggregate(fns ...AggregateFunc) *MemberSelect

Aggregate returns a MemberSelect configured with the given aggregations.

func (*MemberQuery) All

func (mq *MemberQuery) All(ctx context.Context) ([]*Member, error)

All executes the query and returns a list of Members.

func (*MemberQuery) AllX

func (mq *MemberQuery) AllX(ctx context.Context) []*Member

AllX is like All, but panics if an error occurs.

func (*MemberQuery) Clone

func (mq *MemberQuery) Clone() *MemberQuery

Clone returns a duplicate of the MemberQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MemberQuery) Count

func (mq *MemberQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MemberQuery) CountX

func (mq *MemberQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MemberQuery) Exist

func (mq *MemberQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MemberQuery) ExistX

func (mq *MemberQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MemberQuery) First

func (mq *MemberQuery) First(ctx context.Context) (*Member, error)

First returns the first Member entity from the query. Returns a *NotFoundError when no Member was found.

func (*MemberQuery) FirstID

func (mq *MemberQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Member ID from the query. Returns a *NotFoundError when no Member ID was found.

func (*MemberQuery) FirstIDX

func (mq *MemberQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MemberQuery) FirstX

func (mq *MemberQuery) FirstX(ctx context.Context) *Member

FirstX is like First, but panics if an error occurs.

func (*MemberQuery) ForShare

func (mq *MemberQuery) ForShare(opts ...sql.LockOption) *MemberQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*MemberQuery) ForUpdate

func (mq *MemberQuery) ForUpdate(opts ...sql.LockOption) *MemberQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*MemberQuery) GroupBy

func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Member.Query().
	GroupBy(member.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MemberQuery) IDs

func (mq *MemberQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Member IDs.

func (*MemberQuery) IDsX

func (mq *MemberQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MemberQuery) Limit

func (mq *MemberQuery) Limit(limit int) *MemberQuery

Limit the number of records to be returned by this query.

func (*MemberQuery) Offset

func (mq *MemberQuery) Offset(offset int) *MemberQuery

Offset to start from.

func (*MemberQuery) Only

func (mq *MemberQuery) Only(ctx context.Context) (*Member, error)

Only returns a single Member entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Member entity is found. Returns a *NotFoundError when no Member entities are found.

func (*MemberQuery) OnlyID

func (mq *MemberQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Member ID in the query. Returns a *NotSingularError when more than one Member ID is found. Returns a *NotFoundError when no entities are found.

func (*MemberQuery) OnlyIDX

func (mq *MemberQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MemberQuery) OnlyX

func (mq *MemberQuery) OnlyX(ctx context.Context) *Member

OnlyX is like Only, but panics if an error occurs.

func (*MemberQuery) Order

func (mq *MemberQuery) Order(o ...member.OrderOption) *MemberQuery

Order specifies how the records should be ordered.

func (*MemberQuery) QueryNamespace

func (mq *MemberQuery) QueryNamespace() *NamespaceQuery

QueryNamespace chains the current query on the "namespace" edge.

func (*MemberQuery) Select

func (mq *MemberQuery) Select(fields ...string) *MemberSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Member.Query().
	Select(member.FieldCreatedAt).
	Scan(ctx, &v)

func (*MemberQuery) Unique

func (mq *MemberQuery) Unique(unique bool) *MemberQuery

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 (*MemberQuery) Where

func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery

Where adds a new predicate for the MemberQuery builder.

func (*MemberQuery) WithNamespace

func (mq *MemberQuery) WithNamespace(opts ...func(*NamespaceQuery)) *MemberQuery

WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. The optional arguments are used to configure the query builder of the edge.

type MemberSelect

type MemberSelect struct {
	*MemberQuery
	// contains filtered or unexported fields
}

MemberSelect is the builder for selecting fields of Member entities.

func (*MemberSelect) Aggregate

func (ms *MemberSelect) Aggregate(fns ...AggregateFunc) *MemberSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MemberSelect) Bool

func (s *MemberSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MemberSelect) BoolX

func (s *MemberSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MemberSelect) Bools

func (s *MemberSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MemberSelect) BoolsX

func (s *MemberSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MemberSelect) Float64

func (s *MemberSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MemberSelect) Float64X

func (s *MemberSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MemberSelect) Float64s

func (s *MemberSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MemberSelect) Float64sX

func (s *MemberSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MemberSelect) Int

func (s *MemberSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MemberSelect) IntX

func (s *MemberSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MemberSelect) Ints

func (s *MemberSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MemberSelect) IntsX

func (s *MemberSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MemberSelect) Scan

func (ms *MemberSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MemberSelect) ScanX

func (s *MemberSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MemberSelect) String

func (s *MemberSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MemberSelect) StringX

func (s *MemberSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MemberSelect) Strings

func (s *MemberSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MemberSelect) StringsX

func (s *MemberSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MemberUpdate

type MemberUpdate struct {
	// contains filtered or unexported fields
}

MemberUpdate is the builder for updating Member entities.

func (*MemberUpdate) ClearDeletedAt

func (mu *MemberUpdate) ClearDeletedAt() *MemberUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*MemberUpdate) ClearNamespace

func (mu *MemberUpdate) ClearNamespace() *MemberUpdate

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*MemberUpdate) ClearNamespaceID

func (mu *MemberUpdate) ClearNamespaceID() *MemberUpdate

ClearNamespaceID clears the value of the "namespace_id" field.

func (*MemberUpdate) Exec

func (mu *MemberUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberUpdate) ExecX

func (mu *MemberUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberUpdate) Mutation

func (mu *MemberUpdate) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberUpdate) Save

func (mu *MemberUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MemberUpdate) SaveX

func (mu *MemberUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MemberUpdate) SetDeletedAt

func (mu *MemberUpdate) SetDeletedAt(t time.Time) *MemberUpdate

SetDeletedAt sets the "deleted_at" field.

func (*MemberUpdate) SetEmail

func (mu *MemberUpdate) SetEmail(s string) *MemberUpdate

SetEmail sets the "email" field.

func (*MemberUpdate) SetNamespace

func (mu *MemberUpdate) SetNamespace(n *Namespace) *MemberUpdate

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*MemberUpdate) SetNamespaceID

func (mu *MemberUpdate) SetNamespaceID(i int) *MemberUpdate

SetNamespaceID sets the "namespace_id" field.

func (*MemberUpdate) SetNillableDeletedAt

func (mu *MemberUpdate) SetNillableDeletedAt(t *time.Time) *MemberUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*MemberUpdate) SetNillableEmail

func (mu *MemberUpdate) SetNillableEmail(s *string) *MemberUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*MemberUpdate) SetNillableNamespaceID

func (mu *MemberUpdate) SetNillableNamespaceID(i *int) *MemberUpdate

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*MemberUpdate) SetUpdatedAt

func (mu *MemberUpdate) SetUpdatedAt(t time.Time) *MemberUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MemberUpdate) Where

func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate

Where appends a list predicates to the MemberUpdate builder.

type MemberUpdateOne

type MemberUpdateOne struct {
	// contains filtered or unexported fields
}

MemberUpdateOne is the builder for updating a single Member entity.

func (*MemberUpdateOne) ClearDeletedAt

func (muo *MemberUpdateOne) ClearDeletedAt() *MemberUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*MemberUpdateOne) ClearNamespace

func (muo *MemberUpdateOne) ClearNamespace() *MemberUpdateOne

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*MemberUpdateOne) ClearNamespaceID

func (muo *MemberUpdateOne) ClearNamespaceID() *MemberUpdateOne

ClearNamespaceID clears the value of the "namespace_id" field.

func (*MemberUpdateOne) Exec

func (muo *MemberUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MemberUpdateOne) ExecX

func (muo *MemberUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberUpdateOne) Mutation

func (muo *MemberUpdateOne) Mutation() *MemberMutation

Mutation returns the MemberMutation object of the builder.

func (*MemberUpdateOne) Save

func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)

Save executes the query and returns the updated Member entity.

func (*MemberUpdateOne) SaveX

func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member

SaveX is like Save, but panics if an error occurs.

func (*MemberUpdateOne) Select

func (muo *MemberUpdateOne) Select(field string, fields ...string) *MemberUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MemberUpdateOne) SetDeletedAt

func (muo *MemberUpdateOne) SetDeletedAt(t time.Time) *MemberUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*MemberUpdateOne) SetEmail

func (muo *MemberUpdateOne) SetEmail(s string) *MemberUpdateOne

SetEmail sets the "email" field.

func (*MemberUpdateOne) SetNamespace

func (muo *MemberUpdateOne) SetNamespace(n *Namespace) *MemberUpdateOne

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*MemberUpdateOne) SetNamespaceID

func (muo *MemberUpdateOne) SetNamespaceID(i int) *MemberUpdateOne

SetNamespaceID sets the "namespace_id" field.

func (*MemberUpdateOne) SetNillableDeletedAt

func (muo *MemberUpdateOne) SetNillableDeletedAt(t *time.Time) *MemberUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableEmail

func (muo *MemberUpdateOne) SetNillableEmail(s *string) *MemberUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*MemberUpdateOne) SetNillableNamespaceID

func (muo *MemberUpdateOne) SetNillableNamespaceID(i *int) *MemberUpdateOne

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*MemberUpdateOne) SetUpdatedAt

func (muo *MemberUpdateOne) SetUpdatedAt(t time.Time) *MemberUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MemberUpdateOne) Where

func (muo *MemberUpdateOne) Where(ps ...predicate.Member) *MemberUpdateOne

Where appends a list predicates to the MemberUpdate builder.

type MemberUpsert

type MemberUpsert struct {
	*sql.UpdateSet
}

MemberUpsert is the "OnConflict" setter.

func (*MemberUpsert) ClearDeletedAt

func (u *MemberUpsert) ClearDeletedAt() *MemberUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*MemberUpsert) ClearNamespaceID

func (u *MemberUpsert) ClearNamespaceID() *MemberUpsert

ClearNamespaceID clears the value of the "namespace_id" field.

func (*MemberUpsert) SetDeletedAt

func (u *MemberUpsert) SetDeletedAt(v time.Time) *MemberUpsert

SetDeletedAt sets the "deleted_at" field.

func (*MemberUpsert) SetEmail

func (u *MemberUpsert) SetEmail(v string) *MemberUpsert

SetEmail sets the "email" field.

func (*MemberUpsert) SetNamespaceID

func (u *MemberUpsert) SetNamespaceID(v int) *MemberUpsert

SetNamespaceID sets the "namespace_id" field.

func (*MemberUpsert) SetUpdatedAt

func (u *MemberUpsert) SetUpdatedAt(v time.Time) *MemberUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MemberUpsert) UpdateDeletedAt

func (u *MemberUpsert) UpdateDeletedAt() *MemberUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*MemberUpsert) UpdateEmail

func (u *MemberUpsert) UpdateEmail() *MemberUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*MemberUpsert) UpdateNamespaceID

func (u *MemberUpsert) UpdateNamespaceID() *MemberUpsert

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*MemberUpsert) UpdateUpdatedAt

func (u *MemberUpsert) UpdateUpdatedAt() *MemberUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MemberUpsertBulk

type MemberUpsertBulk struct {
	// contains filtered or unexported fields
}

MemberUpsertBulk is the builder for "upsert"-ing a bulk of Member nodes.

func (*MemberUpsertBulk) ClearDeletedAt

func (u *MemberUpsertBulk) ClearDeletedAt() *MemberUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*MemberUpsertBulk) ClearNamespaceID

func (u *MemberUpsertBulk) ClearNamespaceID() *MemberUpsertBulk

ClearNamespaceID clears the value of the "namespace_id" field.

func (*MemberUpsertBulk) DoNothing

func (u *MemberUpsertBulk) DoNothing() *MemberUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MemberUpsertBulk) Exec

func (u *MemberUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberUpsertBulk) ExecX

func (u *MemberUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberUpsertBulk) Ignore

func (u *MemberUpsertBulk) Ignore() *MemberUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Member.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MemberUpsertBulk) SetDeletedAt

func (u *MemberUpsertBulk) SetDeletedAt(v time.Time) *MemberUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*MemberUpsertBulk) SetEmail

func (u *MemberUpsertBulk) SetEmail(v string) *MemberUpsertBulk

SetEmail sets the "email" field.

func (*MemberUpsertBulk) SetNamespaceID

func (u *MemberUpsertBulk) SetNamespaceID(v int) *MemberUpsertBulk

SetNamespaceID sets the "namespace_id" field.

func (*MemberUpsertBulk) SetUpdatedAt

func (u *MemberUpsertBulk) SetUpdatedAt(v time.Time) *MemberUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MemberUpsertBulk) Update

func (u *MemberUpsertBulk) Update(set func(*MemberUpsert)) *MemberUpsertBulk

Update allows overriding fields `UPDATE` values. See the MemberCreateBulk.OnConflict documentation for more info.

func (*MemberUpsertBulk) UpdateDeletedAt

func (u *MemberUpsertBulk) UpdateDeletedAt() *MemberUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*MemberUpsertBulk) UpdateEmail

func (u *MemberUpsertBulk) UpdateEmail() *MemberUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*MemberUpsertBulk) UpdateNamespaceID

func (u *MemberUpsertBulk) UpdateNamespaceID() *MemberUpsertBulk

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*MemberUpsertBulk) UpdateNewValues

func (u *MemberUpsertBulk) UpdateNewValues() *MemberUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Member.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*MemberUpsertBulk) UpdateUpdatedAt

func (u *MemberUpsertBulk) UpdateUpdatedAt() *MemberUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MemberUpsertOne

type MemberUpsertOne struct {
	// contains filtered or unexported fields
}

MemberUpsertOne is the builder for "upsert"-ing

one Member node.

func (*MemberUpsertOne) ClearDeletedAt

func (u *MemberUpsertOne) ClearDeletedAt() *MemberUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*MemberUpsertOne) ClearNamespaceID

func (u *MemberUpsertOne) ClearNamespaceID() *MemberUpsertOne

ClearNamespaceID clears the value of the "namespace_id" field.

func (*MemberUpsertOne) DoNothing

func (u *MemberUpsertOne) DoNothing() *MemberUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MemberUpsertOne) Exec

func (u *MemberUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*MemberUpsertOne) ExecX

func (u *MemberUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MemberUpsertOne) ID

func (u *MemberUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MemberUpsertOne) IDX

func (u *MemberUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*MemberUpsertOne) Ignore

func (u *MemberUpsertOne) Ignore() *MemberUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Member.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MemberUpsertOne) SetDeletedAt

func (u *MemberUpsertOne) SetDeletedAt(v time.Time) *MemberUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*MemberUpsertOne) SetEmail

func (u *MemberUpsertOne) SetEmail(v string) *MemberUpsertOne

SetEmail sets the "email" field.

func (*MemberUpsertOne) SetNamespaceID

func (u *MemberUpsertOne) SetNamespaceID(v int) *MemberUpsertOne

SetNamespaceID sets the "namespace_id" field.

func (*MemberUpsertOne) SetUpdatedAt

func (u *MemberUpsertOne) SetUpdatedAt(v time.Time) *MemberUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MemberUpsertOne) Update

func (u *MemberUpsertOne) Update(set func(*MemberUpsert)) *MemberUpsertOne

Update allows overriding fields `UPDATE` values. See the MemberCreate.OnConflict documentation for more info.

func (*MemberUpsertOne) UpdateDeletedAt

func (u *MemberUpsertOne) UpdateDeletedAt() *MemberUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*MemberUpsertOne) UpdateEmail

func (u *MemberUpsertOne) UpdateEmail() *MemberUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*MemberUpsertOne) UpdateNamespaceID

func (u *MemberUpsertOne) UpdateNamespaceID() *MemberUpsertOne

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*MemberUpsertOne) UpdateNewValues

func (u *MemberUpsertOne) UpdateNewValues() *MemberUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Member.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*MemberUpsertOne) UpdateUpdatedAt

func (u *MemberUpsertOne) UpdateUpdatedAt() *MemberUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Members

type Members []*Member

Members is a parsable slice of Member.

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 Namespace

type Namespace struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// 项目空间名
	Name string `json:"name,omitempty"`
	// image pull secrets
	ImagePullSecrets []string `json:"image_pull_secrets,omitempty"`
	// 是否私有, 默认公开
	Private bool `json:"private,omitempty"`
	// 创建者 email
	CreatorEmail string `json:"creator_email,omitempty"`
	// 项目空间描述
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NamespaceQuery when eager-loading is set.
	Edges NamespaceEdges `json:"edges"`
	// contains filtered or unexported fields
}

Namespace is the model entity for the Namespace schema.

func (*Namespace) QueryFavorites

func (n *Namespace) QueryFavorites() *FavoriteQuery

QueryFavorites queries the "favorites" edge of the Namespace entity.

func (*Namespace) QueryMembers

func (n *Namespace) QueryMembers() *MemberQuery

QueryMembers queries the "members" edge of the Namespace entity.

func (*Namespace) QueryProjects

func (n *Namespace) QueryProjects() *ProjectQuery

QueryProjects queries the "projects" edge of the Namespace entity.

func (*Namespace) String

func (n *Namespace) String() string

String implements the fmt.Stringer.

func (*Namespace) Unwrap

func (n *Namespace) Unwrap() *Namespace

Unwrap unwraps the Namespace 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 (*Namespace) Update

func (n *Namespace) Update() *NamespaceUpdateOne

Update returns a builder for updating this Namespace. Note that you need to call Namespace.Unwrap() before calling this method if this Namespace was returned from a transaction, and the transaction was committed or rolled back.

func (*Namespace) Value

func (n *Namespace) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Namespace. This includes values selected through modifiers, order, etc.

type NamespaceClient

type NamespaceClient struct {
	// contains filtered or unexported fields
}

NamespaceClient is a client for the Namespace schema.

func NewNamespaceClient

func NewNamespaceClient(c config) *NamespaceClient

NewNamespaceClient returns a client for the Namespace from the given config.

func (*NamespaceClient) Create

func (c *NamespaceClient) Create() *NamespaceCreate

Create returns a builder for creating a Namespace entity.

func (*NamespaceClient) CreateBulk

func (c *NamespaceClient) CreateBulk(builders ...*NamespaceCreate) *NamespaceCreateBulk

CreateBulk returns a builder for creating a bulk of Namespace entities.

func (*NamespaceClient) Delete

func (c *NamespaceClient) Delete() *NamespaceDelete

Delete returns a delete builder for Namespace.

func (*NamespaceClient) DeleteOne

func (c *NamespaceClient) DeleteOne(n *Namespace) *NamespaceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NamespaceClient) DeleteOneID

func (c *NamespaceClient) DeleteOneID(id int) *NamespaceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NamespaceClient) Get

func (c *NamespaceClient) Get(ctx context.Context, id int) (*Namespace, error)

Get returns a Namespace entity by its id.

func (*NamespaceClient) GetX

func (c *NamespaceClient) GetX(ctx context.Context, id int) *Namespace

GetX is like Get, but panics if an error occurs.

func (*NamespaceClient) Hooks

func (c *NamespaceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NamespaceClient) Intercept

func (c *NamespaceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `namespace.Intercept(f(g(h())))`.

func (*NamespaceClient) Interceptors

func (c *NamespaceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NamespaceClient) MapCreateBulk

func (c *NamespaceClient) MapCreateBulk(slice any, setFunc func(*NamespaceCreate, int)) *NamespaceCreateBulk

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 (*NamespaceClient) Query

func (c *NamespaceClient) Query() *NamespaceQuery

Query returns a query builder for Namespace.

func (*NamespaceClient) QueryFavorites

func (c *NamespaceClient) QueryFavorites(n *Namespace) *FavoriteQuery

QueryFavorites queries the favorites edge of a Namespace.

func (*NamespaceClient) QueryMembers

func (c *NamespaceClient) QueryMembers(n *Namespace) *MemberQuery

QueryMembers queries the members edge of a Namespace.

func (*NamespaceClient) QueryProjects

func (c *NamespaceClient) QueryProjects(n *Namespace) *ProjectQuery

QueryProjects queries the projects edge of a Namespace.

func (*NamespaceClient) Update

func (c *NamespaceClient) Update() *NamespaceUpdate

Update returns an update builder for Namespace.

func (*NamespaceClient) UpdateOne

func (c *NamespaceClient) UpdateOne(n *Namespace) *NamespaceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NamespaceClient) UpdateOneID

func (c *NamespaceClient) UpdateOneID(id int) *NamespaceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NamespaceClient) Use

func (c *NamespaceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `namespace.Hooks(f(g(h())))`.

type NamespaceCreate

type NamespaceCreate struct {
	// contains filtered or unexported fields
}

NamespaceCreate is the builder for creating a Namespace entity.

func (*NamespaceCreate) AddFavoriteIDs

func (nc *NamespaceCreate) AddFavoriteIDs(ids ...int) *NamespaceCreate

AddFavoriteIDs adds the "favorites" edge to the Favorite entity by IDs.

func (*NamespaceCreate) AddFavorites

func (nc *NamespaceCreate) AddFavorites(f ...*Favorite) *NamespaceCreate

AddFavorites adds the "favorites" edges to the Favorite entity.

func (*NamespaceCreate) AddMemberIDs

func (nc *NamespaceCreate) AddMemberIDs(ids ...int) *NamespaceCreate

AddMemberIDs adds the "members" edge to the Member entity by IDs.

func (*NamespaceCreate) AddMembers

func (nc *NamespaceCreate) AddMembers(m ...*Member) *NamespaceCreate

AddMembers adds the "members" edges to the Member entity.

func (*NamespaceCreate) AddProjectIDs

func (nc *NamespaceCreate) AddProjectIDs(ids ...int) *NamespaceCreate

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*NamespaceCreate) AddProjects

func (nc *NamespaceCreate) AddProjects(p ...*Project) *NamespaceCreate

AddProjects adds the "projects" edges to the Project entity.

func (*NamespaceCreate) Exec

func (nc *NamespaceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NamespaceCreate) ExecX

func (nc *NamespaceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceCreate) Mutation

func (nc *NamespaceCreate) Mutation() *NamespaceMutation

Mutation returns the NamespaceMutation object of the builder.

func (*NamespaceCreate) OnConflict

func (nc *NamespaceCreate) OnConflict(opts ...sql.ConflictOption) *NamespaceUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Namespace.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NamespaceUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*NamespaceCreate) OnConflictColumns

func (nc *NamespaceCreate) OnConflictColumns(columns ...string) *NamespaceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Namespace.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NamespaceCreate) Save

func (nc *NamespaceCreate) Save(ctx context.Context) (*Namespace, error)

Save creates the Namespace in the database.

func (*NamespaceCreate) SaveX

func (nc *NamespaceCreate) SaveX(ctx context.Context) *Namespace

SaveX calls Save and panics if Save returns an error.

func (*NamespaceCreate) SetCreatedAt

func (nc *NamespaceCreate) SetCreatedAt(t time.Time) *NamespaceCreate

SetCreatedAt sets the "created_at" field.

func (*NamespaceCreate) SetCreatorEmail

func (nc *NamespaceCreate) SetCreatorEmail(s string) *NamespaceCreate

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceCreate) SetDeletedAt

func (nc *NamespaceCreate) SetDeletedAt(t time.Time) *NamespaceCreate

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceCreate) SetDescription

func (nc *NamespaceCreate) SetDescription(s string) *NamespaceCreate

SetDescription sets the "description" field.

func (*NamespaceCreate) SetImagePullSecrets

func (nc *NamespaceCreate) SetImagePullSecrets(s []string) *NamespaceCreate

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceCreate) SetName

func (nc *NamespaceCreate) SetName(s string) *NamespaceCreate

SetName sets the "name" field.

func (*NamespaceCreate) SetNillableCreatedAt

func (nc *NamespaceCreate) SetNillableCreatedAt(t *time.Time) *NamespaceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NamespaceCreate) SetNillableDeletedAt

func (nc *NamespaceCreate) SetNillableDeletedAt(t *time.Time) *NamespaceCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NamespaceCreate) SetNillableDescription

func (nc *NamespaceCreate) SetNillableDescription(s *string) *NamespaceCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*NamespaceCreate) SetNillablePrivate

func (nc *NamespaceCreate) SetNillablePrivate(b *bool) *NamespaceCreate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*NamespaceCreate) SetNillableUpdatedAt

func (nc *NamespaceCreate) SetNillableUpdatedAt(t *time.Time) *NamespaceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NamespaceCreate) SetPrivate

func (nc *NamespaceCreate) SetPrivate(b bool) *NamespaceCreate

SetPrivate sets the "private" field.

func (*NamespaceCreate) SetUpdatedAt

func (nc *NamespaceCreate) SetUpdatedAt(t time.Time) *NamespaceCreate

SetUpdatedAt sets the "updated_at" field.

type NamespaceCreateBulk

type NamespaceCreateBulk struct {
	// contains filtered or unexported fields
}

NamespaceCreateBulk is the builder for creating many Namespace entities in bulk.

func (*NamespaceCreateBulk) Exec

func (ncb *NamespaceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NamespaceCreateBulk) ExecX

func (ncb *NamespaceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceCreateBulk) OnConflict

func (ncb *NamespaceCreateBulk) OnConflict(opts ...sql.ConflictOption) *NamespaceUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Namespace.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NamespaceUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*NamespaceCreateBulk) OnConflictColumns

func (ncb *NamespaceCreateBulk) OnConflictColumns(columns ...string) *NamespaceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Namespace.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NamespaceCreateBulk) Save

func (ncb *NamespaceCreateBulk) Save(ctx context.Context) ([]*Namespace, error)

Save creates the Namespace entities in the database.

func (*NamespaceCreateBulk) SaveX

func (ncb *NamespaceCreateBulk) SaveX(ctx context.Context) []*Namespace

SaveX is like Save, but panics if an error occurs.

type NamespaceDelete

type NamespaceDelete struct {
	// contains filtered or unexported fields
}

NamespaceDelete is the builder for deleting a Namespace entity.

func (*NamespaceDelete) Exec

func (nd *NamespaceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NamespaceDelete) ExecX

func (nd *NamespaceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceDelete) Where

Where appends a list predicates to the NamespaceDelete builder.

type NamespaceDeleteOne

type NamespaceDeleteOne struct {
	// contains filtered or unexported fields
}

NamespaceDeleteOne is the builder for deleting a single Namespace entity.

func (*NamespaceDeleteOne) Exec

func (ndo *NamespaceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NamespaceDeleteOne) ExecX

func (ndo *NamespaceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceDeleteOne) Where

Where appends a list predicates to the NamespaceDelete builder.

type NamespaceEdges

type NamespaceEdges struct {
	// Projects holds the value of the projects edge.
	Projects []*Project `json:"projects,omitempty"`
	// Favorites holds the value of the favorites edge.
	Favorites []*Favorite `json:"favorites,omitempty"`
	// Members holds the value of the members edge.
	Members []*Member `json:"members,omitempty"`
	// contains filtered or unexported fields
}

NamespaceEdges holds the relations/edges for other nodes in the graph.

func (NamespaceEdges) FavoritesOrErr

func (e NamespaceEdges) FavoritesOrErr() ([]*Favorite, error)

FavoritesOrErr returns the Favorites value or an error if the edge was not loaded in eager-loading.

func (NamespaceEdges) MembersOrErr

func (e NamespaceEdges) MembersOrErr() ([]*Member, error)

MembersOrErr returns the Members value or an error if the edge was not loaded in eager-loading.

func (NamespaceEdges) ProjectsOrErr

func (e NamespaceEdges) ProjectsOrErr() ([]*Project, error)

ProjectsOrErr returns the Projects value or an error if the edge was not loaded in eager-loading.

type NamespaceGroupBy

type NamespaceGroupBy struct {
	// contains filtered or unexported fields
}

NamespaceGroupBy is the group-by builder for Namespace entities.

func (*NamespaceGroupBy) Aggregate

func (ngb *NamespaceGroupBy) Aggregate(fns ...AggregateFunc) *NamespaceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NamespaceGroupBy) Bool

func (s *NamespaceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) BoolX

func (s *NamespaceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NamespaceGroupBy) Bools

func (s *NamespaceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) BoolsX

func (s *NamespaceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NamespaceGroupBy) Float64

func (s *NamespaceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) Float64X

func (s *NamespaceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NamespaceGroupBy) Float64s

func (s *NamespaceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) Float64sX

func (s *NamespaceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NamespaceGroupBy) Int

func (s *NamespaceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) IntX

func (s *NamespaceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NamespaceGroupBy) Ints

func (s *NamespaceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) IntsX

func (s *NamespaceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NamespaceGroupBy) Scan

func (ngb *NamespaceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NamespaceGroupBy) ScanX

func (s *NamespaceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NamespaceGroupBy) String

func (s *NamespaceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) StringX

func (s *NamespaceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NamespaceGroupBy) Strings

func (s *NamespaceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NamespaceGroupBy) StringsX

func (s *NamespaceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NamespaceMutation

type NamespaceMutation struct {
	// contains filtered or unexported fields
}

NamespaceMutation represents an operation that mutates the Namespace nodes in the graph.

func (*NamespaceMutation) AddFavoriteIDs

func (m *NamespaceMutation) AddFavoriteIDs(ids ...int)

AddFavoriteIDs adds the "favorites" edge to the Favorite entity by ids.

func (*NamespaceMutation) AddField

func (m *NamespaceMutation) 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 (*NamespaceMutation) AddMemberIDs

func (m *NamespaceMutation) AddMemberIDs(ids ...int)

AddMemberIDs adds the "members" edge to the Member entity by ids.

func (*NamespaceMutation) AddProjectIDs

func (m *NamespaceMutation) AddProjectIDs(ids ...int)

AddProjectIDs adds the "projects" edge to the Project entity by ids.

func (*NamespaceMutation) AddedEdges

func (m *NamespaceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NamespaceMutation) AddedField

func (m *NamespaceMutation) 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 (*NamespaceMutation) AddedFields

func (m *NamespaceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NamespaceMutation) AddedIDs

func (m *NamespaceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NamespaceMutation) AppendImagePullSecrets

func (m *NamespaceMutation) AppendImagePullSecrets(s []string)

AppendImagePullSecrets adds s to the "image_pull_secrets" field.

func (*NamespaceMutation) AppendedImagePullSecrets

func (m *NamespaceMutation) AppendedImagePullSecrets() ([]string, bool)

AppendedImagePullSecrets returns the list of values that were appended to the "image_pull_secrets" field in this mutation.

func (*NamespaceMutation) ClearDeletedAt

func (m *NamespaceMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NamespaceMutation) ClearDescription

func (m *NamespaceMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*NamespaceMutation) ClearEdge

func (m *NamespaceMutation) 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 (*NamespaceMutation) ClearFavorites

func (m *NamespaceMutation) ClearFavorites()

ClearFavorites clears the "favorites" edge to the Favorite entity.

func (*NamespaceMutation) ClearField

func (m *NamespaceMutation) 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 (*NamespaceMutation) ClearMembers

func (m *NamespaceMutation) ClearMembers()

ClearMembers clears the "members" edge to the Member entity.

func (*NamespaceMutation) ClearProjects

func (m *NamespaceMutation) ClearProjects()

ClearProjects clears the "projects" edge to the Project entity.

func (*NamespaceMutation) ClearedEdges

func (m *NamespaceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NamespaceMutation) ClearedFields

func (m *NamespaceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NamespaceMutation) Client

func (m NamespaceMutation) 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 (*NamespaceMutation) CreatedAt

func (m *NamespaceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NamespaceMutation) CreatorEmail

func (m *NamespaceMutation) CreatorEmail() (r string, exists bool)

CreatorEmail returns the value of the "creator_email" field in the mutation.

func (*NamespaceMutation) DeletedAt

func (m *NamespaceMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*NamespaceMutation) DeletedAtCleared

func (m *NamespaceMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*NamespaceMutation) Description

func (m *NamespaceMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*NamespaceMutation) DescriptionCleared

func (m *NamespaceMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*NamespaceMutation) EdgeCleared

func (m *NamespaceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NamespaceMutation) FavoritesCleared

func (m *NamespaceMutation) FavoritesCleared() bool

FavoritesCleared reports if the "favorites" edge to the Favorite entity was cleared.

func (*NamespaceMutation) FavoritesIDs

func (m *NamespaceMutation) FavoritesIDs() (ids []int)

FavoritesIDs returns the "favorites" edge IDs in the mutation.

func (*NamespaceMutation) Field

func (m *NamespaceMutation) 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 (*NamespaceMutation) FieldCleared

func (m *NamespaceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NamespaceMutation) Fields

func (m *NamespaceMutation) 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 (*NamespaceMutation) ID

func (m *NamespaceMutation) 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 (*NamespaceMutation) IDs

func (m *NamespaceMutation) 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 (*NamespaceMutation) ImagePullSecrets

func (m *NamespaceMutation) ImagePullSecrets() (r []string, exists bool)

ImagePullSecrets returns the value of the "image_pull_secrets" field in the mutation.

func (*NamespaceMutation) MembersCleared

func (m *NamespaceMutation) MembersCleared() bool

MembersCleared reports if the "members" edge to the Member entity was cleared.

func (*NamespaceMutation) MembersIDs

func (m *NamespaceMutation) MembersIDs() (ids []int)

MembersIDs returns the "members" edge IDs in the mutation.

func (*NamespaceMutation) Name

func (m *NamespaceMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*NamespaceMutation) OldCreatedAt

func (m *NamespaceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldCreatorEmail

func (m *NamespaceMutation) OldCreatorEmail(ctx context.Context) (v string, err error)

OldCreatorEmail returns the old "creator_email" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldDeletedAt

func (m *NamespaceMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldDescription

func (m *NamespaceMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldField

func (m *NamespaceMutation) 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 (*NamespaceMutation) OldImagePullSecrets

func (m *NamespaceMutation) OldImagePullSecrets(ctx context.Context) (v []string, err error)

OldImagePullSecrets returns the old "image_pull_secrets" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldName

func (m *NamespaceMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldPrivate

func (m *NamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)

OldPrivate returns the old "private" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) OldUpdatedAt

func (m *NamespaceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Namespace entity. If the Namespace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NamespaceMutation) Op

func (m *NamespaceMutation) Op() Op

Op returns the operation name.

func (*NamespaceMutation) Private

func (m *NamespaceMutation) Private() (r bool, exists bool)

Private returns the value of the "private" field in the mutation.

func (*NamespaceMutation) ProjectsCleared

func (m *NamespaceMutation) ProjectsCleared() bool

ProjectsCleared reports if the "projects" edge to the Project entity was cleared.

func (*NamespaceMutation) ProjectsIDs

func (m *NamespaceMutation) ProjectsIDs() (ids []int)

ProjectsIDs returns the "projects" edge IDs in the mutation.

func (*NamespaceMutation) RemoveFavoriteIDs

func (m *NamespaceMutation) RemoveFavoriteIDs(ids ...int)

RemoveFavoriteIDs removes the "favorites" edge to the Favorite entity by IDs.

func (*NamespaceMutation) RemoveMemberIDs

func (m *NamespaceMutation) RemoveMemberIDs(ids ...int)

RemoveMemberIDs removes the "members" edge to the Member entity by IDs.

func (*NamespaceMutation) RemoveProjectIDs

func (m *NamespaceMutation) RemoveProjectIDs(ids ...int)

RemoveProjectIDs removes the "projects" edge to the Project entity by IDs.

func (*NamespaceMutation) RemovedEdges

func (m *NamespaceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NamespaceMutation) RemovedFavoritesIDs

func (m *NamespaceMutation) RemovedFavoritesIDs() (ids []int)

RemovedFavorites returns the removed IDs of the "favorites" edge to the Favorite entity.

func (*NamespaceMutation) RemovedIDs

func (m *NamespaceMutation) 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 (*NamespaceMutation) RemovedMembersIDs

func (m *NamespaceMutation) RemovedMembersIDs() (ids []int)

RemovedMembers returns the removed IDs of the "members" edge to the Member entity.

func (*NamespaceMutation) RemovedProjectsIDs

func (m *NamespaceMutation) RemovedProjectsIDs() (ids []int)

RemovedProjects returns the removed IDs of the "projects" edge to the Project entity.

func (*NamespaceMutation) ResetCreatedAt

func (m *NamespaceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NamespaceMutation) ResetCreatorEmail

func (m *NamespaceMutation) ResetCreatorEmail()

ResetCreatorEmail resets all changes to the "creator_email" field.

func (*NamespaceMutation) ResetDeletedAt

func (m *NamespaceMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*NamespaceMutation) ResetDescription

func (m *NamespaceMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*NamespaceMutation) ResetEdge

func (m *NamespaceMutation) 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 (*NamespaceMutation) ResetFavorites

func (m *NamespaceMutation) ResetFavorites()

ResetFavorites resets all changes to the "favorites" edge.

func (*NamespaceMutation) ResetField

func (m *NamespaceMutation) 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 (*NamespaceMutation) ResetImagePullSecrets

func (m *NamespaceMutation) ResetImagePullSecrets()

ResetImagePullSecrets resets all changes to the "image_pull_secrets" field.

func (*NamespaceMutation) ResetMembers

func (m *NamespaceMutation) ResetMembers()

ResetMembers resets all changes to the "members" edge.

func (*NamespaceMutation) ResetName

func (m *NamespaceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*NamespaceMutation) ResetPrivate

func (m *NamespaceMutation) ResetPrivate()

ResetPrivate resets all changes to the "private" field.

func (*NamespaceMutation) ResetProjects

func (m *NamespaceMutation) ResetProjects()

ResetProjects resets all changes to the "projects" edge.

func (*NamespaceMutation) ResetUpdatedAt

func (m *NamespaceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NamespaceMutation) SetCreatedAt

func (m *NamespaceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NamespaceMutation) SetCreatorEmail

func (m *NamespaceMutation) SetCreatorEmail(s string)

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceMutation) SetDeletedAt

func (m *NamespaceMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceMutation) SetDescription

func (m *NamespaceMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*NamespaceMutation) SetField

func (m *NamespaceMutation) 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 (*NamespaceMutation) SetImagePullSecrets

func (m *NamespaceMutation) SetImagePullSecrets(s []string)

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceMutation) SetName

func (m *NamespaceMutation) SetName(s string)

SetName sets the "name" field.

func (*NamespaceMutation) SetOp

func (m *NamespaceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NamespaceMutation) SetPrivate

func (m *NamespaceMutation) SetPrivate(b bool)

SetPrivate sets the "private" field.

func (*NamespaceMutation) SetUpdatedAt

func (m *NamespaceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (NamespaceMutation) Tx

func (m NamespaceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NamespaceMutation) Type

func (m *NamespaceMutation) Type() string

Type returns the node type of this mutation (Namespace).

func (*NamespaceMutation) UpdatedAt

func (m *NamespaceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NamespaceMutation) Where

func (m *NamespaceMutation) Where(ps ...predicate.Namespace)

Where appends a list predicates to the NamespaceMutation builder.

func (*NamespaceMutation) WhereP

func (m *NamespaceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NamespaceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NamespaceQuery

type NamespaceQuery struct {
	// contains filtered or unexported fields
}

NamespaceQuery is the builder for querying Namespace entities.

func (*NamespaceQuery) Aggregate

func (nq *NamespaceQuery) Aggregate(fns ...AggregateFunc) *NamespaceSelect

Aggregate returns a NamespaceSelect configured with the given aggregations.

func (*NamespaceQuery) All

func (nq *NamespaceQuery) All(ctx context.Context) ([]*Namespace, error)

All executes the query and returns a list of Namespaces.

func (*NamespaceQuery) AllX

func (nq *NamespaceQuery) AllX(ctx context.Context) []*Namespace

AllX is like All, but panics if an error occurs.

func (*NamespaceQuery) Clone

func (nq *NamespaceQuery) Clone() *NamespaceQuery

Clone returns a duplicate of the NamespaceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NamespaceQuery) Count

func (nq *NamespaceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NamespaceQuery) CountX

func (nq *NamespaceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NamespaceQuery) Exist

func (nq *NamespaceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NamespaceQuery) ExistX

func (nq *NamespaceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NamespaceQuery) First

func (nq *NamespaceQuery) First(ctx context.Context) (*Namespace, error)

First returns the first Namespace entity from the query. Returns a *NotFoundError when no Namespace was found.

func (*NamespaceQuery) FirstID

func (nq *NamespaceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Namespace ID from the query. Returns a *NotFoundError when no Namespace ID was found.

func (*NamespaceQuery) FirstIDX

func (nq *NamespaceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NamespaceQuery) FirstX

func (nq *NamespaceQuery) FirstX(ctx context.Context) *Namespace

FirstX is like First, but panics if an error occurs.

func (*NamespaceQuery) ForShare

func (nq *NamespaceQuery) ForShare(opts ...sql.LockOption) *NamespaceQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*NamespaceQuery) ForUpdate

func (nq *NamespaceQuery) ForUpdate(opts ...sql.LockOption) *NamespaceQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*NamespaceQuery) GroupBy

func (nq *NamespaceQuery) GroupBy(field string, fields ...string) *NamespaceGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Namespace.Query().
	GroupBy(namespace.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NamespaceQuery) IDs

func (nq *NamespaceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Namespace IDs.

func (*NamespaceQuery) IDsX

func (nq *NamespaceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NamespaceQuery) Limit

func (nq *NamespaceQuery) Limit(limit int) *NamespaceQuery

Limit the number of records to be returned by this query.

func (*NamespaceQuery) Offset

func (nq *NamespaceQuery) Offset(offset int) *NamespaceQuery

Offset to start from.

func (*NamespaceQuery) Only

func (nq *NamespaceQuery) Only(ctx context.Context) (*Namespace, error)

Only returns a single Namespace entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Namespace entity is found. Returns a *NotFoundError when no Namespace entities are found.

func (*NamespaceQuery) OnlyID

func (nq *NamespaceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Namespace ID in the query. Returns a *NotSingularError when more than one Namespace ID is found. Returns a *NotFoundError when no entities are found.

func (*NamespaceQuery) OnlyIDX

func (nq *NamespaceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NamespaceQuery) OnlyX

func (nq *NamespaceQuery) OnlyX(ctx context.Context) *Namespace

OnlyX is like Only, but panics if an error occurs.

func (*NamespaceQuery) Order

Order specifies how the records should be ordered.

func (*NamespaceQuery) QueryFavorites

func (nq *NamespaceQuery) QueryFavorites() *FavoriteQuery

QueryFavorites chains the current query on the "favorites" edge.

func (*NamespaceQuery) QueryMembers

func (nq *NamespaceQuery) QueryMembers() *MemberQuery

QueryMembers chains the current query on the "members" edge.

func (*NamespaceQuery) QueryProjects

func (nq *NamespaceQuery) QueryProjects() *ProjectQuery

QueryProjects chains the current query on the "projects" edge.

func (*NamespaceQuery) Select

func (nq *NamespaceQuery) Select(fields ...string) *NamespaceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Namespace.Query().
	Select(namespace.FieldCreatedAt).
	Scan(ctx, &v)

func (*NamespaceQuery) Unique

func (nq *NamespaceQuery) Unique(unique bool) *NamespaceQuery

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 (*NamespaceQuery) Where

Where adds a new predicate for the NamespaceQuery builder.

func (*NamespaceQuery) WithFavorites

func (nq *NamespaceQuery) WithFavorites(opts ...func(*FavoriteQuery)) *NamespaceQuery

WithFavorites tells the query-builder to eager-load the nodes that are connected to the "favorites" edge. The optional arguments are used to configure the query builder of the edge.

func (*NamespaceQuery) WithMembers

func (nq *NamespaceQuery) WithMembers(opts ...func(*MemberQuery)) *NamespaceQuery

WithMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge. The optional arguments are used to configure the query builder of the edge.

func (*NamespaceQuery) WithProjects

func (nq *NamespaceQuery) WithProjects(opts ...func(*ProjectQuery)) *NamespaceQuery

WithProjects tells the query-builder to eager-load the nodes that are connected to the "projects" edge. The optional arguments are used to configure the query builder of the edge.

type NamespaceSelect

type NamespaceSelect struct {
	*NamespaceQuery
	// contains filtered or unexported fields
}

NamespaceSelect is the builder for selecting fields of Namespace entities.

func (*NamespaceSelect) Aggregate

func (ns *NamespaceSelect) Aggregate(fns ...AggregateFunc) *NamespaceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NamespaceSelect) Bool

func (s *NamespaceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) BoolX

func (s *NamespaceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NamespaceSelect) Bools

func (s *NamespaceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) BoolsX

func (s *NamespaceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NamespaceSelect) Float64

func (s *NamespaceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) Float64X

func (s *NamespaceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NamespaceSelect) Float64s

func (s *NamespaceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) Float64sX

func (s *NamespaceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NamespaceSelect) Int

func (s *NamespaceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) IntX

func (s *NamespaceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NamespaceSelect) Ints

func (s *NamespaceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) IntsX

func (s *NamespaceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NamespaceSelect) Scan

func (ns *NamespaceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NamespaceSelect) ScanX

func (s *NamespaceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NamespaceSelect) String

func (s *NamespaceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) StringX

func (s *NamespaceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NamespaceSelect) Strings

func (s *NamespaceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NamespaceSelect) StringsX

func (s *NamespaceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NamespaceUpdate

type NamespaceUpdate struct {
	// contains filtered or unexported fields
}

NamespaceUpdate is the builder for updating Namespace entities.

func (*NamespaceUpdate) AddFavoriteIDs

func (nu *NamespaceUpdate) AddFavoriteIDs(ids ...int) *NamespaceUpdate

AddFavoriteIDs adds the "favorites" edge to the Favorite entity by IDs.

func (*NamespaceUpdate) AddFavorites

func (nu *NamespaceUpdate) AddFavorites(f ...*Favorite) *NamespaceUpdate

AddFavorites adds the "favorites" edges to the Favorite entity.

func (*NamespaceUpdate) AddMemberIDs

func (nu *NamespaceUpdate) AddMemberIDs(ids ...int) *NamespaceUpdate

AddMemberIDs adds the "members" edge to the Member entity by IDs.

func (*NamespaceUpdate) AddMembers

func (nu *NamespaceUpdate) AddMembers(m ...*Member) *NamespaceUpdate

AddMembers adds the "members" edges to the Member entity.

func (*NamespaceUpdate) AddProjectIDs

func (nu *NamespaceUpdate) AddProjectIDs(ids ...int) *NamespaceUpdate

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*NamespaceUpdate) AddProjects

func (nu *NamespaceUpdate) AddProjects(p ...*Project) *NamespaceUpdate

AddProjects adds the "projects" edges to the Project entity.

func (*NamespaceUpdate) AppendImagePullSecrets

func (nu *NamespaceUpdate) AppendImagePullSecrets(s []string) *NamespaceUpdate

AppendImagePullSecrets appends s to the "image_pull_secrets" field.

func (*NamespaceUpdate) ClearDeletedAt

func (nu *NamespaceUpdate) ClearDeletedAt() *NamespaceUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NamespaceUpdate) ClearDescription

func (nu *NamespaceUpdate) ClearDescription() *NamespaceUpdate

ClearDescription clears the value of the "description" field.

func (*NamespaceUpdate) ClearFavorites

func (nu *NamespaceUpdate) ClearFavorites() *NamespaceUpdate

ClearFavorites clears all "favorites" edges to the Favorite entity.

func (*NamespaceUpdate) ClearMembers

func (nu *NamespaceUpdate) ClearMembers() *NamespaceUpdate

ClearMembers clears all "members" edges to the Member entity.

func (*NamespaceUpdate) ClearProjects

func (nu *NamespaceUpdate) ClearProjects() *NamespaceUpdate

ClearProjects clears all "projects" edges to the Project entity.

func (*NamespaceUpdate) Exec

func (nu *NamespaceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NamespaceUpdate) ExecX

func (nu *NamespaceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceUpdate) Mutation

func (nu *NamespaceUpdate) Mutation() *NamespaceMutation

Mutation returns the NamespaceMutation object of the builder.

func (*NamespaceUpdate) RemoveFavoriteIDs

func (nu *NamespaceUpdate) RemoveFavoriteIDs(ids ...int) *NamespaceUpdate

RemoveFavoriteIDs removes the "favorites" edge to Favorite entities by IDs.

func (*NamespaceUpdate) RemoveFavorites

func (nu *NamespaceUpdate) RemoveFavorites(f ...*Favorite) *NamespaceUpdate

RemoveFavorites removes "favorites" edges to Favorite entities.

func (*NamespaceUpdate) RemoveMemberIDs

func (nu *NamespaceUpdate) RemoveMemberIDs(ids ...int) *NamespaceUpdate

RemoveMemberIDs removes the "members" edge to Member entities by IDs.

func (*NamespaceUpdate) RemoveMembers

func (nu *NamespaceUpdate) RemoveMembers(m ...*Member) *NamespaceUpdate

RemoveMembers removes "members" edges to Member entities.

func (*NamespaceUpdate) RemoveProjectIDs

func (nu *NamespaceUpdate) RemoveProjectIDs(ids ...int) *NamespaceUpdate

RemoveProjectIDs removes the "projects" edge to Project entities by IDs.

func (*NamespaceUpdate) RemoveProjects

func (nu *NamespaceUpdate) RemoveProjects(p ...*Project) *NamespaceUpdate

RemoveProjects removes "projects" edges to Project entities.

func (*NamespaceUpdate) Save

func (nu *NamespaceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NamespaceUpdate) SaveX

func (nu *NamespaceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NamespaceUpdate) SetCreatorEmail

func (nu *NamespaceUpdate) SetCreatorEmail(s string) *NamespaceUpdate

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceUpdate) SetDeletedAt

func (nu *NamespaceUpdate) SetDeletedAt(t time.Time) *NamespaceUpdate

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceUpdate) SetDescription

func (nu *NamespaceUpdate) SetDescription(s string) *NamespaceUpdate

SetDescription sets the "description" field.

func (*NamespaceUpdate) SetImagePullSecrets

func (nu *NamespaceUpdate) SetImagePullSecrets(s []string) *NamespaceUpdate

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceUpdate) SetName

func (nu *NamespaceUpdate) SetName(s string) *NamespaceUpdate

SetName sets the "name" field.

func (*NamespaceUpdate) SetNillableCreatorEmail

func (nu *NamespaceUpdate) SetNillableCreatorEmail(s *string) *NamespaceUpdate

SetNillableCreatorEmail sets the "creator_email" field if the given value is not nil.

func (*NamespaceUpdate) SetNillableDeletedAt

func (nu *NamespaceUpdate) SetNillableDeletedAt(t *time.Time) *NamespaceUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NamespaceUpdate) SetNillableDescription

func (nu *NamespaceUpdate) SetNillableDescription(s *string) *NamespaceUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*NamespaceUpdate) SetNillableName

func (nu *NamespaceUpdate) SetNillableName(s *string) *NamespaceUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*NamespaceUpdate) SetNillablePrivate

func (nu *NamespaceUpdate) SetNillablePrivate(b *bool) *NamespaceUpdate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*NamespaceUpdate) SetPrivate

func (nu *NamespaceUpdate) SetPrivate(b bool) *NamespaceUpdate

SetPrivate sets the "private" field.

func (*NamespaceUpdate) SetUpdatedAt

func (nu *NamespaceUpdate) SetUpdatedAt(t time.Time) *NamespaceUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NamespaceUpdate) Where

Where appends a list predicates to the NamespaceUpdate builder.

type NamespaceUpdateOne

type NamespaceUpdateOne struct {
	// contains filtered or unexported fields
}

NamespaceUpdateOne is the builder for updating a single Namespace entity.

func (*NamespaceUpdateOne) AddFavoriteIDs

func (nuo *NamespaceUpdateOne) AddFavoriteIDs(ids ...int) *NamespaceUpdateOne

AddFavoriteIDs adds the "favorites" edge to the Favorite entity by IDs.

func (*NamespaceUpdateOne) AddFavorites

func (nuo *NamespaceUpdateOne) AddFavorites(f ...*Favorite) *NamespaceUpdateOne

AddFavorites adds the "favorites" edges to the Favorite entity.

func (*NamespaceUpdateOne) AddMemberIDs

func (nuo *NamespaceUpdateOne) AddMemberIDs(ids ...int) *NamespaceUpdateOne

AddMemberIDs adds the "members" edge to the Member entity by IDs.

func (*NamespaceUpdateOne) AddMembers

func (nuo *NamespaceUpdateOne) AddMembers(m ...*Member) *NamespaceUpdateOne

AddMembers adds the "members" edges to the Member entity.

func (*NamespaceUpdateOne) AddProjectIDs

func (nuo *NamespaceUpdateOne) AddProjectIDs(ids ...int) *NamespaceUpdateOne

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*NamespaceUpdateOne) AddProjects

func (nuo *NamespaceUpdateOne) AddProjects(p ...*Project) *NamespaceUpdateOne

AddProjects adds the "projects" edges to the Project entity.

func (*NamespaceUpdateOne) AppendImagePullSecrets

func (nuo *NamespaceUpdateOne) AppendImagePullSecrets(s []string) *NamespaceUpdateOne

AppendImagePullSecrets appends s to the "image_pull_secrets" field.

func (*NamespaceUpdateOne) ClearDeletedAt

func (nuo *NamespaceUpdateOne) ClearDeletedAt() *NamespaceUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NamespaceUpdateOne) ClearDescription

func (nuo *NamespaceUpdateOne) ClearDescription() *NamespaceUpdateOne

ClearDescription clears the value of the "description" field.

func (*NamespaceUpdateOne) ClearFavorites

func (nuo *NamespaceUpdateOne) ClearFavorites() *NamespaceUpdateOne

ClearFavorites clears all "favorites" edges to the Favorite entity.

func (*NamespaceUpdateOne) ClearMembers

func (nuo *NamespaceUpdateOne) ClearMembers() *NamespaceUpdateOne

ClearMembers clears all "members" edges to the Member entity.

func (*NamespaceUpdateOne) ClearProjects

func (nuo *NamespaceUpdateOne) ClearProjects() *NamespaceUpdateOne

ClearProjects clears all "projects" edges to the Project entity.

func (*NamespaceUpdateOne) Exec

func (nuo *NamespaceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NamespaceUpdateOne) ExecX

func (nuo *NamespaceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceUpdateOne) Mutation

func (nuo *NamespaceUpdateOne) Mutation() *NamespaceMutation

Mutation returns the NamespaceMutation object of the builder.

func (*NamespaceUpdateOne) RemoveFavoriteIDs

func (nuo *NamespaceUpdateOne) RemoveFavoriteIDs(ids ...int) *NamespaceUpdateOne

RemoveFavoriteIDs removes the "favorites" edge to Favorite entities by IDs.

func (*NamespaceUpdateOne) RemoveFavorites

func (nuo *NamespaceUpdateOne) RemoveFavorites(f ...*Favorite) *NamespaceUpdateOne

RemoveFavorites removes "favorites" edges to Favorite entities.

func (*NamespaceUpdateOne) RemoveMemberIDs

func (nuo *NamespaceUpdateOne) RemoveMemberIDs(ids ...int) *NamespaceUpdateOne

RemoveMemberIDs removes the "members" edge to Member entities by IDs.

func (*NamespaceUpdateOne) RemoveMembers

func (nuo *NamespaceUpdateOne) RemoveMembers(m ...*Member) *NamespaceUpdateOne

RemoveMembers removes "members" edges to Member entities.

func (*NamespaceUpdateOne) RemoveProjectIDs

func (nuo *NamespaceUpdateOne) RemoveProjectIDs(ids ...int) *NamespaceUpdateOne

RemoveProjectIDs removes the "projects" edge to Project entities by IDs.

func (*NamespaceUpdateOne) RemoveProjects

func (nuo *NamespaceUpdateOne) RemoveProjects(p ...*Project) *NamespaceUpdateOne

RemoveProjects removes "projects" edges to Project entities.

func (*NamespaceUpdateOne) Save

func (nuo *NamespaceUpdateOne) Save(ctx context.Context) (*Namespace, error)

Save executes the query and returns the updated Namespace entity.

func (*NamespaceUpdateOne) SaveX

func (nuo *NamespaceUpdateOne) SaveX(ctx context.Context) *Namespace

SaveX is like Save, but panics if an error occurs.

func (*NamespaceUpdateOne) Select

func (nuo *NamespaceUpdateOne) Select(field string, fields ...string) *NamespaceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NamespaceUpdateOne) SetCreatorEmail

func (nuo *NamespaceUpdateOne) SetCreatorEmail(s string) *NamespaceUpdateOne

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceUpdateOne) SetDeletedAt

func (nuo *NamespaceUpdateOne) SetDeletedAt(t time.Time) *NamespaceUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceUpdateOne) SetDescription

func (nuo *NamespaceUpdateOne) SetDescription(s string) *NamespaceUpdateOne

SetDescription sets the "description" field.

func (*NamespaceUpdateOne) SetImagePullSecrets

func (nuo *NamespaceUpdateOne) SetImagePullSecrets(s []string) *NamespaceUpdateOne

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceUpdateOne) SetName

func (nuo *NamespaceUpdateOne) SetName(s string) *NamespaceUpdateOne

SetName sets the "name" field.

func (*NamespaceUpdateOne) SetNillableCreatorEmail

func (nuo *NamespaceUpdateOne) SetNillableCreatorEmail(s *string) *NamespaceUpdateOne

SetNillableCreatorEmail sets the "creator_email" field if the given value is not nil.

func (*NamespaceUpdateOne) SetNillableDeletedAt

func (nuo *NamespaceUpdateOne) SetNillableDeletedAt(t *time.Time) *NamespaceUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NamespaceUpdateOne) SetNillableDescription

func (nuo *NamespaceUpdateOne) SetNillableDescription(s *string) *NamespaceUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*NamespaceUpdateOne) SetNillableName

func (nuo *NamespaceUpdateOne) SetNillableName(s *string) *NamespaceUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*NamespaceUpdateOne) SetNillablePrivate

func (nuo *NamespaceUpdateOne) SetNillablePrivate(b *bool) *NamespaceUpdateOne

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*NamespaceUpdateOne) SetPrivate

func (nuo *NamespaceUpdateOne) SetPrivate(b bool) *NamespaceUpdateOne

SetPrivate sets the "private" field.

func (*NamespaceUpdateOne) SetUpdatedAt

func (nuo *NamespaceUpdateOne) SetUpdatedAt(t time.Time) *NamespaceUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*NamespaceUpdateOne) Where

Where appends a list predicates to the NamespaceUpdate builder.

type NamespaceUpsert

type NamespaceUpsert struct {
	*sql.UpdateSet
}

NamespaceUpsert is the "OnConflict" setter.

func (*NamespaceUpsert) ClearDeletedAt

func (u *NamespaceUpsert) ClearDeletedAt() *NamespaceUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NamespaceUpsert) ClearDescription

func (u *NamespaceUpsert) ClearDescription() *NamespaceUpsert

ClearDescription clears the value of the "description" field.

func (*NamespaceUpsert) SetCreatorEmail

func (u *NamespaceUpsert) SetCreatorEmail(v string) *NamespaceUpsert

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceUpsert) SetDeletedAt

func (u *NamespaceUpsert) SetDeletedAt(v time.Time) *NamespaceUpsert

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceUpsert) SetDescription

func (u *NamespaceUpsert) SetDescription(v string) *NamespaceUpsert

SetDescription sets the "description" field.

func (*NamespaceUpsert) SetImagePullSecrets

func (u *NamespaceUpsert) SetImagePullSecrets(v []string) *NamespaceUpsert

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceUpsert) SetName

func (u *NamespaceUpsert) SetName(v string) *NamespaceUpsert

SetName sets the "name" field.

func (*NamespaceUpsert) SetPrivate

func (u *NamespaceUpsert) SetPrivate(v bool) *NamespaceUpsert

SetPrivate sets the "private" field.

func (*NamespaceUpsert) SetUpdatedAt

func (u *NamespaceUpsert) SetUpdatedAt(v time.Time) *NamespaceUpsert

SetUpdatedAt sets the "updated_at" field.

func (*NamespaceUpsert) UpdateCreatorEmail

func (u *NamespaceUpsert) UpdateCreatorEmail() *NamespaceUpsert

UpdateCreatorEmail sets the "creator_email" field to the value that was provided on create.

func (*NamespaceUpsert) UpdateDeletedAt

func (u *NamespaceUpsert) UpdateDeletedAt() *NamespaceUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*NamespaceUpsert) UpdateDescription

func (u *NamespaceUpsert) UpdateDescription() *NamespaceUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*NamespaceUpsert) UpdateImagePullSecrets

func (u *NamespaceUpsert) UpdateImagePullSecrets() *NamespaceUpsert

UpdateImagePullSecrets sets the "image_pull_secrets" field to the value that was provided on create.

func (*NamespaceUpsert) UpdateName

func (u *NamespaceUpsert) UpdateName() *NamespaceUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*NamespaceUpsert) UpdatePrivate

func (u *NamespaceUpsert) UpdatePrivate() *NamespaceUpsert

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*NamespaceUpsert) UpdateUpdatedAt

func (u *NamespaceUpsert) UpdateUpdatedAt() *NamespaceUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NamespaceUpsertBulk

type NamespaceUpsertBulk struct {
	// contains filtered or unexported fields
}

NamespaceUpsertBulk is the builder for "upsert"-ing a bulk of Namespace nodes.

func (*NamespaceUpsertBulk) ClearDeletedAt

func (u *NamespaceUpsertBulk) ClearDeletedAt() *NamespaceUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NamespaceUpsertBulk) ClearDescription

func (u *NamespaceUpsertBulk) ClearDescription() *NamespaceUpsertBulk

ClearDescription clears the value of the "description" field.

func (*NamespaceUpsertBulk) DoNothing

func (u *NamespaceUpsertBulk) DoNothing() *NamespaceUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NamespaceUpsertBulk) Exec

Exec executes the query.

func (*NamespaceUpsertBulk) ExecX

func (u *NamespaceUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Namespace.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NamespaceUpsertBulk) SetCreatorEmail

func (u *NamespaceUpsertBulk) SetCreatorEmail(v string) *NamespaceUpsertBulk

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceUpsertBulk) SetDeletedAt

func (u *NamespaceUpsertBulk) SetDeletedAt(v time.Time) *NamespaceUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceUpsertBulk) SetDescription

func (u *NamespaceUpsertBulk) SetDescription(v string) *NamespaceUpsertBulk

SetDescription sets the "description" field.

func (*NamespaceUpsertBulk) SetImagePullSecrets

func (u *NamespaceUpsertBulk) SetImagePullSecrets(v []string) *NamespaceUpsertBulk

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceUpsertBulk) SetName

SetName sets the "name" field.

func (*NamespaceUpsertBulk) SetPrivate

func (u *NamespaceUpsertBulk) SetPrivate(v bool) *NamespaceUpsertBulk

SetPrivate sets the "private" field.

func (*NamespaceUpsertBulk) SetUpdatedAt

func (u *NamespaceUpsertBulk) SetUpdatedAt(v time.Time) *NamespaceUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*NamespaceUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the NamespaceCreateBulk.OnConflict documentation for more info.

func (*NamespaceUpsertBulk) UpdateCreatorEmail

func (u *NamespaceUpsertBulk) UpdateCreatorEmail() *NamespaceUpsertBulk

UpdateCreatorEmail sets the "creator_email" field to the value that was provided on create.

func (*NamespaceUpsertBulk) UpdateDeletedAt

func (u *NamespaceUpsertBulk) UpdateDeletedAt() *NamespaceUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*NamespaceUpsertBulk) UpdateDescription

func (u *NamespaceUpsertBulk) UpdateDescription() *NamespaceUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*NamespaceUpsertBulk) UpdateImagePullSecrets

func (u *NamespaceUpsertBulk) UpdateImagePullSecrets() *NamespaceUpsertBulk

UpdateImagePullSecrets sets the "image_pull_secrets" field to the value that was provided on create.

func (*NamespaceUpsertBulk) UpdateName

func (u *NamespaceUpsertBulk) UpdateName() *NamespaceUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*NamespaceUpsertBulk) UpdateNewValues

func (u *NamespaceUpsertBulk) UpdateNewValues() *NamespaceUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Namespace.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NamespaceUpsertBulk) UpdatePrivate

func (u *NamespaceUpsertBulk) UpdatePrivate() *NamespaceUpsertBulk

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*NamespaceUpsertBulk) UpdateUpdatedAt

func (u *NamespaceUpsertBulk) UpdateUpdatedAt() *NamespaceUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NamespaceUpsertOne

type NamespaceUpsertOne struct {
	// contains filtered or unexported fields
}

NamespaceUpsertOne is the builder for "upsert"-ing

one Namespace node.

func (*NamespaceUpsertOne) ClearDeletedAt

func (u *NamespaceUpsertOne) ClearDeletedAt() *NamespaceUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NamespaceUpsertOne) ClearDescription

func (u *NamespaceUpsertOne) ClearDescription() *NamespaceUpsertOne

ClearDescription clears the value of the "description" field.

func (*NamespaceUpsertOne) DoNothing

func (u *NamespaceUpsertOne) DoNothing() *NamespaceUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NamespaceUpsertOne) Exec

func (u *NamespaceUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*NamespaceUpsertOne) ExecX

func (u *NamespaceUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NamespaceUpsertOne) ID

func (u *NamespaceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NamespaceUpsertOne) IDX

func (u *NamespaceUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*NamespaceUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Namespace.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NamespaceUpsertOne) SetCreatorEmail

func (u *NamespaceUpsertOne) SetCreatorEmail(v string) *NamespaceUpsertOne

SetCreatorEmail sets the "creator_email" field.

func (*NamespaceUpsertOne) SetDeletedAt

func (u *NamespaceUpsertOne) SetDeletedAt(v time.Time) *NamespaceUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*NamespaceUpsertOne) SetDescription

func (u *NamespaceUpsertOne) SetDescription(v string) *NamespaceUpsertOne

SetDescription sets the "description" field.

func (*NamespaceUpsertOne) SetImagePullSecrets

func (u *NamespaceUpsertOne) SetImagePullSecrets(v []string) *NamespaceUpsertOne

SetImagePullSecrets sets the "image_pull_secrets" field.

func (*NamespaceUpsertOne) SetName

SetName sets the "name" field.

func (*NamespaceUpsertOne) SetPrivate

func (u *NamespaceUpsertOne) SetPrivate(v bool) *NamespaceUpsertOne

SetPrivate sets the "private" field.

func (*NamespaceUpsertOne) SetUpdatedAt

func (u *NamespaceUpsertOne) SetUpdatedAt(v time.Time) *NamespaceUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*NamespaceUpsertOne) Update

func (u *NamespaceUpsertOne) Update(set func(*NamespaceUpsert)) *NamespaceUpsertOne

Update allows overriding fields `UPDATE` values. See the NamespaceCreate.OnConflict documentation for more info.

func (*NamespaceUpsertOne) UpdateCreatorEmail

func (u *NamespaceUpsertOne) UpdateCreatorEmail() *NamespaceUpsertOne

UpdateCreatorEmail sets the "creator_email" field to the value that was provided on create.

func (*NamespaceUpsertOne) UpdateDeletedAt

func (u *NamespaceUpsertOne) UpdateDeletedAt() *NamespaceUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*NamespaceUpsertOne) UpdateDescription

func (u *NamespaceUpsertOne) UpdateDescription() *NamespaceUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*NamespaceUpsertOne) UpdateImagePullSecrets

func (u *NamespaceUpsertOne) UpdateImagePullSecrets() *NamespaceUpsertOne

UpdateImagePullSecrets sets the "image_pull_secrets" field to the value that was provided on create.

func (*NamespaceUpsertOne) UpdateName

func (u *NamespaceUpsertOne) UpdateName() *NamespaceUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*NamespaceUpsertOne) UpdateNewValues

func (u *NamespaceUpsertOne) UpdateNewValues() *NamespaceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Namespace.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NamespaceUpsertOne) UpdatePrivate

func (u *NamespaceUpsertOne) UpdatePrivate() *NamespaceUpsertOne

UpdatePrivate sets the "private" field to the value that was provided on create.

func (*NamespaceUpsertOne) UpdateUpdatedAt

func (u *NamespaceUpsertOne) UpdateUpdatedAt() *NamespaceUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Namespaces

type Namespaces []*Namespace

Namespaces is a parsable slice of Namespace.

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 Project

type Project struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// 项目名
	Name string `json:"name,omitempty"`
	// GitProjectID holds the value of the "git_project_id" field.
	GitProjectID int `json:"git_project_id,omitempty"`
	// git 分支
	GitBranch string `json:"git_branch,omitempty"`
	// git commit
	GitCommit string `json:"git_commit,omitempty"`
	// Config holds the value of the "config" field.
	Config string `json:"config,omitempty"`
	// Creator holds the value of the "creator" field.
	Creator string `json:"creator,omitempty"`
	// OverrideValues holds the value of the "override_values" field.
	OverrideValues string `json:"override_values,omitempty"`
	// docker 镜像
	DockerImage []string `json:"docker_image,omitempty"`
	// pod 选择器
	PodSelectors []string `json:"pod_selectors,omitempty"`
	// Atomic holds the value of the "atomic" field.
	Atomic bool `json:"atomic,omitempty"`
	// 部署状态
	DeployStatus types.Deploy `json:"deploy_status,omitempty"`
	// 环境变量值
	EnvValues []*types.KeyValue `json:"env_values,omitempty"`
	// 额外值
	ExtraValues []*websocket.ExtraValue `json:"extra_values,omitempty"`
	// 用户表单传入的额外值 + 系统默认的额外值
	FinalExtraValues []*websocket.ExtraValue `json:"final_extra_values,omitempty"`
	// 版本
	Version int `json:"version,omitempty"`
	// ConfigType holds the value of the "config_type" field.
	ConfigType string `json:"config_type,omitempty"`
	// manifest
	Manifest []string `json:"manifest,omitempty"`
	// GitCommitWebURL holds the value of the "git_commit_web_url" field.
	GitCommitWebURL string `json:"git_commit_web_url,omitempty"`
	// GitCommitTitle holds the value of the "git_commit_title" field.
	GitCommitTitle string `json:"git_commit_title,omitempty"`
	// GitCommitAuthor holds the value of the "git_commit_author" field.
	GitCommitAuthor string `json:"git_commit_author,omitempty"`
	// GitCommitDate holds the value of the "git_commit_date" field.
	GitCommitDate *time.Time `json:"git_commit_date,omitempty"`
	// NamespaceID holds the value of the "namespace_id" field.
	NamespaceID int `json:"namespace_id,omitempty"`
	// RepoID holds the value of the "repo_id" field.
	RepoID int `json:"repo_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProjectQuery when eager-loading is set.
	Edges ProjectEdges `json:"edges"`
	// contains filtered or unexported fields
}

Project is the model entity for the Project schema.

func (*Project) QueryChangelogs

func (pr *Project) QueryChangelogs() *ChangelogQuery

QueryChangelogs queries the "changelogs" edge of the Project entity.

func (*Project) QueryNamespace

func (pr *Project) QueryNamespace() *NamespaceQuery

QueryNamespace queries the "namespace" edge of the Project entity.

func (*Project) QueryRepo

func (pr *Project) QueryRepo() *RepoQuery

QueryRepo queries the "repo" edge of the Project entity.

func (*Project) String

func (pr *Project) String() string

String implements the fmt.Stringer.

func (*Project) Unwrap

func (pr *Project) Unwrap() *Project

Unwrap unwraps the Project entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Project) Update

func (pr *Project) Update() *ProjectUpdateOne

Update returns a builder for updating this Project. Note that you need to call Project.Unwrap() before calling this method if this Project was returned from a transaction, and the transaction was committed or rolled back.

func (*Project) Value

func (pr *Project) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Project. This includes values selected through modifiers, order, etc.

type ProjectClient

type ProjectClient struct {
	// contains filtered or unexported fields
}

ProjectClient is a client for the Project schema.

func NewProjectClient

func NewProjectClient(c config) *ProjectClient

NewProjectClient returns a client for the Project from the given config.

func (*ProjectClient) Create

func (c *ProjectClient) Create() *ProjectCreate

Create returns a builder for creating a Project entity.

func (*ProjectClient) CreateBulk

func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk

CreateBulk returns a builder for creating a bulk of Project entities.

func (*ProjectClient) Delete

func (c *ProjectClient) Delete() *ProjectDelete

Delete returns a delete builder for Project.

func (*ProjectClient) DeleteOne

func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProjectClient) DeleteOneID

func (c *ProjectClient) DeleteOneID(id int) *ProjectDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProjectClient) Get

func (c *ProjectClient) Get(ctx context.Context, id int) (*Project, error)

Get returns a Project entity by its id.

func (*ProjectClient) GetX

func (c *ProjectClient) GetX(ctx context.Context, id int) *Project

GetX is like Get, but panics if an error occurs.

func (*ProjectClient) Hooks

func (c *ProjectClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProjectClient) Intercept

func (c *ProjectClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `project.Intercept(f(g(h())))`.

func (*ProjectClient) Interceptors

func (c *ProjectClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProjectClient) MapCreateBulk

func (c *ProjectClient) MapCreateBulk(slice any, setFunc func(*ProjectCreate, int)) *ProjectCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ProjectClient) Query

func (c *ProjectClient) Query() *ProjectQuery

Query returns a query builder for Project.

func (*ProjectClient) QueryChangelogs

func (c *ProjectClient) QueryChangelogs(pr *Project) *ChangelogQuery

QueryChangelogs queries the changelogs edge of a Project.

func (*ProjectClient) QueryNamespace

func (c *ProjectClient) QueryNamespace(pr *Project) *NamespaceQuery

QueryNamespace queries the namespace edge of a Project.

func (*ProjectClient) QueryRepo

func (c *ProjectClient) QueryRepo(pr *Project) *RepoQuery

QueryRepo queries the repo edge of a Project.

func (*ProjectClient) Update

func (c *ProjectClient) Update() *ProjectUpdate

Update returns an update builder for Project.

func (*ProjectClient) UpdateOne

func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProjectClient) UpdateOneID

func (c *ProjectClient) UpdateOneID(id int) *ProjectUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProjectClient) Use

func (c *ProjectClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `project.Hooks(f(g(h())))`.

type ProjectCreate

type ProjectCreate struct {
	// contains filtered or unexported fields
}

ProjectCreate is the builder for creating a Project entity.

func (*ProjectCreate) AddChangelogIDs

func (pc *ProjectCreate) AddChangelogIDs(ids ...int) *ProjectCreate

AddChangelogIDs adds the "changelogs" edge to the Changelog entity by IDs.

func (*ProjectCreate) AddChangelogs

func (pc *ProjectCreate) AddChangelogs(c ...*Changelog) *ProjectCreate

AddChangelogs adds the "changelogs" edges to the Changelog entity.

func (*ProjectCreate) Exec

func (pc *ProjectCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreate) ExecX

func (pc *ProjectCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectCreate) Mutation

func (pc *ProjectCreate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectCreate) OnConflict

func (pc *ProjectCreate) OnConflict(opts ...sql.ConflictOption) *ProjectUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Project.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProjectUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ProjectCreate) OnConflictColumns

func (pc *ProjectCreate) OnConflictColumns(columns ...string) *ProjectUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProjectCreate) Save

func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)

Save creates the Project in the database.

func (*ProjectCreate) SaveX

func (pc *ProjectCreate) SaveX(ctx context.Context) *Project

SaveX calls Save and panics if Save returns an error.

func (*ProjectCreate) SetAtomic

func (pc *ProjectCreate) SetAtomic(b bool) *ProjectCreate

SetAtomic sets the "atomic" field.

func (*ProjectCreate) SetConfig

func (pc *ProjectCreate) SetConfig(s string) *ProjectCreate

SetConfig sets the "config" field.

func (*ProjectCreate) SetConfigType

func (pc *ProjectCreate) SetConfigType(s string) *ProjectCreate

SetConfigType sets the "config_type" field.

func (*ProjectCreate) SetCreatedAt

func (pc *ProjectCreate) SetCreatedAt(t time.Time) *ProjectCreate

SetCreatedAt sets the "created_at" field.

func (*ProjectCreate) SetCreator

func (pc *ProjectCreate) SetCreator(s string) *ProjectCreate

SetCreator sets the "creator" field.

func (*ProjectCreate) SetDeletedAt

func (pc *ProjectCreate) SetDeletedAt(t time.Time) *ProjectCreate

SetDeletedAt sets the "deleted_at" field.

func (*ProjectCreate) SetDeployStatus

func (pc *ProjectCreate) SetDeployStatus(t types.Deploy) *ProjectCreate

SetDeployStatus sets the "deploy_status" field.

func (*ProjectCreate) SetDockerImage

func (pc *ProjectCreate) SetDockerImage(s []string) *ProjectCreate

SetDockerImage sets the "docker_image" field.

func (*ProjectCreate) SetEnvValues

func (pc *ProjectCreate) SetEnvValues(tv []*types.KeyValue) *ProjectCreate

SetEnvValues sets the "env_values" field.

func (*ProjectCreate) SetExtraValues

func (pc *ProjectCreate) SetExtraValues(wv []*websocket.ExtraValue) *ProjectCreate

SetExtraValues sets the "extra_values" field.

func (*ProjectCreate) SetFinalExtraValues

func (pc *ProjectCreate) SetFinalExtraValues(wv []*websocket.ExtraValue) *ProjectCreate

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectCreate) SetGitBranch

func (pc *ProjectCreate) SetGitBranch(s string) *ProjectCreate

SetGitBranch sets the "git_branch" field.

func (*ProjectCreate) SetGitCommit

func (pc *ProjectCreate) SetGitCommit(s string) *ProjectCreate

SetGitCommit sets the "git_commit" field.

func (*ProjectCreate) SetGitCommitAuthor

func (pc *ProjectCreate) SetGitCommitAuthor(s string) *ProjectCreate

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectCreate) SetGitCommitDate

func (pc *ProjectCreate) SetGitCommitDate(t time.Time) *ProjectCreate

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectCreate) SetGitCommitTitle

func (pc *ProjectCreate) SetGitCommitTitle(s string) *ProjectCreate

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectCreate) SetGitCommitWebURL

func (pc *ProjectCreate) SetGitCommitWebURL(s string) *ProjectCreate

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectCreate) SetGitProjectID

func (pc *ProjectCreate) SetGitProjectID(i int) *ProjectCreate

SetGitProjectID sets the "git_project_id" field.

func (*ProjectCreate) SetManifest

func (pc *ProjectCreate) SetManifest(s []string) *ProjectCreate

SetManifest sets the "manifest" field.

func (*ProjectCreate) SetName

func (pc *ProjectCreate) SetName(s string) *ProjectCreate

SetName sets the "name" field.

func (*ProjectCreate) SetNamespace

func (pc *ProjectCreate) SetNamespace(n *Namespace) *ProjectCreate

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*ProjectCreate) SetNamespaceID

func (pc *ProjectCreate) SetNamespaceID(i int) *ProjectCreate

SetNamespaceID sets the "namespace_id" field.

func (*ProjectCreate) SetNillableAtomic

func (pc *ProjectCreate) SetNillableAtomic(b *bool) *ProjectCreate

SetNillableAtomic sets the "atomic" field if the given value is not nil.

func (*ProjectCreate) SetNillableConfig

func (pc *ProjectCreate) SetNillableConfig(s *string) *ProjectCreate

SetNillableConfig sets the "config" field if the given value is not nil.

func (*ProjectCreate) SetNillableConfigType

func (pc *ProjectCreate) SetNillableConfigType(s *string) *ProjectCreate

SetNillableConfigType sets the "config_type" field if the given value is not nil.

func (*ProjectCreate) SetNillableCreatedAt

func (pc *ProjectCreate) SetNillableCreatedAt(t *time.Time) *ProjectCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProjectCreate) SetNillableDeletedAt

func (pc *ProjectCreate) SetNillableDeletedAt(t *time.Time) *ProjectCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ProjectCreate) SetNillableDeployStatus

func (pc *ProjectCreate) SetNillableDeployStatus(t *types.Deploy) *ProjectCreate

SetNillableDeployStatus sets the "deploy_status" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitBranch

func (pc *ProjectCreate) SetNillableGitBranch(s *string) *ProjectCreate

SetNillableGitBranch sets the "git_branch" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitCommit

func (pc *ProjectCreate) SetNillableGitCommit(s *string) *ProjectCreate

SetNillableGitCommit sets the "git_commit" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitCommitAuthor

func (pc *ProjectCreate) SetNillableGitCommitAuthor(s *string) *ProjectCreate

SetNillableGitCommitAuthor sets the "git_commit_author" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitCommitDate

func (pc *ProjectCreate) SetNillableGitCommitDate(t *time.Time) *ProjectCreate

SetNillableGitCommitDate sets the "git_commit_date" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitCommitTitle

func (pc *ProjectCreate) SetNillableGitCommitTitle(s *string) *ProjectCreate

SetNillableGitCommitTitle sets the "git_commit_title" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitCommitWebURL

func (pc *ProjectCreate) SetNillableGitCommitWebURL(s *string) *ProjectCreate

SetNillableGitCommitWebURL sets the "git_commit_web_url" field if the given value is not nil.

func (*ProjectCreate) SetNillableGitProjectID

func (pc *ProjectCreate) SetNillableGitProjectID(i *int) *ProjectCreate

SetNillableGitProjectID sets the "git_project_id" field if the given value is not nil.

func (*ProjectCreate) SetNillableName

func (pc *ProjectCreate) SetNillableName(s *string) *ProjectCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProjectCreate) SetNillableNamespaceID

func (pc *ProjectCreate) SetNillableNamespaceID(i *int) *ProjectCreate

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*ProjectCreate) SetNillableOverrideValues

func (pc *ProjectCreate) SetNillableOverrideValues(s *string) *ProjectCreate

SetNillableOverrideValues sets the "override_values" field if the given value is not nil.

func (*ProjectCreate) SetNillableRepoID

func (pc *ProjectCreate) SetNillableRepoID(i *int) *ProjectCreate

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*ProjectCreate) SetNillableUpdatedAt

func (pc *ProjectCreate) SetNillableUpdatedAt(t *time.Time) *ProjectCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProjectCreate) SetNillableVersion

func (pc *ProjectCreate) SetNillableVersion(i *int) *ProjectCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*ProjectCreate) SetOverrideValues

func (pc *ProjectCreate) SetOverrideValues(s string) *ProjectCreate

SetOverrideValues sets the "override_values" field.

func (*ProjectCreate) SetPodSelectors

func (pc *ProjectCreate) SetPodSelectors(s []string) *ProjectCreate

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectCreate) SetRepo

func (pc *ProjectCreate) SetRepo(r *Repo) *ProjectCreate

SetRepo sets the "repo" edge to the Repo entity.

func (*ProjectCreate) SetRepoID

func (pc *ProjectCreate) SetRepoID(i int) *ProjectCreate

SetRepoID sets the "repo_id" field.

func (*ProjectCreate) SetUpdatedAt

func (pc *ProjectCreate) SetUpdatedAt(t time.Time) *ProjectCreate

SetUpdatedAt sets the "updated_at" field.

func (*ProjectCreate) SetVersion

func (pc *ProjectCreate) SetVersion(i int) *ProjectCreate

SetVersion sets the "version" field.

type ProjectCreateBulk

type ProjectCreateBulk struct {
	// contains filtered or unexported fields
}

ProjectCreateBulk is the builder for creating many Project entities in bulk.

func (*ProjectCreateBulk) Exec

func (pcb *ProjectCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectCreateBulk) ExecX

func (pcb *ProjectCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectCreateBulk) OnConflict

func (pcb *ProjectCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProjectUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Project.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ProjectUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*ProjectCreateBulk) OnConflictColumns

func (pcb *ProjectCreateBulk) OnConflictColumns(columns ...string) *ProjectUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ProjectCreateBulk) Save

func (pcb *ProjectCreateBulk) Save(ctx context.Context) ([]*Project, error)

Save creates the Project entities in the database.

func (*ProjectCreateBulk) SaveX

func (pcb *ProjectCreateBulk) SaveX(ctx context.Context) []*Project

SaveX is like Save, but panics if an error occurs.

type ProjectDelete

type ProjectDelete struct {
	// contains filtered or unexported fields
}

ProjectDelete is the builder for deleting a Project entity.

func (*ProjectDelete) Exec

func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProjectDelete) ExecX

func (pd *ProjectDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProjectDelete) Where

func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete

Where appends a list predicates to the ProjectDelete builder.

type ProjectDeleteOne

type ProjectDeleteOne struct {
	// contains filtered or unexported fields
}

ProjectDeleteOne is the builder for deleting a single Project entity.

func (*ProjectDeleteOne) Exec

func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProjectDeleteOne) ExecX

func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectDeleteOne) Where

Where appends a list predicates to the ProjectDelete builder.

type ProjectEdges

type ProjectEdges struct {
	// Changelogs holds the value of the changelogs edge.
	Changelogs []*Changelog `json:"changelogs,omitempty"`
	// Repo holds the value of the repo edge.
	Repo *Repo `json:"repo,omitempty"`
	// Namespace holds the value of the namespace edge.
	Namespace *Namespace `json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

ProjectEdges holds the relations/edges for other nodes in the graph.

func (ProjectEdges) ChangelogsOrErr

func (e ProjectEdges) ChangelogsOrErr() ([]*Changelog, error)

ChangelogsOrErr returns the Changelogs value or an error if the edge was not loaded in eager-loading.

func (ProjectEdges) NamespaceOrErr

func (e ProjectEdges) NamespaceOrErr() (*Namespace, error)

NamespaceOrErr returns the Namespace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ProjectEdges) RepoOrErr

func (e ProjectEdges) RepoOrErr() (*Repo, error)

RepoOrErr returns the Repo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ProjectGroupBy

type ProjectGroupBy struct {
	// contains filtered or unexported fields
}

ProjectGroupBy is the group-by builder for Project entities.

func (*ProjectGroupBy) Aggregate

func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProjectGroupBy) Bool

func (s *ProjectGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) BoolX

func (s *ProjectGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProjectGroupBy) Bools

func (s *ProjectGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) BoolsX

func (s *ProjectGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProjectGroupBy) Float64

func (s *ProjectGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) Float64X

func (s *ProjectGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProjectGroupBy) Float64s

func (s *ProjectGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) Float64sX

func (s *ProjectGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProjectGroupBy) Int

func (s *ProjectGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) IntX

func (s *ProjectGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProjectGroupBy) Ints

func (s *ProjectGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) IntsX

func (s *ProjectGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProjectGroupBy) Scan

func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProjectGroupBy) ScanX

func (s *ProjectGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProjectGroupBy) String

func (s *ProjectGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) StringX

func (s *ProjectGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProjectGroupBy) Strings

func (s *ProjectGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProjectGroupBy) StringsX

func (s *ProjectGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProjectMutation

type ProjectMutation struct {
	// contains filtered or unexported fields
}

ProjectMutation represents an operation that mutates the Project nodes in the graph.

func (*ProjectMutation) AddChangelogIDs

func (m *ProjectMutation) AddChangelogIDs(ids ...int)

AddChangelogIDs adds the "changelogs" edge to the Changelog entity by ids.

func (*ProjectMutation) AddDeployStatus

func (m *ProjectMutation) AddDeployStatus(t types.Deploy)

AddDeployStatus adds t to the "deploy_status" field.

func (*ProjectMutation) AddField

func (m *ProjectMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProjectMutation) AddGitProjectID

func (m *ProjectMutation) AddGitProjectID(i int)

AddGitProjectID adds i to the "git_project_id" field.

func (*ProjectMutation) AddVersion

func (m *ProjectMutation) AddVersion(i int)

AddVersion adds i to the "version" field.

func (*ProjectMutation) AddedDeployStatus

func (m *ProjectMutation) AddedDeployStatus() (r types.Deploy, exists bool)

AddedDeployStatus returns the value that was added to the "deploy_status" field in this mutation.

func (*ProjectMutation) AddedEdges

func (m *ProjectMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProjectMutation) AddedField

func (m *ProjectMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProjectMutation) AddedFields

func (m *ProjectMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProjectMutation) AddedGitProjectID

func (m *ProjectMutation) AddedGitProjectID() (r int, exists bool)

AddedGitProjectID returns the value that was added to the "git_project_id" field in this mutation.

func (*ProjectMutation) AddedIDs

func (m *ProjectMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProjectMutation) AddedVersion

func (m *ProjectMutation) AddedVersion() (r int, exists bool)

AddedVersion returns the value that was added to the "version" field in this mutation.

func (*ProjectMutation) AppendDockerImage

func (m *ProjectMutation) AppendDockerImage(s []string)

AppendDockerImage adds s to the "docker_image" field.

func (*ProjectMutation) AppendEnvValues

func (m *ProjectMutation) AppendEnvValues(tv []*types.KeyValue)

AppendEnvValues adds tv to the "env_values" field.

func (*ProjectMutation) AppendExtraValues

func (m *ProjectMutation) AppendExtraValues(wv []*websocket.ExtraValue)

AppendExtraValues adds wv to the "extra_values" field.

func (*ProjectMutation) AppendFinalExtraValues

func (m *ProjectMutation) AppendFinalExtraValues(wv []*websocket.ExtraValue)

AppendFinalExtraValues adds wv to the "final_extra_values" field.

func (*ProjectMutation) AppendManifest

func (m *ProjectMutation) AppendManifest(s []string)

AppendManifest adds s to the "manifest" field.

func (*ProjectMutation) AppendPodSelectors

func (m *ProjectMutation) AppendPodSelectors(s []string)

AppendPodSelectors adds s to the "pod_selectors" field.

func (*ProjectMutation) AppendedDockerImage

func (m *ProjectMutation) AppendedDockerImage() ([]string, bool)

AppendedDockerImage returns the list of values that were appended to the "docker_image" field in this mutation.

func (*ProjectMutation) AppendedEnvValues

func (m *ProjectMutation) AppendedEnvValues() ([]*types.KeyValue, bool)

AppendedEnvValues returns the list of values that were appended to the "env_values" field in this mutation.

func (*ProjectMutation) AppendedExtraValues

func (m *ProjectMutation) AppendedExtraValues() ([]*websocket.ExtraValue, bool)

AppendedExtraValues returns the list of values that were appended to the "extra_values" field in this mutation.

func (*ProjectMutation) AppendedFinalExtraValues

func (m *ProjectMutation) AppendedFinalExtraValues() ([]*websocket.ExtraValue, bool)

AppendedFinalExtraValues returns the list of values that were appended to the "final_extra_values" field in this mutation.

func (*ProjectMutation) AppendedManifest

func (m *ProjectMutation) AppendedManifest() ([]string, bool)

AppendedManifest returns the list of values that were appended to the "manifest" field in this mutation.

func (*ProjectMutation) AppendedPodSelectors

func (m *ProjectMutation) AppendedPodSelectors() ([]string, bool)

AppendedPodSelectors returns the list of values that were appended to the "pod_selectors" field in this mutation.

func (*ProjectMutation) Atomic

func (m *ProjectMutation) Atomic() (r bool, exists bool)

Atomic returns the value of the "atomic" field in the mutation.

func (*ProjectMutation) ChangelogsCleared

func (m *ProjectMutation) ChangelogsCleared() bool

ChangelogsCleared reports if the "changelogs" edge to the Changelog entity was cleared.

func (*ProjectMutation) ChangelogsIDs

func (m *ProjectMutation) ChangelogsIDs() (ids []int)

ChangelogsIDs returns the "changelogs" edge IDs in the mutation.

func (*ProjectMutation) ClearChangelogs

func (m *ProjectMutation) ClearChangelogs()

ClearChangelogs clears the "changelogs" edge to the Changelog entity.

func (*ProjectMutation) ClearConfig

func (m *ProjectMutation) ClearConfig()

ClearConfig clears the value of the "config" field.

func (*ProjectMutation) ClearConfigType

func (m *ProjectMutation) ClearConfigType()

ClearConfigType clears the value of the "config_type" field.

func (*ProjectMutation) ClearDeletedAt

func (m *ProjectMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ProjectMutation) ClearDockerImage

func (m *ProjectMutation) ClearDockerImage()

ClearDockerImage clears the value of the "docker_image" field.

func (*ProjectMutation) ClearEdge

func (m *ProjectMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ProjectMutation) ClearEnvValues

func (m *ProjectMutation) ClearEnvValues()

ClearEnvValues clears the value of the "env_values" field.

func (*ProjectMutation) ClearExtraValues

func (m *ProjectMutation) ClearExtraValues()

ClearExtraValues clears the value of the "extra_values" field.

func (*ProjectMutation) ClearField

func (m *ProjectMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProjectMutation) ClearFinalExtraValues

func (m *ProjectMutation) ClearFinalExtraValues()

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ProjectMutation) ClearGitBranch

func (m *ProjectMutation) ClearGitBranch()

ClearGitBranch clears the value of the "git_branch" field.

func (*ProjectMutation) ClearGitCommit

func (m *ProjectMutation) ClearGitCommit()

ClearGitCommit clears the value of the "git_commit" field.

func (*ProjectMutation) ClearGitCommitDate

func (m *ProjectMutation) ClearGitCommitDate()

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ProjectMutation) ClearGitProjectID

func (m *ProjectMutation) ClearGitProjectID()

ClearGitProjectID clears the value of the "git_project_id" field.

func (*ProjectMutation) ClearManifest

func (m *ProjectMutation) ClearManifest()

ClearManifest clears the value of the "manifest" field.

func (*ProjectMutation) ClearNamespace

func (m *ProjectMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*ProjectMutation) ClearNamespaceID

func (m *ProjectMutation) ClearNamespaceID()

ClearNamespaceID clears the value of the "namespace_id" field.

func (*ProjectMutation) ClearOverrideValues

func (m *ProjectMutation) ClearOverrideValues()

ClearOverrideValues clears the value of the "override_values" field.

func (*ProjectMutation) ClearPodSelectors

func (m *ProjectMutation) ClearPodSelectors()

ClearPodSelectors clears the value of the "pod_selectors" field.

func (*ProjectMutation) ClearRepo

func (m *ProjectMutation) ClearRepo()

ClearRepo clears the "repo" edge to the Repo entity.

func (*ProjectMutation) ClearRepoID

func (m *ProjectMutation) ClearRepoID()

ClearRepoID clears the value of the "repo_id" field.

func (*ProjectMutation) ClearedEdges

func (m *ProjectMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProjectMutation) ClearedFields

func (m *ProjectMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProjectMutation) Client

func (m ProjectMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ProjectMutation) Config

func (m *ProjectMutation) Config() (r string, exists bool)

Config returns the value of the "config" field in the mutation.

func (*ProjectMutation) ConfigCleared

func (m *ProjectMutation) ConfigCleared() bool

ConfigCleared returns if the "config" field was cleared in this mutation.

func (*ProjectMutation) ConfigType

func (m *ProjectMutation) ConfigType() (r string, exists bool)

ConfigType returns the value of the "config_type" field in the mutation.

func (*ProjectMutation) ConfigTypeCleared

func (m *ProjectMutation) ConfigTypeCleared() bool

ConfigTypeCleared returns if the "config_type" field was cleared in this mutation.

func (*ProjectMutation) CreatedAt

func (m *ProjectMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ProjectMutation) Creator

func (m *ProjectMutation) Creator() (r string, exists bool)

Creator returns the value of the "creator" field in the mutation.

func (*ProjectMutation) DeletedAt

func (m *ProjectMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*ProjectMutation) DeletedAtCleared

func (m *ProjectMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*ProjectMutation) DeployStatus

func (m *ProjectMutation) DeployStatus() (r types.Deploy, exists bool)

DeployStatus returns the value of the "deploy_status" field in the mutation.

func (*ProjectMutation) DockerImage

func (m *ProjectMutation) DockerImage() (r []string, exists bool)

DockerImage returns the value of the "docker_image" field in the mutation.

func (*ProjectMutation) DockerImageCleared

func (m *ProjectMutation) DockerImageCleared() bool

DockerImageCleared returns if the "docker_image" field was cleared in this mutation.

func (*ProjectMutation) EdgeCleared

func (m *ProjectMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProjectMutation) EnvValues

func (m *ProjectMutation) EnvValues() (r []*types.KeyValue, exists bool)

EnvValues returns the value of the "env_values" field in the mutation.

func (*ProjectMutation) EnvValuesCleared

func (m *ProjectMutation) EnvValuesCleared() bool

EnvValuesCleared returns if the "env_values" field was cleared in this mutation.

func (*ProjectMutation) ExtraValues

func (m *ProjectMutation) ExtraValues() (r []*websocket.ExtraValue, exists bool)

ExtraValues returns the value of the "extra_values" field in the mutation.

func (*ProjectMutation) ExtraValuesCleared

func (m *ProjectMutation) ExtraValuesCleared() bool

ExtraValuesCleared returns if the "extra_values" field was cleared in this mutation.

func (*ProjectMutation) Field

func (m *ProjectMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ProjectMutation) FieldCleared

func (m *ProjectMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProjectMutation) Fields

func (m *ProjectMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ProjectMutation) FinalExtraValues

func (m *ProjectMutation) FinalExtraValues() (r []*websocket.ExtraValue, exists bool)

FinalExtraValues returns the value of the "final_extra_values" field in the mutation.

func (*ProjectMutation) FinalExtraValuesCleared

func (m *ProjectMutation) FinalExtraValuesCleared() bool

FinalExtraValuesCleared returns if the "final_extra_values" field was cleared in this mutation.

func (*ProjectMutation) GitBranch

func (m *ProjectMutation) GitBranch() (r string, exists bool)

GitBranch returns the value of the "git_branch" field in the mutation.

func (*ProjectMutation) GitBranchCleared

func (m *ProjectMutation) GitBranchCleared() bool

GitBranchCleared returns if the "git_branch" field was cleared in this mutation.

func (*ProjectMutation) GitCommit

func (m *ProjectMutation) GitCommit() (r string, exists bool)

GitCommit returns the value of the "git_commit" field in the mutation.

func (*ProjectMutation) GitCommitAuthor

func (m *ProjectMutation) GitCommitAuthor() (r string, exists bool)

GitCommitAuthor returns the value of the "git_commit_author" field in the mutation.

func (*ProjectMutation) GitCommitCleared

func (m *ProjectMutation) GitCommitCleared() bool

GitCommitCleared returns if the "git_commit" field was cleared in this mutation.

func (*ProjectMutation) GitCommitDate

func (m *ProjectMutation) GitCommitDate() (r time.Time, exists bool)

GitCommitDate returns the value of the "git_commit_date" field in the mutation.

func (*ProjectMutation) GitCommitDateCleared

func (m *ProjectMutation) GitCommitDateCleared() bool

GitCommitDateCleared returns if the "git_commit_date" field was cleared in this mutation.

func (*ProjectMutation) GitCommitTitle

func (m *ProjectMutation) GitCommitTitle() (r string, exists bool)

GitCommitTitle returns the value of the "git_commit_title" field in the mutation.

func (*ProjectMutation) GitCommitWebURL

func (m *ProjectMutation) GitCommitWebURL() (r string, exists bool)

GitCommitWebURL returns the value of the "git_commit_web_url" field in the mutation.

func (*ProjectMutation) GitProjectID

func (m *ProjectMutation) GitProjectID() (r int, exists bool)

GitProjectID returns the value of the "git_project_id" field in the mutation.

func (*ProjectMutation) GitProjectIDCleared

func (m *ProjectMutation) GitProjectIDCleared() bool

GitProjectIDCleared returns if the "git_project_id" field was cleared in this mutation.

func (*ProjectMutation) ID

func (m *ProjectMutation) 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 (*ProjectMutation) IDs

func (m *ProjectMutation) 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 (*ProjectMutation) Manifest

func (m *ProjectMutation) Manifest() (r []string, exists bool)

Manifest returns the value of the "manifest" field in the mutation.

func (*ProjectMutation) ManifestCleared

func (m *ProjectMutation) ManifestCleared() bool

ManifestCleared returns if the "manifest" field was cleared in this mutation.

func (*ProjectMutation) Name

func (m *ProjectMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ProjectMutation) NamespaceCleared

func (m *ProjectMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the Namespace entity was cleared.

func (*ProjectMutation) NamespaceID

func (m *ProjectMutation) NamespaceID() (r int, exists bool)

NamespaceID returns the value of the "namespace_id" field in the mutation.

func (*ProjectMutation) NamespaceIDCleared

func (m *ProjectMutation) NamespaceIDCleared() bool

NamespaceIDCleared returns if the "namespace_id" field was cleared in this mutation.

func (*ProjectMutation) NamespaceIDs

func (m *ProjectMutation) NamespaceIDs() (ids []int)

NamespaceIDs returns the "namespace" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NamespaceID instead. It exists only for internal usage by the builders.

func (*ProjectMutation) OldAtomic

func (m *ProjectMutation) OldAtomic(ctx context.Context) (v bool, err error)

OldAtomic returns the old "atomic" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldConfig

func (m *ProjectMutation) OldConfig(ctx context.Context) (v string, err error)

OldConfig returns the old "config" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldConfigType

func (m *ProjectMutation) OldConfigType(ctx context.Context) (v string, err error)

OldConfigType returns the old "config_type" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldCreatedAt

func (m *ProjectMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldCreator

func (m *ProjectMutation) OldCreator(ctx context.Context) (v string, err error)

OldCreator returns the old "creator" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldDeletedAt

func (m *ProjectMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldDeployStatus

func (m *ProjectMutation) OldDeployStatus(ctx context.Context) (v types.Deploy, err error)

OldDeployStatus returns the old "deploy_status" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldDockerImage

func (m *ProjectMutation) OldDockerImage(ctx context.Context) (v []string, err error)

OldDockerImage returns the old "docker_image" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldEnvValues

func (m *ProjectMutation) OldEnvValues(ctx context.Context) (v []*types.KeyValue, err error)

OldEnvValues returns the old "env_values" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldExtraValues

func (m *ProjectMutation) OldExtraValues(ctx context.Context) (v []*websocket.ExtraValue, err error)

OldExtraValues returns the old "extra_values" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldField

func (m *ProjectMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ProjectMutation) OldFinalExtraValues

func (m *ProjectMutation) OldFinalExtraValues(ctx context.Context) (v []*websocket.ExtraValue, err error)

OldFinalExtraValues returns the old "final_extra_values" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitBranch

func (m *ProjectMutation) OldGitBranch(ctx context.Context) (v string, err error)

OldGitBranch returns the old "git_branch" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitCommit

func (m *ProjectMutation) OldGitCommit(ctx context.Context) (v string, err error)

OldGitCommit returns the old "git_commit" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitCommitAuthor

func (m *ProjectMutation) OldGitCommitAuthor(ctx context.Context) (v string, err error)

OldGitCommitAuthor returns the old "git_commit_author" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitCommitDate

func (m *ProjectMutation) OldGitCommitDate(ctx context.Context) (v *time.Time, err error)

OldGitCommitDate returns the old "git_commit_date" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitCommitTitle

func (m *ProjectMutation) OldGitCommitTitle(ctx context.Context) (v string, err error)

OldGitCommitTitle returns the old "git_commit_title" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitCommitWebURL

func (m *ProjectMutation) OldGitCommitWebURL(ctx context.Context) (v string, err error)

OldGitCommitWebURL returns the old "git_commit_web_url" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldGitProjectID

func (m *ProjectMutation) OldGitProjectID(ctx context.Context) (v int, err error)

OldGitProjectID returns the old "git_project_id" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldManifest

func (m *ProjectMutation) OldManifest(ctx context.Context) (v []string, err error)

OldManifest returns the old "manifest" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldName

func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldNamespaceID

func (m *ProjectMutation) OldNamespaceID(ctx context.Context) (v int, err error)

OldNamespaceID returns the old "namespace_id" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldOverrideValues

func (m *ProjectMutation) OldOverrideValues(ctx context.Context) (v string, err error)

OldOverrideValues returns the old "override_values" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldPodSelectors

func (m *ProjectMutation) OldPodSelectors(ctx context.Context) (v []string, err error)

OldPodSelectors returns the old "pod_selectors" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldRepoID

func (m *ProjectMutation) OldRepoID(ctx context.Context) (v int, err error)

OldRepoID returns the old "repo_id" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldUpdatedAt

func (m *ProjectMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) OldVersion

func (m *ProjectMutation) OldVersion(ctx context.Context) (v int, err error)

OldVersion returns the old "version" field's value of the Project entity. If the Project object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProjectMutation) Op

func (m *ProjectMutation) Op() Op

Op returns the operation name.

func (*ProjectMutation) OverrideValues

func (m *ProjectMutation) OverrideValues() (r string, exists bool)

OverrideValues returns the value of the "override_values" field in the mutation.

func (*ProjectMutation) OverrideValuesCleared

func (m *ProjectMutation) OverrideValuesCleared() bool

OverrideValuesCleared returns if the "override_values" field was cleared in this mutation.

func (*ProjectMutation) PodSelectors

func (m *ProjectMutation) PodSelectors() (r []string, exists bool)

PodSelectors returns the value of the "pod_selectors" field in the mutation.

func (*ProjectMutation) PodSelectorsCleared

func (m *ProjectMutation) PodSelectorsCleared() bool

PodSelectorsCleared returns if the "pod_selectors" field was cleared in this mutation.

func (*ProjectMutation) RemoveChangelogIDs

func (m *ProjectMutation) RemoveChangelogIDs(ids ...int)

RemoveChangelogIDs removes the "changelogs" edge to the Changelog entity by IDs.

func (*ProjectMutation) RemovedChangelogsIDs

func (m *ProjectMutation) RemovedChangelogsIDs() (ids []int)

RemovedChangelogs returns the removed IDs of the "changelogs" edge to the Changelog entity.

func (*ProjectMutation) RemovedEdges

func (m *ProjectMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProjectMutation) RemovedIDs

func (m *ProjectMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ProjectMutation) RepoCleared

func (m *ProjectMutation) RepoCleared() bool

RepoCleared reports if the "repo" edge to the Repo entity was cleared.

func (*ProjectMutation) RepoID

func (m *ProjectMutation) RepoID() (r int, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*ProjectMutation) RepoIDCleared

func (m *ProjectMutation) RepoIDCleared() bool

RepoIDCleared returns if the "repo_id" field was cleared in this mutation.

func (*ProjectMutation) RepoIDs

func (m *ProjectMutation) RepoIDs() (ids []int)

RepoIDs returns the "repo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepoID instead. It exists only for internal usage by the builders.

func (*ProjectMutation) ResetAtomic

func (m *ProjectMutation) ResetAtomic()

ResetAtomic resets all changes to the "atomic" field.

func (*ProjectMutation) ResetChangelogs

func (m *ProjectMutation) ResetChangelogs()

ResetChangelogs resets all changes to the "changelogs" edge.

func (*ProjectMutation) ResetConfig

func (m *ProjectMutation) ResetConfig()

ResetConfig resets all changes to the "config" field.

func (*ProjectMutation) ResetConfigType

func (m *ProjectMutation) ResetConfigType()

ResetConfigType resets all changes to the "config_type" field.

func (*ProjectMutation) ResetCreatedAt

func (m *ProjectMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ProjectMutation) ResetCreator

func (m *ProjectMutation) ResetCreator()

ResetCreator resets all changes to the "creator" field.

func (*ProjectMutation) ResetDeletedAt

func (m *ProjectMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*ProjectMutation) ResetDeployStatus

func (m *ProjectMutation) ResetDeployStatus()

ResetDeployStatus resets all changes to the "deploy_status" field.

func (*ProjectMutation) ResetDockerImage

func (m *ProjectMutation) ResetDockerImage()

ResetDockerImage resets all changes to the "docker_image" field.

func (*ProjectMutation) ResetEdge

func (m *ProjectMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ProjectMutation) ResetEnvValues

func (m *ProjectMutation) ResetEnvValues()

ResetEnvValues resets all changes to the "env_values" field.

func (*ProjectMutation) ResetExtraValues

func (m *ProjectMutation) ResetExtraValues()

ResetExtraValues resets all changes to the "extra_values" field.

func (*ProjectMutation) ResetField

func (m *ProjectMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ProjectMutation) ResetFinalExtraValues

func (m *ProjectMutation) ResetFinalExtraValues()

ResetFinalExtraValues resets all changes to the "final_extra_values" field.

func (*ProjectMutation) ResetGitBranch

func (m *ProjectMutation) ResetGitBranch()

ResetGitBranch resets all changes to the "git_branch" field.

func (*ProjectMutation) ResetGitCommit

func (m *ProjectMutation) ResetGitCommit()

ResetGitCommit resets all changes to the "git_commit" field.

func (*ProjectMutation) ResetGitCommitAuthor

func (m *ProjectMutation) ResetGitCommitAuthor()

ResetGitCommitAuthor resets all changes to the "git_commit_author" field.

func (*ProjectMutation) ResetGitCommitDate

func (m *ProjectMutation) ResetGitCommitDate()

ResetGitCommitDate resets all changes to the "git_commit_date" field.

func (*ProjectMutation) ResetGitCommitTitle

func (m *ProjectMutation) ResetGitCommitTitle()

ResetGitCommitTitle resets all changes to the "git_commit_title" field.

func (*ProjectMutation) ResetGitCommitWebURL

func (m *ProjectMutation) ResetGitCommitWebURL()

ResetGitCommitWebURL resets all changes to the "git_commit_web_url" field.

func (*ProjectMutation) ResetGitProjectID

func (m *ProjectMutation) ResetGitProjectID()

ResetGitProjectID resets all changes to the "git_project_id" field.

func (*ProjectMutation) ResetManifest

func (m *ProjectMutation) ResetManifest()

ResetManifest resets all changes to the "manifest" field.

func (*ProjectMutation) ResetName

func (m *ProjectMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ProjectMutation) ResetNamespace

func (m *ProjectMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" edge.

func (*ProjectMutation) ResetNamespaceID

func (m *ProjectMutation) ResetNamespaceID()

ResetNamespaceID resets all changes to the "namespace_id" field.

func (*ProjectMutation) ResetOverrideValues

func (m *ProjectMutation) ResetOverrideValues()

ResetOverrideValues resets all changes to the "override_values" field.

func (*ProjectMutation) ResetPodSelectors

func (m *ProjectMutation) ResetPodSelectors()

ResetPodSelectors resets all changes to the "pod_selectors" field.

func (*ProjectMutation) ResetRepo

func (m *ProjectMutation) ResetRepo()

ResetRepo resets all changes to the "repo" edge.

func (*ProjectMutation) ResetRepoID

func (m *ProjectMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*ProjectMutation) ResetUpdatedAt

func (m *ProjectMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ProjectMutation) ResetVersion

func (m *ProjectMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*ProjectMutation) SetAtomic

func (m *ProjectMutation) SetAtomic(b bool)

SetAtomic sets the "atomic" field.

func (*ProjectMutation) SetConfig

func (m *ProjectMutation) SetConfig(s string)

SetConfig sets the "config" field.

func (*ProjectMutation) SetConfigType

func (m *ProjectMutation) SetConfigType(s string)

SetConfigType sets the "config_type" field.

func (*ProjectMutation) SetCreatedAt

func (m *ProjectMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ProjectMutation) SetCreator

func (m *ProjectMutation) SetCreator(s string)

SetCreator sets the "creator" field.

func (*ProjectMutation) SetDeletedAt

func (m *ProjectMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*ProjectMutation) SetDeployStatus

func (m *ProjectMutation) SetDeployStatus(t types.Deploy)

SetDeployStatus sets the "deploy_status" field.

func (*ProjectMutation) SetDockerImage

func (m *ProjectMutation) SetDockerImage(s []string)

SetDockerImage sets the "docker_image" field.

func (*ProjectMutation) SetEnvValues

func (m *ProjectMutation) SetEnvValues(tv []*types.KeyValue)

SetEnvValues sets the "env_values" field.

func (*ProjectMutation) SetExtraValues

func (m *ProjectMutation) SetExtraValues(wv []*websocket.ExtraValue)

SetExtraValues sets the "extra_values" field.

func (*ProjectMutation) SetField

func (m *ProjectMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ProjectMutation) SetFinalExtraValues

func (m *ProjectMutation) SetFinalExtraValues(wv []*websocket.ExtraValue)

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectMutation) SetGitBranch

func (m *ProjectMutation) SetGitBranch(s string)

SetGitBranch sets the "git_branch" field.

func (*ProjectMutation) SetGitCommit

func (m *ProjectMutation) SetGitCommit(s string)

SetGitCommit sets the "git_commit" field.

func (*ProjectMutation) SetGitCommitAuthor

func (m *ProjectMutation) SetGitCommitAuthor(s string)

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectMutation) SetGitCommitDate

func (m *ProjectMutation) SetGitCommitDate(t time.Time)

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectMutation) SetGitCommitTitle

func (m *ProjectMutation) SetGitCommitTitle(s string)

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectMutation) SetGitCommitWebURL

func (m *ProjectMutation) SetGitCommitWebURL(s string)

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectMutation) SetGitProjectID

func (m *ProjectMutation) SetGitProjectID(i int)

SetGitProjectID sets the "git_project_id" field.

func (*ProjectMutation) SetManifest

func (m *ProjectMutation) SetManifest(s []string)

SetManifest sets the "manifest" field.

func (*ProjectMutation) SetName

func (m *ProjectMutation) SetName(s string)

SetName sets the "name" field.

func (*ProjectMutation) SetNamespaceID

func (m *ProjectMutation) SetNamespaceID(i int)

SetNamespaceID sets the "namespace_id" field.

func (*ProjectMutation) SetOp

func (m *ProjectMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProjectMutation) SetOverrideValues

func (m *ProjectMutation) SetOverrideValues(s string)

SetOverrideValues sets the "override_values" field.

func (*ProjectMutation) SetPodSelectors

func (m *ProjectMutation) SetPodSelectors(s []string)

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectMutation) SetRepoID

func (m *ProjectMutation) SetRepoID(i int)

SetRepoID sets the "repo_id" field.

func (*ProjectMutation) SetUpdatedAt

func (m *ProjectMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ProjectMutation) SetVersion

func (m *ProjectMutation) SetVersion(i int)

SetVersion sets the "version" field.

func (ProjectMutation) Tx

func (m ProjectMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProjectMutation) Type

func (m *ProjectMutation) Type() string

Type returns the node type of this mutation (Project).

func (*ProjectMutation) UpdatedAt

func (m *ProjectMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ProjectMutation) Version

func (m *ProjectMutation) Version() (r int, exists bool)

Version returns the value of the "version" field in the mutation.

func (*ProjectMutation) Where

func (m *ProjectMutation) Where(ps ...predicate.Project)

Where appends a list predicates to the ProjectMutation builder.

func (*ProjectMutation) WhereP

func (m *ProjectMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProjectMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProjectQuery

type ProjectQuery struct {
	// contains filtered or unexported fields
}

ProjectQuery is the builder for querying Project entities.

func (*ProjectQuery) Aggregate

func (pq *ProjectQuery) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate returns a ProjectSelect configured with the given aggregations.

func (*ProjectQuery) All

func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)

All executes the query and returns a list of Projects.

func (*ProjectQuery) AllX

func (pq *ProjectQuery) AllX(ctx context.Context) []*Project

AllX is like All, but panics if an error occurs.

func (*ProjectQuery) Clone

func (pq *ProjectQuery) Clone() *ProjectQuery

Clone returns a duplicate of the ProjectQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProjectQuery) Count

func (pq *ProjectQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProjectQuery) CountX

func (pq *ProjectQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProjectQuery) Exist

func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProjectQuery) ExistX

func (pq *ProjectQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProjectQuery) First

func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)

First returns the first Project entity from the query. Returns a *NotFoundError when no Project was found.

func (*ProjectQuery) FirstID

func (pq *ProjectQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Project ID from the query. Returns a *NotFoundError when no Project ID was found.

func (*ProjectQuery) FirstIDX

func (pq *ProjectQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProjectQuery) FirstX

func (pq *ProjectQuery) FirstX(ctx context.Context) *Project

FirstX is like First, but panics if an error occurs.

func (*ProjectQuery) ForShare

func (pq *ProjectQuery) ForShare(opts ...sql.LockOption) *ProjectQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*ProjectQuery) ForUpdate

func (pq *ProjectQuery) ForUpdate(opts ...sql.LockOption) *ProjectQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*ProjectQuery) GroupBy

func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Project.Query().
	GroupBy(project.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProjectQuery) IDs

func (pq *ProjectQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Project IDs.

func (*ProjectQuery) IDsX

func (pq *ProjectQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ProjectQuery) Limit

func (pq *ProjectQuery) Limit(limit int) *ProjectQuery

Limit the number of records to be returned by this query.

func (*ProjectQuery) Offset

func (pq *ProjectQuery) Offset(offset int) *ProjectQuery

Offset to start from.

func (*ProjectQuery) Only

func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)

Only returns a single Project entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Project entity is found. Returns a *NotFoundError when no Project entities are found.

func (*ProjectQuery) OnlyID

func (pq *ProjectQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Project ID in the query. Returns a *NotSingularError when more than one Project ID is found. Returns a *NotFoundError when no entities are found.

func (*ProjectQuery) OnlyIDX

func (pq *ProjectQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProjectQuery) OnlyX

func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project

OnlyX is like Only, but panics if an error occurs.

func (*ProjectQuery) Order

func (pq *ProjectQuery) Order(o ...project.OrderOption) *ProjectQuery

Order specifies how the records should be ordered.

func (*ProjectQuery) QueryChangelogs

func (pq *ProjectQuery) QueryChangelogs() *ChangelogQuery

QueryChangelogs chains the current query on the "changelogs" edge.

func (*ProjectQuery) QueryNamespace

func (pq *ProjectQuery) QueryNamespace() *NamespaceQuery

QueryNamespace chains the current query on the "namespace" edge.

func (*ProjectQuery) QueryRepo

func (pq *ProjectQuery) QueryRepo() *RepoQuery

QueryRepo chains the current query on the "repo" edge.

func (*ProjectQuery) Select

func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Project.Query().
	Select(project.FieldCreatedAt).
	Scan(ctx, &v)

func (*ProjectQuery) Unique

func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ProjectQuery) Where

func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery

Where adds a new predicate for the ProjectQuery builder.

func (*ProjectQuery) WithChangelogs

func (pq *ProjectQuery) WithChangelogs(opts ...func(*ChangelogQuery)) *ProjectQuery

WithChangelogs tells the query-builder to eager-load the nodes that are connected to the "changelogs" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithNamespace

func (pq *ProjectQuery) WithNamespace(opts ...func(*NamespaceQuery)) *ProjectQuery

WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProjectQuery) WithRepo

func (pq *ProjectQuery) WithRepo(opts ...func(*RepoQuery)) *ProjectQuery

WithRepo tells the query-builder to eager-load the nodes that are connected to the "repo" edge. The optional arguments are used to configure the query builder of the edge.

type ProjectSelect

type ProjectSelect struct {
	*ProjectQuery
	// contains filtered or unexported fields
}

ProjectSelect is the builder for selecting fields of Project entities.

func (*ProjectSelect) Aggregate

func (ps *ProjectSelect) Aggregate(fns ...AggregateFunc) *ProjectSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProjectSelect) Bool

func (s *ProjectSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) BoolX

func (s *ProjectSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProjectSelect) Bools

func (s *ProjectSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) BoolsX

func (s *ProjectSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProjectSelect) Float64

func (s *ProjectSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) Float64X

func (s *ProjectSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProjectSelect) Float64s

func (s *ProjectSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) Float64sX

func (s *ProjectSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProjectSelect) Int

func (s *ProjectSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) IntX

func (s *ProjectSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProjectSelect) Ints

func (s *ProjectSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) IntsX

func (s *ProjectSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProjectSelect) Scan

func (ps *ProjectSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProjectSelect) ScanX

func (s *ProjectSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProjectSelect) String

func (s *ProjectSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) StringX

func (s *ProjectSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProjectSelect) Strings

func (s *ProjectSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProjectSelect) StringsX

func (s *ProjectSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProjectUpdate

type ProjectUpdate struct {
	// contains filtered or unexported fields
}

ProjectUpdate is the builder for updating Project entities.

func (*ProjectUpdate) AddChangelogIDs

func (pu *ProjectUpdate) AddChangelogIDs(ids ...int) *ProjectUpdate

AddChangelogIDs adds the "changelogs" edge to the Changelog entity by IDs.

func (*ProjectUpdate) AddChangelogs

func (pu *ProjectUpdate) AddChangelogs(c ...*Changelog) *ProjectUpdate

AddChangelogs adds the "changelogs" edges to the Changelog entity.

func (*ProjectUpdate) AddDeployStatus

func (pu *ProjectUpdate) AddDeployStatus(t types.Deploy) *ProjectUpdate

AddDeployStatus adds t to the "deploy_status" field.

func (*ProjectUpdate) AddGitProjectID

func (pu *ProjectUpdate) AddGitProjectID(i int) *ProjectUpdate

AddGitProjectID adds i to the "git_project_id" field.

func (*ProjectUpdate) AddVersion

func (pu *ProjectUpdate) AddVersion(i int) *ProjectUpdate

AddVersion adds i to the "version" field.

func (*ProjectUpdate) AppendDockerImage

func (pu *ProjectUpdate) AppendDockerImage(s []string) *ProjectUpdate

AppendDockerImage appends s to the "docker_image" field.

func (*ProjectUpdate) AppendEnvValues

func (pu *ProjectUpdate) AppendEnvValues(tv []*types.KeyValue) *ProjectUpdate

AppendEnvValues appends tv to the "env_values" field.

func (*ProjectUpdate) AppendExtraValues

func (pu *ProjectUpdate) AppendExtraValues(wv []*websocket.ExtraValue) *ProjectUpdate

AppendExtraValues appends wv to the "extra_values" field.

func (*ProjectUpdate) AppendFinalExtraValues

func (pu *ProjectUpdate) AppendFinalExtraValues(wv []*websocket.ExtraValue) *ProjectUpdate

AppendFinalExtraValues appends wv to the "final_extra_values" field.

func (*ProjectUpdate) AppendManifest

func (pu *ProjectUpdate) AppendManifest(s []string) *ProjectUpdate

AppendManifest appends s to the "manifest" field.

func (*ProjectUpdate) AppendPodSelectors

func (pu *ProjectUpdate) AppendPodSelectors(s []string) *ProjectUpdate

AppendPodSelectors appends s to the "pod_selectors" field.

func (*ProjectUpdate) ClearChangelogs

func (pu *ProjectUpdate) ClearChangelogs() *ProjectUpdate

ClearChangelogs clears all "changelogs" edges to the Changelog entity.

func (*ProjectUpdate) ClearConfig

func (pu *ProjectUpdate) ClearConfig() *ProjectUpdate

ClearConfig clears the value of the "config" field.

func (*ProjectUpdate) ClearConfigType

func (pu *ProjectUpdate) ClearConfigType() *ProjectUpdate

ClearConfigType clears the value of the "config_type" field.

func (*ProjectUpdate) ClearDeletedAt

func (pu *ProjectUpdate) ClearDeletedAt() *ProjectUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ProjectUpdate) ClearDockerImage

func (pu *ProjectUpdate) ClearDockerImage() *ProjectUpdate

ClearDockerImage clears the value of the "docker_image" field.

func (*ProjectUpdate) ClearEnvValues

func (pu *ProjectUpdate) ClearEnvValues() *ProjectUpdate

ClearEnvValues clears the value of the "env_values" field.

func (*ProjectUpdate) ClearExtraValues

func (pu *ProjectUpdate) ClearExtraValues() *ProjectUpdate

ClearExtraValues clears the value of the "extra_values" field.

func (*ProjectUpdate) ClearFinalExtraValues

func (pu *ProjectUpdate) ClearFinalExtraValues() *ProjectUpdate

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ProjectUpdate) ClearGitBranch

func (pu *ProjectUpdate) ClearGitBranch() *ProjectUpdate

ClearGitBranch clears the value of the "git_branch" field.

func (*ProjectUpdate) ClearGitCommit

func (pu *ProjectUpdate) ClearGitCommit() *ProjectUpdate

ClearGitCommit clears the value of the "git_commit" field.

func (*ProjectUpdate) ClearGitCommitDate

func (pu *ProjectUpdate) ClearGitCommitDate() *ProjectUpdate

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ProjectUpdate) ClearGitProjectID

func (pu *ProjectUpdate) ClearGitProjectID() *ProjectUpdate

ClearGitProjectID clears the value of the "git_project_id" field.

func (*ProjectUpdate) ClearManifest

func (pu *ProjectUpdate) ClearManifest() *ProjectUpdate

ClearManifest clears the value of the "manifest" field.

func (*ProjectUpdate) ClearNamespace

func (pu *ProjectUpdate) ClearNamespace() *ProjectUpdate

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*ProjectUpdate) ClearNamespaceID

func (pu *ProjectUpdate) ClearNamespaceID() *ProjectUpdate

ClearNamespaceID clears the value of the "namespace_id" field.

func (*ProjectUpdate) ClearOverrideValues

func (pu *ProjectUpdate) ClearOverrideValues() *ProjectUpdate

ClearOverrideValues clears the value of the "override_values" field.

func (*ProjectUpdate) ClearPodSelectors

func (pu *ProjectUpdate) ClearPodSelectors() *ProjectUpdate

ClearPodSelectors clears the value of the "pod_selectors" field.

func (*ProjectUpdate) ClearRepo

func (pu *ProjectUpdate) ClearRepo() *ProjectUpdate

ClearRepo clears the "repo" edge to the Repo entity.

func (*ProjectUpdate) ClearRepoID

func (pu *ProjectUpdate) ClearRepoID() *ProjectUpdate

ClearRepoID clears the value of the "repo_id" field.

func (*ProjectUpdate) Exec

func (pu *ProjectUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpdate) ExecX

func (pu *ProjectUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpdate) Mutation

func (pu *ProjectUpdate) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdate) RemoveChangelogIDs

func (pu *ProjectUpdate) RemoveChangelogIDs(ids ...int) *ProjectUpdate

RemoveChangelogIDs removes the "changelogs" edge to Changelog entities by IDs.

func (*ProjectUpdate) RemoveChangelogs

func (pu *ProjectUpdate) RemoveChangelogs(c ...*Changelog) *ProjectUpdate

RemoveChangelogs removes "changelogs" edges to Changelog entities.

func (*ProjectUpdate) Save

func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProjectUpdate) SaveX

func (pu *ProjectUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProjectUpdate) SetAtomic

func (pu *ProjectUpdate) SetAtomic(b bool) *ProjectUpdate

SetAtomic sets the "atomic" field.

func (*ProjectUpdate) SetConfig

func (pu *ProjectUpdate) SetConfig(s string) *ProjectUpdate

SetConfig sets the "config" field.

func (*ProjectUpdate) SetConfigType

func (pu *ProjectUpdate) SetConfigType(s string) *ProjectUpdate

SetConfigType sets the "config_type" field.

func (*ProjectUpdate) SetCreator

func (pu *ProjectUpdate) SetCreator(s string) *ProjectUpdate

SetCreator sets the "creator" field.

func (*ProjectUpdate) SetDeletedAt

func (pu *ProjectUpdate) SetDeletedAt(t time.Time) *ProjectUpdate

SetDeletedAt sets the "deleted_at" field.

func (*ProjectUpdate) SetDeployStatus

func (pu *ProjectUpdate) SetDeployStatus(t types.Deploy) *ProjectUpdate

SetDeployStatus sets the "deploy_status" field.

func (*ProjectUpdate) SetDockerImage

func (pu *ProjectUpdate) SetDockerImage(s []string) *ProjectUpdate

SetDockerImage sets the "docker_image" field.

func (*ProjectUpdate) SetEnvValues

func (pu *ProjectUpdate) SetEnvValues(tv []*types.KeyValue) *ProjectUpdate

SetEnvValues sets the "env_values" field.

func (*ProjectUpdate) SetExtraValues

func (pu *ProjectUpdate) SetExtraValues(wv []*websocket.ExtraValue) *ProjectUpdate

SetExtraValues sets the "extra_values" field.

func (*ProjectUpdate) SetFinalExtraValues

func (pu *ProjectUpdate) SetFinalExtraValues(wv []*websocket.ExtraValue) *ProjectUpdate

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectUpdate) SetGitBranch

func (pu *ProjectUpdate) SetGitBranch(s string) *ProjectUpdate

SetGitBranch sets the "git_branch" field.

func (*ProjectUpdate) SetGitCommit

func (pu *ProjectUpdate) SetGitCommit(s string) *ProjectUpdate

SetGitCommit sets the "git_commit" field.

func (*ProjectUpdate) SetGitCommitAuthor

func (pu *ProjectUpdate) SetGitCommitAuthor(s string) *ProjectUpdate

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectUpdate) SetGitCommitDate

func (pu *ProjectUpdate) SetGitCommitDate(t time.Time) *ProjectUpdate

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectUpdate) SetGitCommitTitle

func (pu *ProjectUpdate) SetGitCommitTitle(s string) *ProjectUpdate

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectUpdate) SetGitCommitWebURL

func (pu *ProjectUpdate) SetGitCommitWebURL(s string) *ProjectUpdate

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectUpdate) SetGitProjectID

func (pu *ProjectUpdate) SetGitProjectID(i int) *ProjectUpdate

SetGitProjectID sets the "git_project_id" field.

func (*ProjectUpdate) SetManifest

func (pu *ProjectUpdate) SetManifest(s []string) *ProjectUpdate

SetManifest sets the "manifest" field.

func (*ProjectUpdate) SetName

func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate

SetName sets the "name" field.

func (*ProjectUpdate) SetNamespace

func (pu *ProjectUpdate) SetNamespace(n *Namespace) *ProjectUpdate

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*ProjectUpdate) SetNamespaceID

func (pu *ProjectUpdate) SetNamespaceID(i int) *ProjectUpdate

SetNamespaceID sets the "namespace_id" field.

func (*ProjectUpdate) SetNillableAtomic

func (pu *ProjectUpdate) SetNillableAtomic(b *bool) *ProjectUpdate

SetNillableAtomic sets the "atomic" field if the given value is not nil.

func (*ProjectUpdate) SetNillableConfig

func (pu *ProjectUpdate) SetNillableConfig(s *string) *ProjectUpdate

SetNillableConfig sets the "config" field if the given value is not nil.

func (*ProjectUpdate) SetNillableConfigType

func (pu *ProjectUpdate) SetNillableConfigType(s *string) *ProjectUpdate

SetNillableConfigType sets the "config_type" field if the given value is not nil.

func (*ProjectUpdate) SetNillableCreator

func (pu *ProjectUpdate) SetNillableCreator(s *string) *ProjectUpdate

SetNillableCreator sets the "creator" field if the given value is not nil.

func (*ProjectUpdate) SetNillableDeletedAt

func (pu *ProjectUpdate) SetNillableDeletedAt(t *time.Time) *ProjectUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ProjectUpdate) SetNillableDeployStatus

func (pu *ProjectUpdate) SetNillableDeployStatus(t *types.Deploy) *ProjectUpdate

SetNillableDeployStatus sets the "deploy_status" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitBranch

func (pu *ProjectUpdate) SetNillableGitBranch(s *string) *ProjectUpdate

SetNillableGitBranch sets the "git_branch" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitCommit

func (pu *ProjectUpdate) SetNillableGitCommit(s *string) *ProjectUpdate

SetNillableGitCommit sets the "git_commit" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitCommitAuthor

func (pu *ProjectUpdate) SetNillableGitCommitAuthor(s *string) *ProjectUpdate

SetNillableGitCommitAuthor sets the "git_commit_author" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitCommitDate

func (pu *ProjectUpdate) SetNillableGitCommitDate(t *time.Time) *ProjectUpdate

SetNillableGitCommitDate sets the "git_commit_date" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitCommitTitle

func (pu *ProjectUpdate) SetNillableGitCommitTitle(s *string) *ProjectUpdate

SetNillableGitCommitTitle sets the "git_commit_title" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitCommitWebURL

func (pu *ProjectUpdate) SetNillableGitCommitWebURL(s *string) *ProjectUpdate

SetNillableGitCommitWebURL sets the "git_commit_web_url" field if the given value is not nil.

func (*ProjectUpdate) SetNillableGitProjectID

func (pu *ProjectUpdate) SetNillableGitProjectID(i *int) *ProjectUpdate

SetNillableGitProjectID sets the "git_project_id" field if the given value is not nil.

func (*ProjectUpdate) SetNillableName

func (pu *ProjectUpdate) SetNillableName(s *string) *ProjectUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ProjectUpdate) SetNillableNamespaceID

func (pu *ProjectUpdate) SetNillableNamespaceID(i *int) *ProjectUpdate

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*ProjectUpdate) SetNillableOverrideValues

func (pu *ProjectUpdate) SetNillableOverrideValues(s *string) *ProjectUpdate

SetNillableOverrideValues sets the "override_values" field if the given value is not nil.

func (*ProjectUpdate) SetNillableRepoID

func (pu *ProjectUpdate) SetNillableRepoID(i *int) *ProjectUpdate

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*ProjectUpdate) SetNillableVersion

func (pu *ProjectUpdate) SetNillableVersion(i *int) *ProjectUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*ProjectUpdate) SetOverrideValues

func (pu *ProjectUpdate) SetOverrideValues(s string) *ProjectUpdate

SetOverrideValues sets the "override_values" field.

func (*ProjectUpdate) SetPodSelectors

func (pu *ProjectUpdate) SetPodSelectors(s []string) *ProjectUpdate

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectUpdate) SetRepo

func (pu *ProjectUpdate) SetRepo(r *Repo) *ProjectUpdate

SetRepo sets the "repo" edge to the Repo entity.

func (*ProjectUpdate) SetRepoID

func (pu *ProjectUpdate) SetRepoID(i int) *ProjectUpdate

SetRepoID sets the "repo_id" field.

func (*ProjectUpdate) SetUpdatedAt

func (pu *ProjectUpdate) SetUpdatedAt(t time.Time) *ProjectUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ProjectUpdate) SetVersion

func (pu *ProjectUpdate) SetVersion(i int) *ProjectUpdate

SetVersion sets the "version" field.

func (*ProjectUpdate) Where

func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpdateOne

type ProjectUpdateOne struct {
	// contains filtered or unexported fields
}

ProjectUpdateOne is the builder for updating a single Project entity.

func (*ProjectUpdateOne) AddChangelogIDs

func (puo *ProjectUpdateOne) AddChangelogIDs(ids ...int) *ProjectUpdateOne

AddChangelogIDs adds the "changelogs" edge to the Changelog entity by IDs.

func (*ProjectUpdateOne) AddChangelogs

func (puo *ProjectUpdateOne) AddChangelogs(c ...*Changelog) *ProjectUpdateOne

AddChangelogs adds the "changelogs" edges to the Changelog entity.

func (*ProjectUpdateOne) AddDeployStatus

func (puo *ProjectUpdateOne) AddDeployStatus(t types.Deploy) *ProjectUpdateOne

AddDeployStatus adds t to the "deploy_status" field.

func (*ProjectUpdateOne) AddGitProjectID

func (puo *ProjectUpdateOne) AddGitProjectID(i int) *ProjectUpdateOne

AddGitProjectID adds i to the "git_project_id" field.

func (*ProjectUpdateOne) AddVersion

func (puo *ProjectUpdateOne) AddVersion(i int) *ProjectUpdateOne

AddVersion adds i to the "version" field.

func (*ProjectUpdateOne) AppendDockerImage

func (puo *ProjectUpdateOne) AppendDockerImage(s []string) *ProjectUpdateOne

AppendDockerImage appends s to the "docker_image" field.

func (*ProjectUpdateOne) AppendEnvValues

func (puo *ProjectUpdateOne) AppendEnvValues(tv []*types.KeyValue) *ProjectUpdateOne

AppendEnvValues appends tv to the "env_values" field.

func (*ProjectUpdateOne) AppendExtraValues

func (puo *ProjectUpdateOne) AppendExtraValues(wv []*websocket.ExtraValue) *ProjectUpdateOne

AppendExtraValues appends wv to the "extra_values" field.

func (*ProjectUpdateOne) AppendFinalExtraValues

func (puo *ProjectUpdateOne) AppendFinalExtraValues(wv []*websocket.ExtraValue) *ProjectUpdateOne

AppendFinalExtraValues appends wv to the "final_extra_values" field.

func (*ProjectUpdateOne) AppendManifest

func (puo *ProjectUpdateOne) AppendManifest(s []string) *ProjectUpdateOne

AppendManifest appends s to the "manifest" field.

func (*ProjectUpdateOne) AppendPodSelectors

func (puo *ProjectUpdateOne) AppendPodSelectors(s []string) *ProjectUpdateOne

AppendPodSelectors appends s to the "pod_selectors" field.

func (*ProjectUpdateOne) ClearChangelogs

func (puo *ProjectUpdateOne) ClearChangelogs() *ProjectUpdateOne

ClearChangelogs clears all "changelogs" edges to the Changelog entity.

func (*ProjectUpdateOne) ClearConfig

func (puo *ProjectUpdateOne) ClearConfig() *ProjectUpdateOne

ClearConfig clears the value of the "config" field.

func (*ProjectUpdateOne) ClearConfigType

func (puo *ProjectUpdateOne) ClearConfigType() *ProjectUpdateOne

ClearConfigType clears the value of the "config_type" field.

func (*ProjectUpdateOne) ClearDeletedAt

func (puo *ProjectUpdateOne) ClearDeletedAt() *ProjectUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ProjectUpdateOne) ClearDockerImage

func (puo *ProjectUpdateOne) ClearDockerImage() *ProjectUpdateOne

ClearDockerImage clears the value of the "docker_image" field.

func (*ProjectUpdateOne) ClearEnvValues

func (puo *ProjectUpdateOne) ClearEnvValues() *ProjectUpdateOne

ClearEnvValues clears the value of the "env_values" field.

func (*ProjectUpdateOne) ClearExtraValues

func (puo *ProjectUpdateOne) ClearExtraValues() *ProjectUpdateOne

ClearExtraValues clears the value of the "extra_values" field.

func (*ProjectUpdateOne) ClearFinalExtraValues

func (puo *ProjectUpdateOne) ClearFinalExtraValues() *ProjectUpdateOne

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ProjectUpdateOne) ClearGitBranch

func (puo *ProjectUpdateOne) ClearGitBranch() *ProjectUpdateOne

ClearGitBranch clears the value of the "git_branch" field.

func (*ProjectUpdateOne) ClearGitCommit

func (puo *ProjectUpdateOne) ClearGitCommit() *ProjectUpdateOne

ClearGitCommit clears the value of the "git_commit" field.

func (*ProjectUpdateOne) ClearGitCommitDate

func (puo *ProjectUpdateOne) ClearGitCommitDate() *ProjectUpdateOne

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ProjectUpdateOne) ClearGitProjectID

func (puo *ProjectUpdateOne) ClearGitProjectID() *ProjectUpdateOne

ClearGitProjectID clears the value of the "git_project_id" field.

func (*ProjectUpdateOne) ClearManifest

func (puo *ProjectUpdateOne) ClearManifest() *ProjectUpdateOne

ClearManifest clears the value of the "manifest" field.

func (*ProjectUpdateOne) ClearNamespace

func (puo *ProjectUpdateOne) ClearNamespace() *ProjectUpdateOne

ClearNamespace clears the "namespace" edge to the Namespace entity.

func (*ProjectUpdateOne) ClearNamespaceID

func (puo *ProjectUpdateOne) ClearNamespaceID() *ProjectUpdateOne

ClearNamespaceID clears the value of the "namespace_id" field.

func (*ProjectUpdateOne) ClearOverrideValues

func (puo *ProjectUpdateOne) ClearOverrideValues() *ProjectUpdateOne

ClearOverrideValues clears the value of the "override_values" field.

func (*ProjectUpdateOne) ClearPodSelectors

func (puo *ProjectUpdateOne) ClearPodSelectors() *ProjectUpdateOne

ClearPodSelectors clears the value of the "pod_selectors" field.

func (*ProjectUpdateOne) ClearRepo

func (puo *ProjectUpdateOne) ClearRepo() *ProjectUpdateOne

ClearRepo clears the "repo" edge to the Repo entity.

func (*ProjectUpdateOne) ClearRepoID

func (puo *ProjectUpdateOne) ClearRepoID() *ProjectUpdateOne

ClearRepoID clears the value of the "repo_id" field.

func (*ProjectUpdateOne) Exec

func (puo *ProjectUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProjectUpdateOne) ExecX

func (puo *ProjectUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpdateOne) Mutation

func (puo *ProjectUpdateOne) Mutation() *ProjectMutation

Mutation returns the ProjectMutation object of the builder.

func (*ProjectUpdateOne) RemoveChangelogIDs

func (puo *ProjectUpdateOne) RemoveChangelogIDs(ids ...int) *ProjectUpdateOne

RemoveChangelogIDs removes the "changelogs" edge to Changelog entities by IDs.

func (*ProjectUpdateOne) RemoveChangelogs

func (puo *ProjectUpdateOne) RemoveChangelogs(c ...*Changelog) *ProjectUpdateOne

RemoveChangelogs removes "changelogs" edges to Changelog entities.

func (*ProjectUpdateOne) Save

func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)

Save executes the query and returns the updated Project entity.

func (*ProjectUpdateOne) SaveX

func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project

SaveX is like Save, but panics if an error occurs.

func (*ProjectUpdateOne) Select

func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProjectUpdateOne) SetAtomic

func (puo *ProjectUpdateOne) SetAtomic(b bool) *ProjectUpdateOne

SetAtomic sets the "atomic" field.

func (*ProjectUpdateOne) SetConfig

func (puo *ProjectUpdateOne) SetConfig(s string) *ProjectUpdateOne

SetConfig sets the "config" field.

func (*ProjectUpdateOne) SetConfigType

func (puo *ProjectUpdateOne) SetConfigType(s string) *ProjectUpdateOne

SetConfigType sets the "config_type" field.

func (*ProjectUpdateOne) SetCreator

func (puo *ProjectUpdateOne) SetCreator(s string) *ProjectUpdateOne

SetCreator sets the "creator" field.

func (*ProjectUpdateOne) SetDeletedAt

func (puo *ProjectUpdateOne) SetDeletedAt(t time.Time) *ProjectUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*ProjectUpdateOne) SetDeployStatus

func (puo *ProjectUpdateOne) SetDeployStatus(t types.Deploy) *ProjectUpdateOne

SetDeployStatus sets the "deploy_status" field.

func (*ProjectUpdateOne) SetDockerImage

func (puo *ProjectUpdateOne) SetDockerImage(s []string) *ProjectUpdateOne

SetDockerImage sets the "docker_image" field.

func (*ProjectUpdateOne) SetEnvValues

func (puo *ProjectUpdateOne) SetEnvValues(tv []*types.KeyValue) *ProjectUpdateOne

SetEnvValues sets the "env_values" field.

func (*ProjectUpdateOne) SetExtraValues

func (puo *ProjectUpdateOne) SetExtraValues(wv []*websocket.ExtraValue) *ProjectUpdateOne

SetExtraValues sets the "extra_values" field.

func (*ProjectUpdateOne) SetFinalExtraValues

func (puo *ProjectUpdateOne) SetFinalExtraValues(wv []*websocket.ExtraValue) *ProjectUpdateOne

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectUpdateOne) SetGitBranch

func (puo *ProjectUpdateOne) SetGitBranch(s string) *ProjectUpdateOne

SetGitBranch sets the "git_branch" field.

func (*ProjectUpdateOne) SetGitCommit

func (puo *ProjectUpdateOne) SetGitCommit(s string) *ProjectUpdateOne

SetGitCommit sets the "git_commit" field.

func (*ProjectUpdateOne) SetGitCommitAuthor

func (puo *ProjectUpdateOne) SetGitCommitAuthor(s string) *ProjectUpdateOne

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectUpdateOne) SetGitCommitDate

func (puo *ProjectUpdateOne) SetGitCommitDate(t time.Time) *ProjectUpdateOne

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectUpdateOne) SetGitCommitTitle

func (puo *ProjectUpdateOne) SetGitCommitTitle(s string) *ProjectUpdateOne

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectUpdateOne) SetGitCommitWebURL

func (puo *ProjectUpdateOne) SetGitCommitWebURL(s string) *ProjectUpdateOne

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectUpdateOne) SetGitProjectID

func (puo *ProjectUpdateOne) SetGitProjectID(i int) *ProjectUpdateOne

SetGitProjectID sets the "git_project_id" field.

func (*ProjectUpdateOne) SetManifest

func (puo *ProjectUpdateOne) SetManifest(s []string) *ProjectUpdateOne

SetManifest sets the "manifest" field.

func (*ProjectUpdateOne) SetName

func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne

SetName sets the "name" field.

func (*ProjectUpdateOne) SetNamespace

func (puo *ProjectUpdateOne) SetNamespace(n *Namespace) *ProjectUpdateOne

SetNamespace sets the "namespace" edge to the Namespace entity.

func (*ProjectUpdateOne) SetNamespaceID

func (puo *ProjectUpdateOne) SetNamespaceID(i int) *ProjectUpdateOne

SetNamespaceID sets the "namespace_id" field.

func (*ProjectUpdateOne) SetNillableAtomic

func (puo *ProjectUpdateOne) SetNillableAtomic(b *bool) *ProjectUpdateOne

SetNillableAtomic sets the "atomic" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableConfig

func (puo *ProjectUpdateOne) SetNillableConfig(s *string) *ProjectUpdateOne

SetNillableConfig sets the "config" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableConfigType

func (puo *ProjectUpdateOne) SetNillableConfigType(s *string) *ProjectUpdateOne

SetNillableConfigType sets the "config_type" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableCreator

func (puo *ProjectUpdateOne) SetNillableCreator(s *string) *ProjectUpdateOne

SetNillableCreator sets the "creator" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableDeletedAt

func (puo *ProjectUpdateOne) SetNillableDeletedAt(t *time.Time) *ProjectUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableDeployStatus

func (puo *ProjectUpdateOne) SetNillableDeployStatus(t *types.Deploy) *ProjectUpdateOne

SetNillableDeployStatus sets the "deploy_status" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitBranch

func (puo *ProjectUpdateOne) SetNillableGitBranch(s *string) *ProjectUpdateOne

SetNillableGitBranch sets the "git_branch" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitCommit

func (puo *ProjectUpdateOne) SetNillableGitCommit(s *string) *ProjectUpdateOne

SetNillableGitCommit sets the "git_commit" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitCommitAuthor

func (puo *ProjectUpdateOne) SetNillableGitCommitAuthor(s *string) *ProjectUpdateOne

SetNillableGitCommitAuthor sets the "git_commit_author" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitCommitDate

func (puo *ProjectUpdateOne) SetNillableGitCommitDate(t *time.Time) *ProjectUpdateOne

SetNillableGitCommitDate sets the "git_commit_date" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitCommitTitle

func (puo *ProjectUpdateOne) SetNillableGitCommitTitle(s *string) *ProjectUpdateOne

SetNillableGitCommitTitle sets the "git_commit_title" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitCommitWebURL

func (puo *ProjectUpdateOne) SetNillableGitCommitWebURL(s *string) *ProjectUpdateOne

SetNillableGitCommitWebURL sets the "git_commit_web_url" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableGitProjectID

func (puo *ProjectUpdateOne) SetNillableGitProjectID(i *int) *ProjectUpdateOne

SetNillableGitProjectID sets the "git_project_id" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableName

func (puo *ProjectUpdateOne) SetNillableName(s *string) *ProjectUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableNamespaceID

func (puo *ProjectUpdateOne) SetNillableNamespaceID(i *int) *ProjectUpdateOne

SetNillableNamespaceID sets the "namespace_id" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableOverrideValues

func (puo *ProjectUpdateOne) SetNillableOverrideValues(s *string) *ProjectUpdateOne

SetNillableOverrideValues sets the "override_values" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableRepoID

func (puo *ProjectUpdateOne) SetNillableRepoID(i *int) *ProjectUpdateOne

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*ProjectUpdateOne) SetNillableVersion

func (puo *ProjectUpdateOne) SetNillableVersion(i *int) *ProjectUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*ProjectUpdateOne) SetOverrideValues

func (puo *ProjectUpdateOne) SetOverrideValues(s string) *ProjectUpdateOne

SetOverrideValues sets the "override_values" field.

func (*ProjectUpdateOne) SetPodSelectors

func (puo *ProjectUpdateOne) SetPodSelectors(s []string) *ProjectUpdateOne

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectUpdateOne) SetRepo

func (puo *ProjectUpdateOne) SetRepo(r *Repo) *ProjectUpdateOne

SetRepo sets the "repo" edge to the Repo entity.

func (*ProjectUpdateOne) SetRepoID

func (puo *ProjectUpdateOne) SetRepoID(i int) *ProjectUpdateOne

SetRepoID sets the "repo_id" field.

func (*ProjectUpdateOne) SetUpdatedAt

func (puo *ProjectUpdateOne) SetUpdatedAt(t time.Time) *ProjectUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ProjectUpdateOne) SetVersion

func (puo *ProjectUpdateOne) SetVersion(i int) *ProjectUpdateOne

SetVersion sets the "version" field.

func (*ProjectUpdateOne) Where

Where appends a list predicates to the ProjectUpdate builder.

type ProjectUpsert

type ProjectUpsert struct {
	*sql.UpdateSet
}

ProjectUpsert is the "OnConflict" setter.

func (*ProjectUpsert) AddDeployStatus

func (u *ProjectUpsert) AddDeployStatus(v types.Deploy) *ProjectUpsert

AddDeployStatus adds v to the "deploy_status" field.

func (*ProjectUpsert) AddGitProjectID

func (u *ProjectUpsert) AddGitProjectID(v int) *ProjectUpsert

AddGitProjectID adds v to the "git_project_id" field.

func (*ProjectUpsert) AddVersion

func (u *ProjectUpsert) AddVersion(v int) *ProjectUpsert

AddVersion adds v to the "version" field.

func (*ProjectUpsert) ClearConfig

func (u *ProjectUpsert) ClearConfig() *ProjectUpsert

ClearConfig clears the value of the "config" field.

func (*ProjectUpsert) ClearConfigType

func (u *ProjectUpsert) ClearConfigType() *ProjectUpsert

ClearConfigType clears the value of the "config_type" field.

func (*ProjectUpsert) ClearDeletedAt

func (u *ProjectUpsert) ClearDeletedAt() *ProjectUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ProjectUpsert) ClearDockerImage

func (u *ProjectUpsert) ClearDockerImage() *ProjectUpsert

ClearDockerImage clears the value of the "docker_image" field.

func (*ProjectUpsert) ClearEnvValues

func (u *ProjectUpsert) ClearEnvValues() *ProjectUpsert

ClearEnvValues clears the value of the "env_values" field.

func (*ProjectUpsert) ClearExtraValues

func (u *ProjectUpsert) ClearExtraValues() *ProjectUpsert

ClearExtraValues clears the value of the "extra_values" field.

func (*ProjectUpsert) ClearFinalExtraValues

func (u *ProjectUpsert) ClearFinalExtraValues() *ProjectUpsert

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ProjectUpsert) ClearGitBranch

func (u *ProjectUpsert) ClearGitBranch() *ProjectUpsert

ClearGitBranch clears the value of the "git_branch" field.

func (*ProjectUpsert) ClearGitCommit

func (u *ProjectUpsert) ClearGitCommit() *ProjectUpsert

ClearGitCommit clears the value of the "git_commit" field.

func (*ProjectUpsert) ClearGitCommitDate

func (u *ProjectUpsert) ClearGitCommitDate() *ProjectUpsert

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ProjectUpsert) ClearGitProjectID

func (u *ProjectUpsert) ClearGitProjectID() *ProjectUpsert

ClearGitProjectID clears the value of the "git_project_id" field.

func (*ProjectUpsert) ClearManifest

func (u *ProjectUpsert) ClearManifest() *ProjectUpsert

ClearManifest clears the value of the "manifest" field.

func (*ProjectUpsert) ClearNamespaceID

func (u *ProjectUpsert) ClearNamespaceID() *ProjectUpsert

ClearNamespaceID clears the value of the "namespace_id" field.

func (*ProjectUpsert) ClearOverrideValues

func (u *ProjectUpsert) ClearOverrideValues() *ProjectUpsert

ClearOverrideValues clears the value of the "override_values" field.

func (*ProjectUpsert) ClearPodSelectors

func (u *ProjectUpsert) ClearPodSelectors() *ProjectUpsert

ClearPodSelectors clears the value of the "pod_selectors" field.

func (*ProjectUpsert) ClearRepoID

func (u *ProjectUpsert) ClearRepoID() *ProjectUpsert

ClearRepoID clears the value of the "repo_id" field.

func (*ProjectUpsert) SetAtomic

func (u *ProjectUpsert) SetAtomic(v bool) *ProjectUpsert

SetAtomic sets the "atomic" field.

func (*ProjectUpsert) SetConfig

func (u *ProjectUpsert) SetConfig(v string) *ProjectUpsert

SetConfig sets the "config" field.

func (*ProjectUpsert) SetConfigType

func (u *ProjectUpsert) SetConfigType(v string) *ProjectUpsert

SetConfigType sets the "config_type" field.

func (*ProjectUpsert) SetCreator

func (u *ProjectUpsert) SetCreator(v string) *ProjectUpsert

SetCreator sets the "creator" field.

func (*ProjectUpsert) SetDeletedAt

func (u *ProjectUpsert) SetDeletedAt(v time.Time) *ProjectUpsert

SetDeletedAt sets the "deleted_at" field.

func (*ProjectUpsert) SetDeployStatus

func (u *ProjectUpsert) SetDeployStatus(v types.Deploy) *ProjectUpsert

SetDeployStatus sets the "deploy_status" field.

func (*ProjectUpsert) SetDockerImage

func (u *ProjectUpsert) SetDockerImage(v []string) *ProjectUpsert

SetDockerImage sets the "docker_image" field.

func (*ProjectUpsert) SetEnvValues

func (u *ProjectUpsert) SetEnvValues(v []*types.KeyValue) *ProjectUpsert

SetEnvValues sets the "env_values" field.

func (*ProjectUpsert) SetExtraValues

func (u *ProjectUpsert) SetExtraValues(v []*websocket.ExtraValue) *ProjectUpsert

SetExtraValues sets the "extra_values" field.

func (*ProjectUpsert) SetFinalExtraValues

func (u *ProjectUpsert) SetFinalExtraValues(v []*websocket.ExtraValue) *ProjectUpsert

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectUpsert) SetGitBranch

func (u *ProjectUpsert) SetGitBranch(v string) *ProjectUpsert

SetGitBranch sets the "git_branch" field.

func (*ProjectUpsert) SetGitCommit

func (u *ProjectUpsert) SetGitCommit(v string) *ProjectUpsert

SetGitCommit sets the "git_commit" field.

func (*ProjectUpsert) SetGitCommitAuthor

func (u *ProjectUpsert) SetGitCommitAuthor(v string) *ProjectUpsert

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectUpsert) SetGitCommitDate

func (u *ProjectUpsert) SetGitCommitDate(v time.Time) *ProjectUpsert

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectUpsert) SetGitCommitTitle

func (u *ProjectUpsert) SetGitCommitTitle(v string) *ProjectUpsert

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectUpsert) SetGitCommitWebURL

func (u *ProjectUpsert) SetGitCommitWebURL(v string) *ProjectUpsert

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectUpsert) SetGitProjectID

func (u *ProjectUpsert) SetGitProjectID(v int) *ProjectUpsert

SetGitProjectID sets the "git_project_id" field.

func (*ProjectUpsert) SetManifest

func (u *ProjectUpsert) SetManifest(v []string) *ProjectUpsert

SetManifest sets the "manifest" field.

func (*ProjectUpsert) SetName

func (u *ProjectUpsert) SetName(v string) *ProjectUpsert

SetName sets the "name" field.

func (*ProjectUpsert) SetNamespaceID

func (u *ProjectUpsert) SetNamespaceID(v int) *ProjectUpsert

SetNamespaceID sets the "namespace_id" field.

func (*ProjectUpsert) SetOverrideValues

func (u *ProjectUpsert) SetOverrideValues(v string) *ProjectUpsert

SetOverrideValues sets the "override_values" field.

func (*ProjectUpsert) SetPodSelectors

func (u *ProjectUpsert) SetPodSelectors(v []string) *ProjectUpsert

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectUpsert) SetRepoID

func (u *ProjectUpsert) SetRepoID(v int) *ProjectUpsert

SetRepoID sets the "repo_id" field.

func (*ProjectUpsert) SetUpdatedAt

func (u *ProjectUpsert) SetUpdatedAt(v time.Time) *ProjectUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ProjectUpsert) SetVersion

func (u *ProjectUpsert) SetVersion(v int) *ProjectUpsert

SetVersion sets the "version" field.

func (*ProjectUpsert) UpdateAtomic

func (u *ProjectUpsert) UpdateAtomic() *ProjectUpsert

UpdateAtomic sets the "atomic" field to the value that was provided on create.

func (*ProjectUpsert) UpdateConfig

func (u *ProjectUpsert) UpdateConfig() *ProjectUpsert

UpdateConfig sets the "config" field to the value that was provided on create.

func (*ProjectUpsert) UpdateConfigType

func (u *ProjectUpsert) UpdateConfigType() *ProjectUpsert

UpdateConfigType sets the "config_type" field to the value that was provided on create.

func (*ProjectUpsert) UpdateCreator

func (u *ProjectUpsert) UpdateCreator() *ProjectUpsert

UpdateCreator sets the "creator" field to the value that was provided on create.

func (*ProjectUpsert) UpdateDeletedAt

func (u *ProjectUpsert) UpdateDeletedAt() *ProjectUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*ProjectUpsert) UpdateDeployStatus

func (u *ProjectUpsert) UpdateDeployStatus() *ProjectUpsert

UpdateDeployStatus sets the "deploy_status" field to the value that was provided on create.

func (*ProjectUpsert) UpdateDockerImage

func (u *ProjectUpsert) UpdateDockerImage() *ProjectUpsert

UpdateDockerImage sets the "docker_image" field to the value that was provided on create.

func (*ProjectUpsert) UpdateEnvValues

func (u *ProjectUpsert) UpdateEnvValues() *ProjectUpsert

UpdateEnvValues sets the "env_values" field to the value that was provided on create.

func (*ProjectUpsert) UpdateExtraValues

func (u *ProjectUpsert) UpdateExtraValues() *ProjectUpsert

UpdateExtraValues sets the "extra_values" field to the value that was provided on create.

func (*ProjectUpsert) UpdateFinalExtraValues

func (u *ProjectUpsert) UpdateFinalExtraValues() *ProjectUpsert

UpdateFinalExtraValues sets the "final_extra_values" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitBranch

func (u *ProjectUpsert) UpdateGitBranch() *ProjectUpsert

UpdateGitBranch sets the "git_branch" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitCommit

func (u *ProjectUpsert) UpdateGitCommit() *ProjectUpsert

UpdateGitCommit sets the "git_commit" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitCommitAuthor

func (u *ProjectUpsert) UpdateGitCommitAuthor() *ProjectUpsert

UpdateGitCommitAuthor sets the "git_commit_author" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitCommitDate

func (u *ProjectUpsert) UpdateGitCommitDate() *ProjectUpsert

UpdateGitCommitDate sets the "git_commit_date" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitCommitTitle

func (u *ProjectUpsert) UpdateGitCommitTitle() *ProjectUpsert

UpdateGitCommitTitle sets the "git_commit_title" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitCommitWebURL

func (u *ProjectUpsert) UpdateGitCommitWebURL() *ProjectUpsert

UpdateGitCommitWebURL sets the "git_commit_web_url" field to the value that was provided on create.

func (*ProjectUpsert) UpdateGitProjectID

func (u *ProjectUpsert) UpdateGitProjectID() *ProjectUpsert

UpdateGitProjectID sets the "git_project_id" field to the value that was provided on create.

func (*ProjectUpsert) UpdateManifest

func (u *ProjectUpsert) UpdateManifest() *ProjectUpsert

UpdateManifest sets the "manifest" field to the value that was provided on create.

func (*ProjectUpsert) UpdateName

func (u *ProjectUpsert) UpdateName() *ProjectUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ProjectUpsert) UpdateNamespaceID

func (u *ProjectUpsert) UpdateNamespaceID() *ProjectUpsert

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*ProjectUpsert) UpdateOverrideValues

func (u *ProjectUpsert) UpdateOverrideValues() *ProjectUpsert

UpdateOverrideValues sets the "override_values" field to the value that was provided on create.

func (*ProjectUpsert) UpdatePodSelectors

func (u *ProjectUpsert) UpdatePodSelectors() *ProjectUpsert

UpdatePodSelectors sets the "pod_selectors" field to the value that was provided on create.

func (*ProjectUpsert) UpdateRepoID

func (u *ProjectUpsert) UpdateRepoID() *ProjectUpsert

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

func (*ProjectUpsert) UpdateUpdatedAt

func (u *ProjectUpsert) UpdateUpdatedAt() *ProjectUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProjectUpsert) UpdateVersion

func (u *ProjectUpsert) UpdateVersion() *ProjectUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type ProjectUpsertBulk

type ProjectUpsertBulk struct {
	// contains filtered or unexported fields
}

ProjectUpsertBulk is the builder for "upsert"-ing a bulk of Project nodes.

func (*ProjectUpsertBulk) AddDeployStatus

func (u *ProjectUpsertBulk) AddDeployStatus(v types.Deploy) *ProjectUpsertBulk

AddDeployStatus adds v to the "deploy_status" field.

func (*ProjectUpsertBulk) AddGitProjectID

func (u *ProjectUpsertBulk) AddGitProjectID(v int) *ProjectUpsertBulk

AddGitProjectID adds v to the "git_project_id" field.

func (*ProjectUpsertBulk) AddVersion

func (u *ProjectUpsertBulk) AddVersion(v int) *ProjectUpsertBulk

AddVersion adds v to the "version" field.

func (*ProjectUpsertBulk) ClearConfig

func (u *ProjectUpsertBulk) ClearConfig() *ProjectUpsertBulk

ClearConfig clears the value of the "config" field.

func (*ProjectUpsertBulk) ClearConfigType

func (u *ProjectUpsertBulk) ClearConfigType() *ProjectUpsertBulk

ClearConfigType clears the value of the "config_type" field.

func (*ProjectUpsertBulk) ClearDeletedAt

func (u *ProjectUpsertBulk) ClearDeletedAt() *ProjectUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ProjectUpsertBulk) ClearDockerImage

func (u *ProjectUpsertBulk) ClearDockerImage() *ProjectUpsertBulk

ClearDockerImage clears the value of the "docker_image" field.

func (*ProjectUpsertBulk) ClearEnvValues

func (u *ProjectUpsertBulk) ClearEnvValues() *ProjectUpsertBulk

ClearEnvValues clears the value of the "env_values" field.

func (*ProjectUpsertBulk) ClearExtraValues

func (u *ProjectUpsertBulk) ClearExtraValues() *ProjectUpsertBulk

ClearExtraValues clears the value of the "extra_values" field.

func (*ProjectUpsertBulk) ClearFinalExtraValues

func (u *ProjectUpsertBulk) ClearFinalExtraValues() *ProjectUpsertBulk

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ProjectUpsertBulk) ClearGitBranch

func (u *ProjectUpsertBulk) ClearGitBranch() *ProjectUpsertBulk

ClearGitBranch clears the value of the "git_branch" field.

func (*ProjectUpsertBulk) ClearGitCommit

func (u *ProjectUpsertBulk) ClearGitCommit() *ProjectUpsertBulk

ClearGitCommit clears the value of the "git_commit" field.

func (*ProjectUpsertBulk) ClearGitCommitDate

func (u *ProjectUpsertBulk) ClearGitCommitDate() *ProjectUpsertBulk

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ProjectUpsertBulk) ClearGitProjectID

func (u *ProjectUpsertBulk) ClearGitProjectID() *ProjectUpsertBulk

ClearGitProjectID clears the value of the "git_project_id" field.

func (*ProjectUpsertBulk) ClearManifest

func (u *ProjectUpsertBulk) ClearManifest() *ProjectUpsertBulk

ClearManifest clears the value of the "manifest" field.

func (*ProjectUpsertBulk) ClearNamespaceID

func (u *ProjectUpsertBulk) ClearNamespaceID() *ProjectUpsertBulk

ClearNamespaceID clears the value of the "namespace_id" field.

func (*ProjectUpsertBulk) ClearOverrideValues

func (u *ProjectUpsertBulk) ClearOverrideValues() *ProjectUpsertBulk

ClearOverrideValues clears the value of the "override_values" field.

func (*ProjectUpsertBulk) ClearPodSelectors

func (u *ProjectUpsertBulk) ClearPodSelectors() *ProjectUpsertBulk

ClearPodSelectors clears the value of the "pod_selectors" field.

func (*ProjectUpsertBulk) ClearRepoID

func (u *ProjectUpsertBulk) ClearRepoID() *ProjectUpsertBulk

ClearRepoID clears the value of the "repo_id" field.

func (*ProjectUpsertBulk) DoNothing

func (u *ProjectUpsertBulk) DoNothing() *ProjectUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProjectUpsertBulk) Exec

func (u *ProjectUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpsertBulk) ExecX

func (u *ProjectUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpsertBulk) Ignore

func (u *ProjectUpsertBulk) Ignore() *ProjectUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ProjectUpsertBulk) SetAtomic

func (u *ProjectUpsertBulk) SetAtomic(v bool) *ProjectUpsertBulk

SetAtomic sets the "atomic" field.

func (*ProjectUpsertBulk) SetConfig

func (u *ProjectUpsertBulk) SetConfig(v string) *ProjectUpsertBulk

SetConfig sets the "config" field.

func (*ProjectUpsertBulk) SetConfigType

func (u *ProjectUpsertBulk) SetConfigType(v string) *ProjectUpsertBulk

SetConfigType sets the "config_type" field.

func (*ProjectUpsertBulk) SetCreator

func (u *ProjectUpsertBulk) SetCreator(v string) *ProjectUpsertBulk

SetCreator sets the "creator" field.

func (*ProjectUpsertBulk) SetDeletedAt

func (u *ProjectUpsertBulk) SetDeletedAt(v time.Time) *ProjectUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*ProjectUpsertBulk) SetDeployStatus

func (u *ProjectUpsertBulk) SetDeployStatus(v types.Deploy) *ProjectUpsertBulk

SetDeployStatus sets the "deploy_status" field.

func (*ProjectUpsertBulk) SetDockerImage

func (u *ProjectUpsertBulk) SetDockerImage(v []string) *ProjectUpsertBulk

SetDockerImage sets the "docker_image" field.

func (*ProjectUpsertBulk) SetEnvValues

func (u *ProjectUpsertBulk) SetEnvValues(v []*types.KeyValue) *ProjectUpsertBulk

SetEnvValues sets the "env_values" field.

func (*ProjectUpsertBulk) SetExtraValues

func (u *ProjectUpsertBulk) SetExtraValues(v []*websocket.ExtraValue) *ProjectUpsertBulk

SetExtraValues sets the "extra_values" field.

func (*ProjectUpsertBulk) SetFinalExtraValues

func (u *ProjectUpsertBulk) SetFinalExtraValues(v []*websocket.ExtraValue) *ProjectUpsertBulk

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectUpsertBulk) SetGitBranch

func (u *ProjectUpsertBulk) SetGitBranch(v string) *ProjectUpsertBulk

SetGitBranch sets the "git_branch" field.

func (*ProjectUpsertBulk) SetGitCommit

func (u *ProjectUpsertBulk) SetGitCommit(v string) *ProjectUpsertBulk

SetGitCommit sets the "git_commit" field.

func (*ProjectUpsertBulk) SetGitCommitAuthor

func (u *ProjectUpsertBulk) SetGitCommitAuthor(v string) *ProjectUpsertBulk

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectUpsertBulk) SetGitCommitDate

func (u *ProjectUpsertBulk) SetGitCommitDate(v time.Time) *ProjectUpsertBulk

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectUpsertBulk) SetGitCommitTitle

func (u *ProjectUpsertBulk) SetGitCommitTitle(v string) *ProjectUpsertBulk

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectUpsertBulk) SetGitCommitWebURL

func (u *ProjectUpsertBulk) SetGitCommitWebURL(v string) *ProjectUpsertBulk

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectUpsertBulk) SetGitProjectID

func (u *ProjectUpsertBulk) SetGitProjectID(v int) *ProjectUpsertBulk

SetGitProjectID sets the "git_project_id" field.

func (*ProjectUpsertBulk) SetManifest

func (u *ProjectUpsertBulk) SetManifest(v []string) *ProjectUpsertBulk

SetManifest sets the "manifest" field.

func (*ProjectUpsertBulk) SetName

SetName sets the "name" field.

func (*ProjectUpsertBulk) SetNamespaceID

func (u *ProjectUpsertBulk) SetNamespaceID(v int) *ProjectUpsertBulk

SetNamespaceID sets the "namespace_id" field.

func (*ProjectUpsertBulk) SetOverrideValues

func (u *ProjectUpsertBulk) SetOverrideValues(v string) *ProjectUpsertBulk

SetOverrideValues sets the "override_values" field.

func (*ProjectUpsertBulk) SetPodSelectors

func (u *ProjectUpsertBulk) SetPodSelectors(v []string) *ProjectUpsertBulk

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectUpsertBulk) SetRepoID

func (u *ProjectUpsertBulk) SetRepoID(v int) *ProjectUpsertBulk

SetRepoID sets the "repo_id" field.

func (*ProjectUpsertBulk) SetUpdatedAt

func (u *ProjectUpsertBulk) SetUpdatedAt(v time.Time) *ProjectUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*ProjectUpsertBulk) SetVersion

func (u *ProjectUpsertBulk) SetVersion(v int) *ProjectUpsertBulk

SetVersion sets the "version" field.

func (*ProjectUpsertBulk) Update

func (u *ProjectUpsertBulk) Update(set func(*ProjectUpsert)) *ProjectUpsertBulk

Update allows overriding fields `UPDATE` values. See the ProjectCreateBulk.OnConflict documentation for more info.

func (*ProjectUpsertBulk) UpdateAtomic

func (u *ProjectUpsertBulk) UpdateAtomic() *ProjectUpsertBulk

UpdateAtomic sets the "atomic" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateConfig

func (u *ProjectUpsertBulk) UpdateConfig() *ProjectUpsertBulk

UpdateConfig sets the "config" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateConfigType

func (u *ProjectUpsertBulk) UpdateConfigType() *ProjectUpsertBulk

UpdateConfigType sets the "config_type" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateCreator

func (u *ProjectUpsertBulk) UpdateCreator() *ProjectUpsertBulk

UpdateCreator sets the "creator" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateDeletedAt

func (u *ProjectUpsertBulk) UpdateDeletedAt() *ProjectUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateDeployStatus

func (u *ProjectUpsertBulk) UpdateDeployStatus() *ProjectUpsertBulk

UpdateDeployStatus sets the "deploy_status" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateDockerImage

func (u *ProjectUpsertBulk) UpdateDockerImage() *ProjectUpsertBulk

UpdateDockerImage sets the "docker_image" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateEnvValues

func (u *ProjectUpsertBulk) UpdateEnvValues() *ProjectUpsertBulk

UpdateEnvValues sets the "env_values" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateExtraValues

func (u *ProjectUpsertBulk) UpdateExtraValues() *ProjectUpsertBulk

UpdateExtraValues sets the "extra_values" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateFinalExtraValues

func (u *ProjectUpsertBulk) UpdateFinalExtraValues() *ProjectUpsertBulk

UpdateFinalExtraValues sets the "final_extra_values" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitBranch

func (u *ProjectUpsertBulk) UpdateGitBranch() *ProjectUpsertBulk

UpdateGitBranch sets the "git_branch" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitCommit

func (u *ProjectUpsertBulk) UpdateGitCommit() *ProjectUpsertBulk

UpdateGitCommit sets the "git_commit" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitCommitAuthor

func (u *ProjectUpsertBulk) UpdateGitCommitAuthor() *ProjectUpsertBulk

UpdateGitCommitAuthor sets the "git_commit_author" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitCommitDate

func (u *ProjectUpsertBulk) UpdateGitCommitDate() *ProjectUpsertBulk

UpdateGitCommitDate sets the "git_commit_date" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitCommitTitle

func (u *ProjectUpsertBulk) UpdateGitCommitTitle() *ProjectUpsertBulk

UpdateGitCommitTitle sets the "git_commit_title" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitCommitWebURL

func (u *ProjectUpsertBulk) UpdateGitCommitWebURL() *ProjectUpsertBulk

UpdateGitCommitWebURL sets the "git_commit_web_url" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateGitProjectID

func (u *ProjectUpsertBulk) UpdateGitProjectID() *ProjectUpsertBulk

UpdateGitProjectID sets the "git_project_id" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateManifest

func (u *ProjectUpsertBulk) UpdateManifest() *ProjectUpsertBulk

UpdateManifest sets the "manifest" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateName

func (u *ProjectUpsertBulk) UpdateName() *ProjectUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateNamespaceID

func (u *ProjectUpsertBulk) UpdateNamespaceID() *ProjectUpsertBulk

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateNewValues

func (u *ProjectUpsertBulk) UpdateNewValues() *ProjectUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*ProjectUpsertBulk) UpdateOverrideValues

func (u *ProjectUpsertBulk) UpdateOverrideValues() *ProjectUpsertBulk

UpdateOverrideValues sets the "override_values" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdatePodSelectors

func (u *ProjectUpsertBulk) UpdatePodSelectors() *ProjectUpsertBulk

UpdatePodSelectors sets the "pod_selectors" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateRepoID

func (u *ProjectUpsertBulk) UpdateRepoID() *ProjectUpsertBulk

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateUpdatedAt

func (u *ProjectUpsertBulk) UpdateUpdatedAt() *ProjectUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProjectUpsertBulk) UpdateVersion

func (u *ProjectUpsertBulk) UpdateVersion() *ProjectUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

type ProjectUpsertOne

type ProjectUpsertOne struct {
	// contains filtered or unexported fields
}

ProjectUpsertOne is the builder for "upsert"-ing

one Project node.

func (*ProjectUpsertOne) AddDeployStatus

func (u *ProjectUpsertOne) AddDeployStatus(v types.Deploy) *ProjectUpsertOne

AddDeployStatus adds v to the "deploy_status" field.

func (*ProjectUpsertOne) AddGitProjectID

func (u *ProjectUpsertOne) AddGitProjectID(v int) *ProjectUpsertOne

AddGitProjectID adds v to the "git_project_id" field.

func (*ProjectUpsertOne) AddVersion

func (u *ProjectUpsertOne) AddVersion(v int) *ProjectUpsertOne

AddVersion adds v to the "version" field.

func (*ProjectUpsertOne) ClearConfig

func (u *ProjectUpsertOne) ClearConfig() *ProjectUpsertOne

ClearConfig clears the value of the "config" field.

func (*ProjectUpsertOne) ClearConfigType

func (u *ProjectUpsertOne) ClearConfigType() *ProjectUpsertOne

ClearConfigType clears the value of the "config_type" field.

func (*ProjectUpsertOne) ClearDeletedAt

func (u *ProjectUpsertOne) ClearDeletedAt() *ProjectUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ProjectUpsertOne) ClearDockerImage

func (u *ProjectUpsertOne) ClearDockerImage() *ProjectUpsertOne

ClearDockerImage clears the value of the "docker_image" field.

func (*ProjectUpsertOne) ClearEnvValues

func (u *ProjectUpsertOne) ClearEnvValues() *ProjectUpsertOne

ClearEnvValues clears the value of the "env_values" field.

func (*ProjectUpsertOne) ClearExtraValues

func (u *ProjectUpsertOne) ClearExtraValues() *ProjectUpsertOne

ClearExtraValues clears the value of the "extra_values" field.

func (*ProjectUpsertOne) ClearFinalExtraValues

func (u *ProjectUpsertOne) ClearFinalExtraValues() *ProjectUpsertOne

ClearFinalExtraValues clears the value of the "final_extra_values" field.

func (*ProjectUpsertOne) ClearGitBranch

func (u *ProjectUpsertOne) ClearGitBranch() *ProjectUpsertOne

ClearGitBranch clears the value of the "git_branch" field.

func (*ProjectUpsertOne) ClearGitCommit

func (u *ProjectUpsertOne) ClearGitCommit() *ProjectUpsertOne

ClearGitCommit clears the value of the "git_commit" field.

func (*ProjectUpsertOne) ClearGitCommitDate

func (u *ProjectUpsertOne) ClearGitCommitDate() *ProjectUpsertOne

ClearGitCommitDate clears the value of the "git_commit_date" field.

func (*ProjectUpsertOne) ClearGitProjectID

func (u *ProjectUpsertOne) ClearGitProjectID() *ProjectUpsertOne

ClearGitProjectID clears the value of the "git_project_id" field.

func (*ProjectUpsertOne) ClearManifest

func (u *ProjectUpsertOne) ClearManifest() *ProjectUpsertOne

ClearManifest clears the value of the "manifest" field.

func (*ProjectUpsertOne) ClearNamespaceID

func (u *ProjectUpsertOne) ClearNamespaceID() *ProjectUpsertOne

ClearNamespaceID clears the value of the "namespace_id" field.

func (*ProjectUpsertOne) ClearOverrideValues

func (u *ProjectUpsertOne) ClearOverrideValues() *ProjectUpsertOne

ClearOverrideValues clears the value of the "override_values" field.

func (*ProjectUpsertOne) ClearPodSelectors

func (u *ProjectUpsertOne) ClearPodSelectors() *ProjectUpsertOne

ClearPodSelectors clears the value of the "pod_selectors" field.

func (*ProjectUpsertOne) ClearRepoID

func (u *ProjectUpsertOne) ClearRepoID() *ProjectUpsertOne

ClearRepoID clears the value of the "repo_id" field.

func (*ProjectUpsertOne) DoNothing

func (u *ProjectUpsertOne) DoNothing() *ProjectUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ProjectUpsertOne) Exec

func (u *ProjectUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ProjectUpsertOne) ExecX

func (u *ProjectUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProjectUpsertOne) ID

func (u *ProjectUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ProjectUpsertOne) IDX

func (u *ProjectUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*ProjectUpsertOne) Ignore

func (u *ProjectUpsertOne) Ignore() *ProjectUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Project.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ProjectUpsertOne) SetAtomic

func (u *ProjectUpsertOne) SetAtomic(v bool) *ProjectUpsertOne

SetAtomic sets the "atomic" field.

func (*ProjectUpsertOne) SetConfig

func (u *ProjectUpsertOne) SetConfig(v string) *ProjectUpsertOne

SetConfig sets the "config" field.

func (*ProjectUpsertOne) SetConfigType

func (u *ProjectUpsertOne) SetConfigType(v string) *ProjectUpsertOne

SetConfigType sets the "config_type" field.

func (*ProjectUpsertOne) SetCreator

func (u *ProjectUpsertOne) SetCreator(v string) *ProjectUpsertOne

SetCreator sets the "creator" field.

func (*ProjectUpsertOne) SetDeletedAt

func (u *ProjectUpsertOne) SetDeletedAt(v time.Time) *ProjectUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*ProjectUpsertOne) SetDeployStatus

func (u *ProjectUpsertOne) SetDeployStatus(v types.Deploy) *ProjectUpsertOne

SetDeployStatus sets the "deploy_status" field.

func (*ProjectUpsertOne) SetDockerImage

func (u *ProjectUpsertOne) SetDockerImage(v []string) *ProjectUpsertOne

SetDockerImage sets the "docker_image" field.

func (*ProjectUpsertOne) SetEnvValues

func (u *ProjectUpsertOne) SetEnvValues(v []*types.KeyValue) *ProjectUpsertOne

SetEnvValues sets the "env_values" field.

func (*ProjectUpsertOne) SetExtraValues

func (u *ProjectUpsertOne) SetExtraValues(v []*websocket.ExtraValue) *ProjectUpsertOne

SetExtraValues sets the "extra_values" field.

func (*ProjectUpsertOne) SetFinalExtraValues

func (u *ProjectUpsertOne) SetFinalExtraValues(v []*websocket.ExtraValue) *ProjectUpsertOne

SetFinalExtraValues sets the "final_extra_values" field.

func (*ProjectUpsertOne) SetGitBranch

func (u *ProjectUpsertOne) SetGitBranch(v string) *ProjectUpsertOne

SetGitBranch sets the "git_branch" field.

func (*ProjectUpsertOne) SetGitCommit

func (u *ProjectUpsertOne) SetGitCommit(v string) *ProjectUpsertOne

SetGitCommit sets the "git_commit" field.

func (*ProjectUpsertOne) SetGitCommitAuthor

func (u *ProjectUpsertOne) SetGitCommitAuthor(v string) *ProjectUpsertOne

SetGitCommitAuthor sets the "git_commit_author" field.

func (*ProjectUpsertOne) SetGitCommitDate

func (u *ProjectUpsertOne) SetGitCommitDate(v time.Time) *ProjectUpsertOne

SetGitCommitDate sets the "git_commit_date" field.

func (*ProjectUpsertOne) SetGitCommitTitle

func (u *ProjectUpsertOne) SetGitCommitTitle(v string) *ProjectUpsertOne

SetGitCommitTitle sets the "git_commit_title" field.

func (*ProjectUpsertOne) SetGitCommitWebURL

func (u *ProjectUpsertOne) SetGitCommitWebURL(v string) *ProjectUpsertOne

SetGitCommitWebURL sets the "git_commit_web_url" field.

func (*ProjectUpsertOne) SetGitProjectID

func (u *ProjectUpsertOne) SetGitProjectID(v int) *ProjectUpsertOne

SetGitProjectID sets the "git_project_id" field.

func (*ProjectUpsertOne) SetManifest

func (u *ProjectUpsertOne) SetManifest(v []string) *ProjectUpsertOne

SetManifest sets the "manifest" field.

func (*ProjectUpsertOne) SetName

func (u *ProjectUpsertOne) SetName(v string) *ProjectUpsertOne

SetName sets the "name" field.

func (*ProjectUpsertOne) SetNamespaceID

func (u *ProjectUpsertOne) SetNamespaceID(v int) *ProjectUpsertOne

SetNamespaceID sets the "namespace_id" field.

func (*ProjectUpsertOne) SetOverrideValues

func (u *ProjectUpsertOne) SetOverrideValues(v string) *ProjectUpsertOne

SetOverrideValues sets the "override_values" field.

func (*ProjectUpsertOne) SetPodSelectors

func (u *ProjectUpsertOne) SetPodSelectors(v []string) *ProjectUpsertOne

SetPodSelectors sets the "pod_selectors" field.

func (*ProjectUpsertOne) SetRepoID

func (u *ProjectUpsertOne) SetRepoID(v int) *ProjectUpsertOne

SetRepoID sets the "repo_id" field.

func (*ProjectUpsertOne) SetUpdatedAt

func (u *ProjectUpsertOne) SetUpdatedAt(v time.Time) *ProjectUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ProjectUpsertOne) SetVersion

func (u *ProjectUpsertOne) SetVersion(v int) *ProjectUpsertOne

SetVersion sets the "version" field.

func (*ProjectUpsertOne) Update

func (u *ProjectUpsertOne) Update(set func(*ProjectUpsert)) *ProjectUpsertOne

Update allows overriding fields `UPDATE` values. See the ProjectCreate.OnConflict documentation for more info.

func (*ProjectUpsertOne) UpdateAtomic

func (u *ProjectUpsertOne) UpdateAtomic() *ProjectUpsertOne

UpdateAtomic sets the "atomic" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateConfig

func (u *ProjectUpsertOne) UpdateConfig() *ProjectUpsertOne

UpdateConfig sets the "config" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateConfigType

func (u *ProjectUpsertOne) UpdateConfigType() *ProjectUpsertOne

UpdateConfigType sets the "config_type" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateCreator

func (u *ProjectUpsertOne) UpdateCreator() *ProjectUpsertOne

UpdateCreator sets the "creator" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateDeletedAt

func (u *ProjectUpsertOne) UpdateDeletedAt() *ProjectUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateDeployStatus

func (u *ProjectUpsertOne) UpdateDeployStatus() *ProjectUpsertOne

UpdateDeployStatus sets the "deploy_status" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateDockerImage

func (u *ProjectUpsertOne) UpdateDockerImage() *ProjectUpsertOne

UpdateDockerImage sets the "docker_image" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateEnvValues

func (u *ProjectUpsertOne) UpdateEnvValues() *ProjectUpsertOne

UpdateEnvValues sets the "env_values" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateExtraValues

func (u *ProjectUpsertOne) UpdateExtraValues() *ProjectUpsertOne

UpdateExtraValues sets the "extra_values" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateFinalExtraValues

func (u *ProjectUpsertOne) UpdateFinalExtraValues() *ProjectUpsertOne

UpdateFinalExtraValues sets the "final_extra_values" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitBranch

func (u *ProjectUpsertOne) UpdateGitBranch() *ProjectUpsertOne

UpdateGitBranch sets the "git_branch" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitCommit

func (u *ProjectUpsertOne) UpdateGitCommit() *ProjectUpsertOne

UpdateGitCommit sets the "git_commit" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitCommitAuthor

func (u *ProjectUpsertOne) UpdateGitCommitAuthor() *ProjectUpsertOne

UpdateGitCommitAuthor sets the "git_commit_author" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitCommitDate

func (u *ProjectUpsertOne) UpdateGitCommitDate() *ProjectUpsertOne

UpdateGitCommitDate sets the "git_commit_date" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitCommitTitle

func (u *ProjectUpsertOne) UpdateGitCommitTitle() *ProjectUpsertOne

UpdateGitCommitTitle sets the "git_commit_title" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitCommitWebURL

func (u *ProjectUpsertOne) UpdateGitCommitWebURL() *ProjectUpsertOne

UpdateGitCommitWebURL sets the "git_commit_web_url" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateGitProjectID

func (u *ProjectUpsertOne) UpdateGitProjectID() *ProjectUpsertOne

UpdateGitProjectID sets the "git_project_id" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateManifest

func (u *ProjectUpsertOne) UpdateManifest() *ProjectUpsertOne

UpdateManifest sets the "manifest" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateName

func (u *ProjectUpsertOne) UpdateName() *ProjectUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateNamespaceID

func (u *ProjectUpsertOne) UpdateNamespaceID() *ProjectUpsertOne

UpdateNamespaceID sets the "namespace_id" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateNewValues

func (u *ProjectUpsertOne) UpdateNewValues() *ProjectUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Project.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*ProjectUpsertOne) UpdateOverrideValues

func (u *ProjectUpsertOne) UpdateOverrideValues() *ProjectUpsertOne

UpdateOverrideValues sets the "override_values" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdatePodSelectors

func (u *ProjectUpsertOne) UpdatePodSelectors() *ProjectUpsertOne

UpdatePodSelectors sets the "pod_selectors" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateRepoID

func (u *ProjectUpsertOne) UpdateRepoID() *ProjectUpsertOne

UpdateRepoID sets the "repo_id" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateUpdatedAt

func (u *ProjectUpsertOne) UpdateUpdatedAt() *ProjectUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ProjectUpsertOne) UpdateVersion

func (u *ProjectUpsertOne) UpdateVersion() *ProjectUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

type Projects

type Projects []*Project

Projects is a parsable slice of Project.

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 Repo

type Repo struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// 默认使用的名称: helm create {name}
	Name string `json:"name,omitempty"`
	// DefaultBranch holds the value of the "default_branch" field.
	DefaultBranch string `json:"default_branch,omitempty"`
	// 关联的 git 项目 name
	GitProjectName string `json:"git_project_name,omitempty"`
	// 关联的 git 项目 id
	GitProjectID int32 `json:"git_project_id,omitempty"`
	// Enabled holds the value of the "enabled" field.
	Enabled bool `json:"enabled,omitempty"`
	// NeedGitRepo holds the value of the "need_git_repo" field.
	NeedGitRepo bool `json:"need_git_repo,omitempty"`
	// mars 配置
	MarsConfig *mars.Config `json:"mars_config,omitempty"`
	// 描述
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RepoQuery when eager-loading is set.
	Edges RepoEdges `json:"edges"`
	// contains filtered or unexported fields
}

Repo is the model entity for the Repo schema.

func (*Repo) QueryProjects

func (r *Repo) QueryProjects() *ProjectQuery

QueryProjects queries the "projects" edge of the Repo entity.

func (*Repo) String

func (r *Repo) String() string

String implements the fmt.Stringer.

func (*Repo) Unwrap

func (r *Repo) Unwrap() *Repo

Unwrap unwraps the Repo 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 (*Repo) Update

func (r *Repo) Update() *RepoUpdateOne

Update returns a builder for updating this Repo. Note that you need to call Repo.Unwrap() before calling this method if this Repo was returned from a transaction, and the transaction was committed or rolled back.

func (*Repo) Value

func (r *Repo) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Repo. This includes values selected through modifiers, order, etc.

type RepoClient

type RepoClient struct {
	// contains filtered or unexported fields
}

RepoClient is a client for the Repo schema.

func NewRepoClient

func NewRepoClient(c config) *RepoClient

NewRepoClient returns a client for the Repo from the given config.

func (*RepoClient) Create

func (c *RepoClient) Create() *RepoCreate

Create returns a builder for creating a Repo entity.

func (*RepoClient) CreateBulk

func (c *RepoClient) CreateBulk(builders ...*RepoCreate) *RepoCreateBulk

CreateBulk returns a builder for creating a bulk of Repo entities.

func (*RepoClient) Delete

func (c *RepoClient) Delete() *RepoDelete

Delete returns a delete builder for Repo.

func (*RepoClient) DeleteOne

func (c *RepoClient) DeleteOne(r *Repo) *RepoDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RepoClient) DeleteOneID

func (c *RepoClient) DeleteOneID(id int) *RepoDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RepoClient) Get

func (c *RepoClient) Get(ctx context.Context, id int) (*Repo, error)

Get returns a Repo entity by its id.

func (*RepoClient) GetX

func (c *RepoClient) GetX(ctx context.Context, id int) *Repo

GetX is like Get, but panics if an error occurs.

func (*RepoClient) Hooks

func (c *RepoClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RepoClient) Intercept

func (c *RepoClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `repo.Intercept(f(g(h())))`.

func (*RepoClient) Interceptors

func (c *RepoClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RepoClient) MapCreateBulk

func (c *RepoClient) MapCreateBulk(slice any, setFunc func(*RepoCreate, int)) *RepoCreateBulk

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 (*RepoClient) Query

func (c *RepoClient) Query() *RepoQuery

Query returns a query builder for Repo.

func (*RepoClient) QueryProjects

func (c *RepoClient) QueryProjects(r *Repo) *ProjectQuery

QueryProjects queries the projects edge of a Repo.

func (*RepoClient) Update

func (c *RepoClient) Update() *RepoUpdate

Update returns an update builder for Repo.

func (*RepoClient) UpdateOne

func (c *RepoClient) UpdateOne(r *Repo) *RepoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RepoClient) UpdateOneID

func (c *RepoClient) UpdateOneID(id int) *RepoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RepoClient) Use

func (c *RepoClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `repo.Hooks(f(g(h())))`.

type RepoCreate

type RepoCreate struct {
	// contains filtered or unexported fields
}

RepoCreate is the builder for creating a Repo entity.

func (*RepoCreate) AddProjectIDs

func (rc *RepoCreate) AddProjectIDs(ids ...int) *RepoCreate

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*RepoCreate) AddProjects

func (rc *RepoCreate) AddProjects(p ...*Project) *RepoCreate

AddProjects adds the "projects" edges to the Project entity.

func (*RepoCreate) Exec

func (rc *RepoCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoCreate) ExecX

func (rc *RepoCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoCreate) Mutation

func (rc *RepoCreate) Mutation() *RepoMutation

Mutation returns the RepoMutation object of the builder.

func (*RepoCreate) OnConflict

func (rc *RepoCreate) OnConflict(opts ...sql.ConflictOption) *RepoUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Repo.Create().
	SetCreatedAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RepoUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*RepoCreate) OnConflictColumns

func (rc *RepoCreate) OnConflictColumns(columns ...string) *RepoUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Repo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RepoCreate) Save

func (rc *RepoCreate) Save(ctx context.Context) (*Repo, error)

Save creates the Repo in the database.

func (*RepoCreate) SaveX

func (rc *RepoCreate) SaveX(ctx context.Context) *Repo

SaveX calls Save and panics if Save returns an error.

func (*RepoCreate) SetCreatedAt

func (rc *RepoCreate) SetCreatedAt(t time.Time) *RepoCreate

SetCreatedAt sets the "created_at" field.

func (*RepoCreate) SetDefaultBranch

func (rc *RepoCreate) SetDefaultBranch(s string) *RepoCreate

SetDefaultBranch sets the "default_branch" field.

func (*RepoCreate) SetDeletedAt

func (rc *RepoCreate) SetDeletedAt(t time.Time) *RepoCreate

SetDeletedAt sets the "deleted_at" field.

func (*RepoCreate) SetDescription

func (rc *RepoCreate) SetDescription(s string) *RepoCreate

SetDescription sets the "description" field.

func (*RepoCreate) SetEnabled

func (rc *RepoCreate) SetEnabled(b bool) *RepoCreate

SetEnabled sets the "enabled" field.

func (*RepoCreate) SetGitProjectID

func (rc *RepoCreate) SetGitProjectID(i int32) *RepoCreate

SetGitProjectID sets the "git_project_id" field.

func (*RepoCreate) SetGitProjectName

func (rc *RepoCreate) SetGitProjectName(s string) *RepoCreate

SetGitProjectName sets the "git_project_name" field.

func (*RepoCreate) SetMarsConfig

func (rc *RepoCreate) SetMarsConfig(m *mars.Config) *RepoCreate

SetMarsConfig sets the "mars_config" field.

func (*RepoCreate) SetName

func (rc *RepoCreate) SetName(s string) *RepoCreate

SetName sets the "name" field.

func (*RepoCreate) SetNeedGitRepo

func (rc *RepoCreate) SetNeedGitRepo(b bool) *RepoCreate

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoCreate) SetNillableCreatedAt

func (rc *RepoCreate) SetNillableCreatedAt(t *time.Time) *RepoCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RepoCreate) SetNillableDefaultBranch

func (rc *RepoCreate) SetNillableDefaultBranch(s *string) *RepoCreate

SetNillableDefaultBranch sets the "default_branch" field if the given value is not nil.

func (*RepoCreate) SetNillableDeletedAt

func (rc *RepoCreate) SetNillableDeletedAt(t *time.Time) *RepoCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*RepoCreate) SetNillableDescription

func (rc *RepoCreate) SetNillableDescription(s *string) *RepoCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RepoCreate) SetNillableEnabled

func (rc *RepoCreate) SetNillableEnabled(b *bool) *RepoCreate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*RepoCreate) SetNillableGitProjectID

func (rc *RepoCreate) SetNillableGitProjectID(i *int32) *RepoCreate

SetNillableGitProjectID sets the "git_project_id" field if the given value is not nil.

func (*RepoCreate) SetNillableGitProjectName

func (rc *RepoCreate) SetNillableGitProjectName(s *string) *RepoCreate

SetNillableGitProjectName sets the "git_project_name" field if the given value is not nil.

func (*RepoCreate) SetNillableNeedGitRepo

func (rc *RepoCreate) SetNillableNeedGitRepo(b *bool) *RepoCreate

SetNillableNeedGitRepo sets the "need_git_repo" field if the given value is not nil.

func (*RepoCreate) SetNillableUpdatedAt

func (rc *RepoCreate) SetNillableUpdatedAt(t *time.Time) *RepoCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RepoCreate) SetUpdatedAt

func (rc *RepoCreate) SetUpdatedAt(t time.Time) *RepoCreate

SetUpdatedAt sets the "updated_at" field.

type RepoCreateBulk

type RepoCreateBulk struct {
	// contains filtered or unexported fields
}

RepoCreateBulk is the builder for creating many Repo entities in bulk.

func (*RepoCreateBulk) Exec

func (rcb *RepoCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoCreateBulk) ExecX

func (rcb *RepoCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoCreateBulk) OnConflict

func (rcb *RepoCreateBulk) OnConflict(opts ...sql.ConflictOption) *RepoUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Repo.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RepoUpsert) {
		SetCreatedAt(v+v).
	}).
	Exec(ctx)

func (*RepoCreateBulk) OnConflictColumns

func (rcb *RepoCreateBulk) OnConflictColumns(columns ...string) *RepoUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Repo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RepoCreateBulk) Save

func (rcb *RepoCreateBulk) Save(ctx context.Context) ([]*Repo, error)

Save creates the Repo entities in the database.

func (*RepoCreateBulk) SaveX

func (rcb *RepoCreateBulk) SaveX(ctx context.Context) []*Repo

SaveX is like Save, but panics if an error occurs.

type RepoDelete

type RepoDelete struct {
	// contains filtered or unexported fields
}

RepoDelete is the builder for deleting a Repo entity.

func (*RepoDelete) Exec

func (rd *RepoDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RepoDelete) ExecX

func (rd *RepoDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RepoDelete) Where

func (rd *RepoDelete) Where(ps ...predicate.Repo) *RepoDelete

Where appends a list predicates to the RepoDelete builder.

type RepoDeleteOne

type RepoDeleteOne struct {
	// contains filtered or unexported fields
}

RepoDeleteOne is the builder for deleting a single Repo entity.

func (*RepoDeleteOne) Exec

func (rdo *RepoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RepoDeleteOne) ExecX

func (rdo *RepoDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoDeleteOne) Where

func (rdo *RepoDeleteOne) Where(ps ...predicate.Repo) *RepoDeleteOne

Where appends a list predicates to the RepoDelete builder.

type RepoEdges

type RepoEdges struct {
	// Projects holds the value of the projects edge.
	Projects []*Project `json:"projects,omitempty"`
	// contains filtered or unexported fields
}

RepoEdges holds the relations/edges for other nodes in the graph.

func (RepoEdges) ProjectsOrErr

func (e RepoEdges) ProjectsOrErr() ([]*Project, error)

ProjectsOrErr returns the Projects value or an error if the edge was not loaded in eager-loading.

type RepoGroupBy

type RepoGroupBy struct {
	// contains filtered or unexported fields
}

RepoGroupBy is the group-by builder for Repo entities.

func (*RepoGroupBy) Aggregate

func (rgb *RepoGroupBy) Aggregate(fns ...AggregateFunc) *RepoGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RepoGroupBy) Bool

func (s *RepoGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) BoolX

func (s *RepoGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RepoGroupBy) Bools

func (s *RepoGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) BoolsX

func (s *RepoGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RepoGroupBy) Float64

func (s *RepoGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) Float64X

func (s *RepoGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RepoGroupBy) Float64s

func (s *RepoGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) Float64sX

func (s *RepoGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RepoGroupBy) Int

func (s *RepoGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) IntX

func (s *RepoGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RepoGroupBy) Ints

func (s *RepoGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) IntsX

func (s *RepoGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RepoGroupBy) Scan

func (rgb *RepoGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RepoGroupBy) ScanX

func (s *RepoGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RepoGroupBy) String

func (s *RepoGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) StringX

func (s *RepoGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RepoGroupBy) Strings

func (s *RepoGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RepoGroupBy) StringsX

func (s *RepoGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RepoMutation

type RepoMutation struct {
	// contains filtered or unexported fields
}

RepoMutation represents an operation that mutates the Repo nodes in the graph.

func (*RepoMutation) AddField

func (m *RepoMutation) 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 (*RepoMutation) AddGitProjectID

func (m *RepoMutation) AddGitProjectID(i int32)

AddGitProjectID adds i to the "git_project_id" field.

func (*RepoMutation) AddProjectIDs

func (m *RepoMutation) AddProjectIDs(ids ...int)

AddProjectIDs adds the "projects" edge to the Project entity by ids.

func (*RepoMutation) AddedEdges

func (m *RepoMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RepoMutation) AddedField

func (m *RepoMutation) 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 (*RepoMutation) AddedFields

func (m *RepoMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RepoMutation) AddedGitProjectID

func (m *RepoMutation) AddedGitProjectID() (r int32, exists bool)

AddedGitProjectID returns the value that was added to the "git_project_id" field in this mutation.

func (*RepoMutation) AddedIDs

func (m *RepoMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RepoMutation) ClearDefaultBranch

func (m *RepoMutation) ClearDefaultBranch()

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepoMutation) ClearDeletedAt

func (m *RepoMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*RepoMutation) ClearEdge

func (m *RepoMutation) 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 (*RepoMutation) ClearField

func (m *RepoMutation) 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 (*RepoMutation) ClearGitProjectID

func (m *RepoMutation) ClearGitProjectID()

ClearGitProjectID clears the value of the "git_project_id" field.

func (*RepoMutation) ClearGitProjectName

func (m *RepoMutation) ClearGitProjectName()

ClearGitProjectName clears the value of the "git_project_name" field.

func (*RepoMutation) ClearMarsConfig

func (m *RepoMutation) ClearMarsConfig()

ClearMarsConfig clears the value of the "mars_config" field.

func (*RepoMutation) ClearProjects

func (m *RepoMutation) ClearProjects()

ClearProjects clears the "projects" edge to the Project entity.

func (*RepoMutation) ClearedEdges

func (m *RepoMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RepoMutation) ClearedFields

func (m *RepoMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RepoMutation) Client

func (m RepoMutation) 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 (*RepoMutation) CreatedAt

func (m *RepoMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RepoMutation) DefaultBranch

func (m *RepoMutation) DefaultBranch() (r string, exists bool)

DefaultBranch returns the value of the "default_branch" field in the mutation.

func (*RepoMutation) DefaultBranchCleared

func (m *RepoMutation) DefaultBranchCleared() bool

DefaultBranchCleared returns if the "default_branch" field was cleared in this mutation.

func (*RepoMutation) DeletedAt

func (m *RepoMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*RepoMutation) DeletedAtCleared

func (m *RepoMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*RepoMutation) Description

func (m *RepoMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RepoMutation) EdgeCleared

func (m *RepoMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RepoMutation) Enabled

func (m *RepoMutation) Enabled() (r bool, exists bool)

Enabled returns the value of the "enabled" field in the mutation.

func (*RepoMutation) Field

func (m *RepoMutation) 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 (*RepoMutation) FieldCleared

func (m *RepoMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RepoMutation) Fields

func (m *RepoMutation) 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 (*RepoMutation) GitProjectID

func (m *RepoMutation) GitProjectID() (r int32, exists bool)

GitProjectID returns the value of the "git_project_id" field in the mutation.

func (*RepoMutation) GitProjectIDCleared

func (m *RepoMutation) GitProjectIDCleared() bool

GitProjectIDCleared returns if the "git_project_id" field was cleared in this mutation.

func (*RepoMutation) GitProjectName

func (m *RepoMutation) GitProjectName() (r string, exists bool)

GitProjectName returns the value of the "git_project_name" field in the mutation.

func (*RepoMutation) GitProjectNameCleared

func (m *RepoMutation) GitProjectNameCleared() bool

GitProjectNameCleared returns if the "git_project_name" field was cleared in this mutation.

func (*RepoMutation) ID

func (m *RepoMutation) 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 (*RepoMutation) IDs

func (m *RepoMutation) 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 (*RepoMutation) MarsConfig

func (m *RepoMutation) MarsConfig() (r *mars.Config, exists bool)

MarsConfig returns the value of the "mars_config" field in the mutation.

func (*RepoMutation) MarsConfigCleared

func (m *RepoMutation) MarsConfigCleared() bool

MarsConfigCleared returns if the "mars_config" field was cleared in this mutation.

func (*RepoMutation) Name

func (m *RepoMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RepoMutation) NeedGitRepo

func (m *RepoMutation) NeedGitRepo() (r bool, exists bool)

NeedGitRepo returns the value of the "need_git_repo" field in the mutation.

func (*RepoMutation) OldCreatedAt

func (m *RepoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldDefaultBranch

func (m *RepoMutation) OldDefaultBranch(ctx context.Context) (v string, err error)

OldDefaultBranch returns the old "default_branch" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldDeletedAt

func (m *RepoMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldDescription

func (m *RepoMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldEnabled

func (m *RepoMutation) OldEnabled(ctx context.Context) (v bool, err error)

OldEnabled returns the old "enabled" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldField

func (m *RepoMutation) 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 (*RepoMutation) OldGitProjectID

func (m *RepoMutation) OldGitProjectID(ctx context.Context) (v int32, err error)

OldGitProjectID returns the old "git_project_id" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldGitProjectName

func (m *RepoMutation) OldGitProjectName(ctx context.Context) (v string, err error)

OldGitProjectName returns the old "git_project_name" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldMarsConfig

func (m *RepoMutation) OldMarsConfig(ctx context.Context) (v *mars.Config, err error)

OldMarsConfig returns the old "mars_config" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldName

func (m *RepoMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldNeedGitRepo

func (m *RepoMutation) OldNeedGitRepo(ctx context.Context) (v bool, err error)

OldNeedGitRepo returns the old "need_git_repo" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldUpdatedAt

func (m *RepoMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) Op

func (m *RepoMutation) Op() Op

Op returns the operation name.

func (*RepoMutation) ProjectsCleared

func (m *RepoMutation) ProjectsCleared() bool

ProjectsCleared reports if the "projects" edge to the Project entity was cleared.

func (*RepoMutation) ProjectsIDs

func (m *RepoMutation) ProjectsIDs() (ids []int)

ProjectsIDs returns the "projects" edge IDs in the mutation.

func (*RepoMutation) RemoveProjectIDs

func (m *RepoMutation) RemoveProjectIDs(ids ...int)

RemoveProjectIDs removes the "projects" edge to the Project entity by IDs.

func (*RepoMutation) RemovedEdges

func (m *RepoMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RepoMutation) RemovedIDs

func (m *RepoMutation) 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 (*RepoMutation) RemovedProjectsIDs

func (m *RepoMutation) RemovedProjectsIDs() (ids []int)

RemovedProjects returns the removed IDs of the "projects" edge to the Project entity.

func (*RepoMutation) ResetCreatedAt

func (m *RepoMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RepoMutation) ResetDefaultBranch

func (m *RepoMutation) ResetDefaultBranch()

ResetDefaultBranch resets all changes to the "default_branch" field.

func (*RepoMutation) ResetDeletedAt

func (m *RepoMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*RepoMutation) ResetDescription

func (m *RepoMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RepoMutation) ResetEdge

func (m *RepoMutation) 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 (*RepoMutation) ResetEnabled

func (m *RepoMutation) ResetEnabled()

ResetEnabled resets all changes to the "enabled" field.

func (*RepoMutation) ResetField

func (m *RepoMutation) 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 (*RepoMutation) ResetGitProjectID

func (m *RepoMutation) ResetGitProjectID()

ResetGitProjectID resets all changes to the "git_project_id" field.

func (*RepoMutation) ResetGitProjectName

func (m *RepoMutation) ResetGitProjectName()

ResetGitProjectName resets all changes to the "git_project_name" field.

func (*RepoMutation) ResetMarsConfig

func (m *RepoMutation) ResetMarsConfig()

ResetMarsConfig resets all changes to the "mars_config" field.

func (*RepoMutation) ResetName

func (m *RepoMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RepoMutation) ResetNeedGitRepo

func (m *RepoMutation) ResetNeedGitRepo()

ResetNeedGitRepo resets all changes to the "need_git_repo" field.

func (*RepoMutation) ResetProjects

func (m *RepoMutation) ResetProjects()

ResetProjects resets all changes to the "projects" edge.

func (*RepoMutation) ResetUpdatedAt

func (m *RepoMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RepoMutation) SetCreatedAt

func (m *RepoMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RepoMutation) SetDefaultBranch

func (m *RepoMutation) SetDefaultBranch(s string)

SetDefaultBranch sets the "default_branch" field.

func (*RepoMutation) SetDeletedAt

func (m *RepoMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*RepoMutation) SetDescription

func (m *RepoMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RepoMutation) SetEnabled

func (m *RepoMutation) SetEnabled(b bool)

SetEnabled sets the "enabled" field.

func (*RepoMutation) SetField

func (m *RepoMutation) 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 (*RepoMutation) SetGitProjectID

func (m *RepoMutation) SetGitProjectID(i int32)

SetGitProjectID sets the "git_project_id" field.

func (*RepoMutation) SetGitProjectName

func (m *RepoMutation) SetGitProjectName(s string)

SetGitProjectName sets the "git_project_name" field.

func (*RepoMutation) SetMarsConfig

func (m *RepoMutation) SetMarsConfig(value *mars.Config)

SetMarsConfig sets the "mars_config" field.

func (*RepoMutation) SetName

func (m *RepoMutation) SetName(s string)

SetName sets the "name" field.

func (*RepoMutation) SetNeedGitRepo

func (m *RepoMutation) SetNeedGitRepo(b bool)

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoMutation) SetOp

func (m *RepoMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RepoMutation) SetUpdatedAt

func (m *RepoMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (RepoMutation) Tx

func (m RepoMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RepoMutation) Type

func (m *RepoMutation) Type() string

Type returns the node type of this mutation (Repo).

func (*RepoMutation) UpdatedAt

func (m *RepoMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RepoMutation) Where

func (m *RepoMutation) Where(ps ...predicate.Repo)

Where appends a list predicates to the RepoMutation builder.

func (*RepoMutation) WhereP

func (m *RepoMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RepoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RepoQuery

type RepoQuery struct {
	// contains filtered or unexported fields
}

RepoQuery is the builder for querying Repo entities.

func (*RepoQuery) Aggregate

func (rq *RepoQuery) Aggregate(fns ...AggregateFunc) *RepoSelect

Aggregate returns a RepoSelect configured with the given aggregations.

func (*RepoQuery) All

func (rq *RepoQuery) All(ctx context.Context) ([]*Repo, error)

All executes the query and returns a list of Repos.

func (*RepoQuery) AllX

func (rq *RepoQuery) AllX(ctx context.Context) []*Repo

AllX is like All, but panics if an error occurs.

func (*RepoQuery) Clone

func (rq *RepoQuery) Clone() *RepoQuery

Clone returns a duplicate of the RepoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RepoQuery) Count

func (rq *RepoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RepoQuery) CountX

func (rq *RepoQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RepoQuery) Exist

func (rq *RepoQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RepoQuery) ExistX

func (rq *RepoQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RepoQuery) First

func (rq *RepoQuery) First(ctx context.Context) (*Repo, error)

First returns the first Repo entity from the query. Returns a *NotFoundError when no Repo was found.

func (*RepoQuery) FirstID

func (rq *RepoQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Repo ID from the query. Returns a *NotFoundError when no Repo ID was found.

func (*RepoQuery) FirstIDX

func (rq *RepoQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RepoQuery) FirstX

func (rq *RepoQuery) FirstX(ctx context.Context) *Repo

FirstX is like First, but panics if an error occurs.

func (*RepoQuery) ForShare

func (rq *RepoQuery) ForShare(opts ...sql.LockOption) *RepoQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*RepoQuery) ForUpdate

func (rq *RepoQuery) ForUpdate(opts ...sql.LockOption) *RepoQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*RepoQuery) GroupBy

func (rq *RepoQuery) GroupBy(field string, fields ...string) *RepoGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Repo.Query().
	GroupBy(repo.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RepoQuery) IDs

func (rq *RepoQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Repo IDs.

func (*RepoQuery) IDsX

func (rq *RepoQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RepoQuery) Limit

func (rq *RepoQuery) Limit(limit int) *RepoQuery

Limit the number of records to be returned by this query.

func (*RepoQuery) Offset

func (rq *RepoQuery) Offset(offset int) *RepoQuery

Offset to start from.

func (*RepoQuery) Only

func (rq *RepoQuery) Only(ctx context.Context) (*Repo, error)

Only returns a single Repo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Repo entity is found. Returns a *NotFoundError when no Repo entities are found.

func (*RepoQuery) OnlyID

func (rq *RepoQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Repo ID in the query. Returns a *NotSingularError when more than one Repo ID is found. Returns a *NotFoundError when no entities are found.

func (*RepoQuery) OnlyIDX

func (rq *RepoQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RepoQuery) OnlyX

func (rq *RepoQuery) OnlyX(ctx context.Context) *Repo

OnlyX is like Only, but panics if an error occurs.

func (*RepoQuery) Order

func (rq *RepoQuery) Order(o ...repo.OrderOption) *RepoQuery

Order specifies how the records should be ordered.

func (*RepoQuery) QueryProjects

func (rq *RepoQuery) QueryProjects() *ProjectQuery

QueryProjects chains the current query on the "projects" edge.

func (*RepoQuery) Select

func (rq *RepoQuery) Select(fields ...string) *RepoSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.Repo.Query().
	Select(repo.FieldCreatedAt).
	Scan(ctx, &v)

func (*RepoQuery) Unique

func (rq *RepoQuery) Unique(unique bool) *RepoQuery

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 (*RepoQuery) Where

func (rq *RepoQuery) Where(ps ...predicate.Repo) *RepoQuery

Where adds a new predicate for the RepoQuery builder.

func (*RepoQuery) WithProjects

func (rq *RepoQuery) WithProjects(opts ...func(*ProjectQuery)) *RepoQuery

WithProjects tells the query-builder to eager-load the nodes that are connected to the "projects" edge. The optional arguments are used to configure the query builder of the edge.

type RepoSelect

type RepoSelect struct {
	*RepoQuery
	// contains filtered or unexported fields
}

RepoSelect is the builder for selecting fields of Repo entities.

func (*RepoSelect) Aggregate

func (rs *RepoSelect) Aggregate(fns ...AggregateFunc) *RepoSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RepoSelect) Bool

func (s *RepoSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RepoSelect) BoolX

func (s *RepoSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RepoSelect) Bools

func (s *RepoSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RepoSelect) BoolsX

func (s *RepoSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RepoSelect) Float64

func (s *RepoSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RepoSelect) Float64X

func (s *RepoSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RepoSelect) Float64s

func (s *RepoSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RepoSelect) Float64sX

func (s *RepoSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RepoSelect) Int

func (s *RepoSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RepoSelect) IntX

func (s *RepoSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RepoSelect) Ints

func (s *RepoSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RepoSelect) IntsX

func (s *RepoSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RepoSelect) Scan

func (rs *RepoSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RepoSelect) ScanX

func (s *RepoSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RepoSelect) String

func (s *RepoSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RepoSelect) StringX

func (s *RepoSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RepoSelect) Strings

func (s *RepoSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RepoSelect) StringsX

func (s *RepoSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RepoUpdate

type RepoUpdate struct {
	// contains filtered or unexported fields
}

RepoUpdate is the builder for updating Repo entities.

func (*RepoUpdate) AddGitProjectID

func (ru *RepoUpdate) AddGitProjectID(i int32) *RepoUpdate

AddGitProjectID adds i to the "git_project_id" field.

func (*RepoUpdate) AddProjectIDs

func (ru *RepoUpdate) AddProjectIDs(ids ...int) *RepoUpdate

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*RepoUpdate) AddProjects

func (ru *RepoUpdate) AddProjects(p ...*Project) *RepoUpdate

AddProjects adds the "projects" edges to the Project entity.

func (*RepoUpdate) ClearDefaultBranch

func (ru *RepoUpdate) ClearDefaultBranch() *RepoUpdate

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepoUpdate) ClearDeletedAt

func (ru *RepoUpdate) ClearDeletedAt() *RepoUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*RepoUpdate) ClearGitProjectID

func (ru *RepoUpdate) ClearGitProjectID() *RepoUpdate

ClearGitProjectID clears the value of the "git_project_id" field.

func (*RepoUpdate) ClearGitProjectName

func (ru *RepoUpdate) ClearGitProjectName() *RepoUpdate

ClearGitProjectName clears the value of the "git_project_name" field.

func (*RepoUpdate) ClearMarsConfig

func (ru *RepoUpdate) ClearMarsConfig() *RepoUpdate

ClearMarsConfig clears the value of the "mars_config" field.

func (*RepoUpdate) ClearProjects

func (ru *RepoUpdate) ClearProjects() *RepoUpdate

ClearProjects clears all "projects" edges to the Project entity.

func (*RepoUpdate) Exec

func (ru *RepoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoUpdate) ExecX

func (ru *RepoUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoUpdate) Mutation

func (ru *RepoUpdate) Mutation() *RepoMutation

Mutation returns the RepoMutation object of the builder.

func (*RepoUpdate) RemoveProjectIDs

func (ru *RepoUpdate) RemoveProjectIDs(ids ...int) *RepoUpdate

RemoveProjectIDs removes the "projects" edge to Project entities by IDs.

func (*RepoUpdate) RemoveProjects

func (ru *RepoUpdate) RemoveProjects(p ...*Project) *RepoUpdate

RemoveProjects removes "projects" edges to Project entities.

func (*RepoUpdate) Save

func (ru *RepoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RepoUpdate) SaveX

func (ru *RepoUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RepoUpdate) SetDefaultBranch

func (ru *RepoUpdate) SetDefaultBranch(s string) *RepoUpdate

SetDefaultBranch sets the "default_branch" field.

func (*RepoUpdate) SetDeletedAt

func (ru *RepoUpdate) SetDeletedAt(t time.Time) *RepoUpdate

SetDeletedAt sets the "deleted_at" field.

func (*RepoUpdate) SetDescription

func (ru *RepoUpdate) SetDescription(s string) *RepoUpdate

SetDescription sets the "description" field.

func (*RepoUpdate) SetEnabled

func (ru *RepoUpdate) SetEnabled(b bool) *RepoUpdate

SetEnabled sets the "enabled" field.

func (*RepoUpdate) SetGitProjectID

func (ru *RepoUpdate) SetGitProjectID(i int32) *RepoUpdate

SetGitProjectID sets the "git_project_id" field.

func (*RepoUpdate) SetGitProjectName

func (ru *RepoUpdate) SetGitProjectName(s string) *RepoUpdate

SetGitProjectName sets the "git_project_name" field.

func (*RepoUpdate) SetMarsConfig

func (ru *RepoUpdate) SetMarsConfig(m *mars.Config) *RepoUpdate

SetMarsConfig sets the "mars_config" field.

func (*RepoUpdate) SetName

func (ru *RepoUpdate) SetName(s string) *RepoUpdate

SetName sets the "name" field.

func (*RepoUpdate) SetNeedGitRepo

func (ru *RepoUpdate) SetNeedGitRepo(b bool) *RepoUpdate

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoUpdate) SetNillableDefaultBranch

func (ru *RepoUpdate) SetNillableDefaultBranch(s *string) *RepoUpdate

SetNillableDefaultBranch sets the "default_branch" field if the given value is not nil.

func (*RepoUpdate) SetNillableDeletedAt

func (ru *RepoUpdate) SetNillableDeletedAt(t *time.Time) *RepoUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*RepoUpdate) SetNillableDescription

func (ru *RepoUpdate) SetNillableDescription(s *string) *RepoUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RepoUpdate) SetNillableEnabled

func (ru *RepoUpdate) SetNillableEnabled(b *bool) *RepoUpdate

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*RepoUpdate) SetNillableGitProjectID

func (ru *RepoUpdate) SetNillableGitProjectID(i *int32) *RepoUpdate

SetNillableGitProjectID sets the "git_project_id" field if the given value is not nil.

func (*RepoUpdate) SetNillableGitProjectName

func (ru *RepoUpdate) SetNillableGitProjectName(s *string) *RepoUpdate

SetNillableGitProjectName sets the "git_project_name" field if the given value is not nil.

func (*RepoUpdate) SetNillableName

func (ru *RepoUpdate) SetNillableName(s *string) *RepoUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*RepoUpdate) SetNillableNeedGitRepo

func (ru *RepoUpdate) SetNillableNeedGitRepo(b *bool) *RepoUpdate

SetNillableNeedGitRepo sets the "need_git_repo" field if the given value is not nil.

func (*RepoUpdate) SetUpdatedAt

func (ru *RepoUpdate) SetUpdatedAt(t time.Time) *RepoUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpdate) Where

func (ru *RepoUpdate) Where(ps ...predicate.Repo) *RepoUpdate

Where appends a list predicates to the RepoUpdate builder.

type RepoUpdateOne

type RepoUpdateOne struct {
	// contains filtered or unexported fields
}

RepoUpdateOne is the builder for updating a single Repo entity.

func (*RepoUpdateOne) AddGitProjectID

func (ruo *RepoUpdateOne) AddGitProjectID(i int32) *RepoUpdateOne

AddGitProjectID adds i to the "git_project_id" field.

func (*RepoUpdateOne) AddProjectIDs

func (ruo *RepoUpdateOne) AddProjectIDs(ids ...int) *RepoUpdateOne

AddProjectIDs adds the "projects" edge to the Project entity by IDs.

func (*RepoUpdateOne) AddProjects

func (ruo *RepoUpdateOne) AddProjects(p ...*Project) *RepoUpdateOne

AddProjects adds the "projects" edges to the Project entity.

func (*RepoUpdateOne) ClearDefaultBranch

func (ruo *RepoUpdateOne) ClearDefaultBranch() *RepoUpdateOne

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepoUpdateOne) ClearDeletedAt

func (ruo *RepoUpdateOne) ClearDeletedAt() *RepoUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*RepoUpdateOne) ClearGitProjectID

func (ruo *RepoUpdateOne) ClearGitProjectID() *RepoUpdateOne

ClearGitProjectID clears the value of the "git_project_id" field.

func (*RepoUpdateOne) ClearGitProjectName

func (ruo *RepoUpdateOne) ClearGitProjectName() *RepoUpdateOne

ClearGitProjectName clears the value of the "git_project_name" field.

func (*RepoUpdateOne) ClearMarsConfig

func (ruo *RepoUpdateOne) ClearMarsConfig() *RepoUpdateOne

ClearMarsConfig clears the value of the "mars_config" field.

func (*RepoUpdateOne) ClearProjects

func (ruo *RepoUpdateOne) ClearProjects() *RepoUpdateOne

ClearProjects clears all "projects" edges to the Project entity.

func (*RepoUpdateOne) Exec

func (ruo *RepoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RepoUpdateOne) ExecX

func (ruo *RepoUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoUpdateOne) Mutation

func (ruo *RepoUpdateOne) Mutation() *RepoMutation

Mutation returns the RepoMutation object of the builder.

func (*RepoUpdateOne) RemoveProjectIDs

func (ruo *RepoUpdateOne) RemoveProjectIDs(ids ...int) *RepoUpdateOne

RemoveProjectIDs removes the "projects" edge to Project entities by IDs.

func (*RepoUpdateOne) RemoveProjects

func (ruo *RepoUpdateOne) RemoveProjects(p ...*Project) *RepoUpdateOne

RemoveProjects removes "projects" edges to Project entities.

func (*RepoUpdateOne) Save

func (ruo *RepoUpdateOne) Save(ctx context.Context) (*Repo, error)

Save executes the query and returns the updated Repo entity.

func (*RepoUpdateOne) SaveX

func (ruo *RepoUpdateOne) SaveX(ctx context.Context) *Repo

SaveX is like Save, but panics if an error occurs.

func (*RepoUpdateOne) Select

func (ruo *RepoUpdateOne) Select(field string, fields ...string) *RepoUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RepoUpdateOne) SetDefaultBranch

func (ruo *RepoUpdateOne) SetDefaultBranch(s string) *RepoUpdateOne

SetDefaultBranch sets the "default_branch" field.

func (*RepoUpdateOne) SetDeletedAt

func (ruo *RepoUpdateOne) SetDeletedAt(t time.Time) *RepoUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*RepoUpdateOne) SetDescription

func (ruo *RepoUpdateOne) SetDescription(s string) *RepoUpdateOne

SetDescription sets the "description" field.

func (*RepoUpdateOne) SetEnabled

func (ruo *RepoUpdateOne) SetEnabled(b bool) *RepoUpdateOne

SetEnabled sets the "enabled" field.

func (*RepoUpdateOne) SetGitProjectID

func (ruo *RepoUpdateOne) SetGitProjectID(i int32) *RepoUpdateOne

SetGitProjectID sets the "git_project_id" field.

func (*RepoUpdateOne) SetGitProjectName

func (ruo *RepoUpdateOne) SetGitProjectName(s string) *RepoUpdateOne

SetGitProjectName sets the "git_project_name" field.

func (*RepoUpdateOne) SetMarsConfig

func (ruo *RepoUpdateOne) SetMarsConfig(m *mars.Config) *RepoUpdateOne

SetMarsConfig sets the "mars_config" field.

func (*RepoUpdateOne) SetName

func (ruo *RepoUpdateOne) SetName(s string) *RepoUpdateOne

SetName sets the "name" field.

func (*RepoUpdateOne) SetNeedGitRepo

func (ruo *RepoUpdateOne) SetNeedGitRepo(b bool) *RepoUpdateOne

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoUpdateOne) SetNillableDefaultBranch

func (ruo *RepoUpdateOne) SetNillableDefaultBranch(s *string) *RepoUpdateOne

SetNillableDefaultBranch sets the "default_branch" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableDeletedAt

func (ruo *RepoUpdateOne) SetNillableDeletedAt(t *time.Time) *RepoUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableDescription

func (ruo *RepoUpdateOne) SetNillableDescription(s *string) *RepoUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableEnabled

func (ruo *RepoUpdateOne) SetNillableEnabled(b *bool) *RepoUpdateOne

SetNillableEnabled sets the "enabled" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableGitProjectID

func (ruo *RepoUpdateOne) SetNillableGitProjectID(i *int32) *RepoUpdateOne

SetNillableGitProjectID sets the "git_project_id" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableGitProjectName

func (ruo *RepoUpdateOne) SetNillableGitProjectName(s *string) *RepoUpdateOne

SetNillableGitProjectName sets the "git_project_name" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableName

func (ruo *RepoUpdateOne) SetNillableName(s *string) *RepoUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableNeedGitRepo

func (ruo *RepoUpdateOne) SetNillableNeedGitRepo(b *bool) *RepoUpdateOne

SetNillableNeedGitRepo sets the "need_git_repo" field if the given value is not nil.

func (*RepoUpdateOne) SetUpdatedAt

func (ruo *RepoUpdateOne) SetUpdatedAt(t time.Time) *RepoUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpdateOne) Where

func (ruo *RepoUpdateOne) Where(ps ...predicate.Repo) *RepoUpdateOne

Where appends a list predicates to the RepoUpdate builder.

type RepoUpsert

type RepoUpsert struct {
	*sql.UpdateSet
}

RepoUpsert is the "OnConflict" setter.

func (*RepoUpsert) AddGitProjectID

func (u *RepoUpsert) AddGitProjectID(v int32) *RepoUpsert

AddGitProjectID adds v to the "git_project_id" field.

func (*RepoUpsert) ClearDefaultBranch

func (u *RepoUpsert) ClearDefaultBranch() *RepoUpsert

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepoUpsert) ClearDeletedAt

func (u *RepoUpsert) ClearDeletedAt() *RepoUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*RepoUpsert) ClearGitProjectID

func (u *RepoUpsert) ClearGitProjectID() *RepoUpsert

ClearGitProjectID clears the value of the "git_project_id" field.

func (*RepoUpsert) ClearGitProjectName

func (u *RepoUpsert) ClearGitProjectName() *RepoUpsert

ClearGitProjectName clears the value of the "git_project_name" field.

func (*RepoUpsert) ClearMarsConfig

func (u *RepoUpsert) ClearMarsConfig() *RepoUpsert

ClearMarsConfig clears the value of the "mars_config" field.

func (*RepoUpsert) SetDefaultBranch

func (u *RepoUpsert) SetDefaultBranch(v string) *RepoUpsert

SetDefaultBranch sets the "default_branch" field.

func (*RepoUpsert) SetDeletedAt

func (u *RepoUpsert) SetDeletedAt(v time.Time) *RepoUpsert

SetDeletedAt sets the "deleted_at" field.

func (*RepoUpsert) SetDescription

func (u *RepoUpsert) SetDescription(v string) *RepoUpsert

SetDescription sets the "description" field.

func (*RepoUpsert) SetEnabled

func (u *RepoUpsert) SetEnabled(v bool) *RepoUpsert

SetEnabled sets the "enabled" field.

func (*RepoUpsert) SetGitProjectID

func (u *RepoUpsert) SetGitProjectID(v int32) *RepoUpsert

SetGitProjectID sets the "git_project_id" field.

func (*RepoUpsert) SetGitProjectName

func (u *RepoUpsert) SetGitProjectName(v string) *RepoUpsert

SetGitProjectName sets the "git_project_name" field.

func (*RepoUpsert) SetMarsConfig

func (u *RepoUpsert) SetMarsConfig(v *mars.Config) *RepoUpsert

SetMarsConfig sets the "mars_config" field.

func (*RepoUpsert) SetName

func (u *RepoUpsert) SetName(v string) *RepoUpsert

SetName sets the "name" field.

func (*RepoUpsert) SetNeedGitRepo

func (u *RepoUpsert) SetNeedGitRepo(v bool) *RepoUpsert

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoUpsert) SetUpdatedAt

func (u *RepoUpsert) SetUpdatedAt(v time.Time) *RepoUpsert

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpsert) UpdateDefaultBranch

func (u *RepoUpsert) UpdateDefaultBranch() *RepoUpsert

UpdateDefaultBranch sets the "default_branch" field to the value that was provided on create.

func (*RepoUpsert) UpdateDeletedAt

func (u *RepoUpsert) UpdateDeletedAt() *RepoUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*RepoUpsert) UpdateDescription

func (u *RepoUpsert) UpdateDescription() *RepoUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RepoUpsert) UpdateEnabled

func (u *RepoUpsert) UpdateEnabled() *RepoUpsert

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*RepoUpsert) UpdateGitProjectID

func (u *RepoUpsert) UpdateGitProjectID() *RepoUpsert

UpdateGitProjectID sets the "git_project_id" field to the value that was provided on create.

func (*RepoUpsert) UpdateGitProjectName

func (u *RepoUpsert) UpdateGitProjectName() *RepoUpsert

UpdateGitProjectName sets the "git_project_name" field to the value that was provided on create.

func (*RepoUpsert) UpdateMarsConfig

func (u *RepoUpsert) UpdateMarsConfig() *RepoUpsert

UpdateMarsConfig sets the "mars_config" field to the value that was provided on create.

func (*RepoUpsert) UpdateName

func (u *RepoUpsert) UpdateName() *RepoUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*RepoUpsert) UpdateNeedGitRepo

func (u *RepoUpsert) UpdateNeedGitRepo() *RepoUpsert

UpdateNeedGitRepo sets the "need_git_repo" field to the value that was provided on create.

func (*RepoUpsert) UpdateUpdatedAt

func (u *RepoUpsert) UpdateUpdatedAt() *RepoUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type RepoUpsertBulk

type RepoUpsertBulk struct {
	// contains filtered or unexported fields
}

RepoUpsertBulk is the builder for "upsert"-ing a bulk of Repo nodes.

func (*RepoUpsertBulk) AddGitProjectID

func (u *RepoUpsertBulk) AddGitProjectID(v int32) *RepoUpsertBulk

AddGitProjectID adds v to the "git_project_id" field.

func (*RepoUpsertBulk) ClearDefaultBranch

func (u *RepoUpsertBulk) ClearDefaultBranch() *RepoUpsertBulk

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepoUpsertBulk) ClearDeletedAt

func (u *RepoUpsertBulk) ClearDeletedAt() *RepoUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*RepoUpsertBulk) ClearGitProjectID

func (u *RepoUpsertBulk) ClearGitProjectID() *RepoUpsertBulk

ClearGitProjectID clears the value of the "git_project_id" field.

func (*RepoUpsertBulk) ClearGitProjectName

func (u *RepoUpsertBulk) ClearGitProjectName() *RepoUpsertBulk

ClearGitProjectName clears the value of the "git_project_name" field.

func (*RepoUpsertBulk) ClearMarsConfig

func (u *RepoUpsertBulk) ClearMarsConfig() *RepoUpsertBulk

ClearMarsConfig clears the value of the "mars_config" field.

func (*RepoUpsertBulk) DoNothing

func (u *RepoUpsertBulk) DoNothing() *RepoUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RepoUpsertBulk) Exec

func (u *RepoUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoUpsertBulk) ExecX

func (u *RepoUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoUpsertBulk) Ignore

func (u *RepoUpsertBulk) Ignore() *RepoUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Repo.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RepoUpsertBulk) SetDefaultBranch

func (u *RepoUpsertBulk) SetDefaultBranch(v string) *RepoUpsertBulk

SetDefaultBranch sets the "default_branch" field.

func (*RepoUpsertBulk) SetDeletedAt

func (u *RepoUpsertBulk) SetDeletedAt(v time.Time) *RepoUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*RepoUpsertBulk) SetDescription

func (u *RepoUpsertBulk) SetDescription(v string) *RepoUpsertBulk

SetDescription sets the "description" field.

func (*RepoUpsertBulk) SetEnabled

func (u *RepoUpsertBulk) SetEnabled(v bool) *RepoUpsertBulk

SetEnabled sets the "enabled" field.

func (*RepoUpsertBulk) SetGitProjectID

func (u *RepoUpsertBulk) SetGitProjectID(v int32) *RepoUpsertBulk

SetGitProjectID sets the "git_project_id" field.

func (*RepoUpsertBulk) SetGitProjectName

func (u *RepoUpsertBulk) SetGitProjectName(v string) *RepoUpsertBulk

SetGitProjectName sets the "git_project_name" field.

func (*RepoUpsertBulk) SetMarsConfig

func (u *RepoUpsertBulk) SetMarsConfig(v *mars.Config) *RepoUpsertBulk

SetMarsConfig sets the "mars_config" field.

func (*RepoUpsertBulk) SetName

func (u *RepoUpsertBulk) SetName(v string) *RepoUpsertBulk

SetName sets the "name" field.

func (*RepoUpsertBulk) SetNeedGitRepo

func (u *RepoUpsertBulk) SetNeedGitRepo(v bool) *RepoUpsertBulk

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoUpsertBulk) SetUpdatedAt

func (u *RepoUpsertBulk) SetUpdatedAt(v time.Time) *RepoUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpsertBulk) Update

func (u *RepoUpsertBulk) Update(set func(*RepoUpsert)) *RepoUpsertBulk

Update allows overriding fields `UPDATE` values. See the RepoCreateBulk.OnConflict documentation for more info.

func (*RepoUpsertBulk) UpdateDefaultBranch

func (u *RepoUpsertBulk) UpdateDefaultBranch() *RepoUpsertBulk

UpdateDefaultBranch sets the "default_branch" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateDeletedAt

func (u *RepoUpsertBulk) UpdateDeletedAt() *RepoUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateDescription

func (u *RepoUpsertBulk) UpdateDescription() *RepoUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateEnabled

func (u *RepoUpsertBulk) UpdateEnabled() *RepoUpsertBulk

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateGitProjectID

func (u *RepoUpsertBulk) UpdateGitProjectID() *RepoUpsertBulk

UpdateGitProjectID sets the "git_project_id" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateGitProjectName

func (u *RepoUpsertBulk) UpdateGitProjectName() *RepoUpsertBulk

UpdateGitProjectName sets the "git_project_name" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateMarsConfig

func (u *RepoUpsertBulk) UpdateMarsConfig() *RepoUpsertBulk

UpdateMarsConfig sets the "mars_config" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateName

func (u *RepoUpsertBulk) UpdateName() *RepoUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateNeedGitRepo

func (u *RepoUpsertBulk) UpdateNeedGitRepo() *RepoUpsertBulk

UpdateNeedGitRepo sets the "need_git_repo" field to the value that was provided on create.

func (*RepoUpsertBulk) UpdateNewValues

func (u *RepoUpsertBulk) UpdateNewValues() *RepoUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Repo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*RepoUpsertBulk) UpdateUpdatedAt

func (u *RepoUpsertBulk) UpdateUpdatedAt() *RepoUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type RepoUpsertOne

type RepoUpsertOne struct {
	// contains filtered or unexported fields
}

RepoUpsertOne is the builder for "upsert"-ing

one Repo node.

func (*RepoUpsertOne) AddGitProjectID

func (u *RepoUpsertOne) AddGitProjectID(v int32) *RepoUpsertOne

AddGitProjectID adds v to the "git_project_id" field.

func (*RepoUpsertOne) ClearDefaultBranch

func (u *RepoUpsertOne) ClearDefaultBranch() *RepoUpsertOne

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepoUpsertOne) ClearDeletedAt

func (u *RepoUpsertOne) ClearDeletedAt() *RepoUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*RepoUpsertOne) ClearGitProjectID

func (u *RepoUpsertOne) ClearGitProjectID() *RepoUpsertOne

ClearGitProjectID clears the value of the "git_project_id" field.

func (*RepoUpsertOne) ClearGitProjectName

func (u *RepoUpsertOne) ClearGitProjectName() *RepoUpsertOne

ClearGitProjectName clears the value of the "git_project_name" field.

func (*RepoUpsertOne) ClearMarsConfig

func (u *RepoUpsertOne) ClearMarsConfig() *RepoUpsertOne

ClearMarsConfig clears the value of the "mars_config" field.

func (*RepoUpsertOne) DoNothing

func (u *RepoUpsertOne) DoNothing() *RepoUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RepoUpsertOne) Exec

func (u *RepoUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoUpsertOne) ExecX

func (u *RepoUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoUpsertOne) ID

func (u *RepoUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RepoUpsertOne) IDX

func (u *RepoUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*RepoUpsertOne) Ignore

func (u *RepoUpsertOne) Ignore() *RepoUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Repo.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RepoUpsertOne) SetDefaultBranch

func (u *RepoUpsertOne) SetDefaultBranch(v string) *RepoUpsertOne

SetDefaultBranch sets the "default_branch" field.

func (*RepoUpsertOne) SetDeletedAt

func (u *RepoUpsertOne) SetDeletedAt(v time.Time) *RepoUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*RepoUpsertOne) SetDescription

func (u *RepoUpsertOne) SetDescription(v string) *RepoUpsertOne

SetDescription sets the "description" field.

func (*RepoUpsertOne) SetEnabled

func (u *RepoUpsertOne) SetEnabled(v bool) *RepoUpsertOne

SetEnabled sets the "enabled" field.

func (*RepoUpsertOne) SetGitProjectID

func (u *RepoUpsertOne) SetGitProjectID(v int32) *RepoUpsertOne

SetGitProjectID sets the "git_project_id" field.

func (*RepoUpsertOne) SetGitProjectName

func (u *RepoUpsertOne) SetGitProjectName(v string) *RepoUpsertOne

SetGitProjectName sets the "git_project_name" field.

func (*RepoUpsertOne) SetMarsConfig

func (u *RepoUpsertOne) SetMarsConfig(v *mars.Config) *RepoUpsertOne

SetMarsConfig sets the "mars_config" field.

func (*RepoUpsertOne) SetName

func (u *RepoUpsertOne) SetName(v string) *RepoUpsertOne

SetName sets the "name" field.

func (*RepoUpsertOne) SetNeedGitRepo

func (u *RepoUpsertOne) SetNeedGitRepo(v bool) *RepoUpsertOne

SetNeedGitRepo sets the "need_git_repo" field.

func (*RepoUpsertOne) SetUpdatedAt

func (u *RepoUpsertOne) SetUpdatedAt(v time.Time) *RepoUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpsertOne) Update

func (u *RepoUpsertOne) Update(set func(*RepoUpsert)) *RepoUpsertOne

Update allows overriding fields `UPDATE` values. See the RepoCreate.OnConflict documentation for more info.

func (*RepoUpsertOne) UpdateDefaultBranch

func (u *RepoUpsertOne) UpdateDefaultBranch() *RepoUpsertOne

UpdateDefaultBranch sets the "default_branch" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateDeletedAt

func (u *RepoUpsertOne) UpdateDeletedAt() *RepoUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateDescription

func (u *RepoUpsertOne) UpdateDescription() *RepoUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateEnabled

func (u *RepoUpsertOne) UpdateEnabled() *RepoUpsertOne

UpdateEnabled sets the "enabled" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateGitProjectID

func (u *RepoUpsertOne) UpdateGitProjectID() *RepoUpsertOne

UpdateGitProjectID sets the "git_project_id" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateGitProjectName

func (u *RepoUpsertOne) UpdateGitProjectName() *RepoUpsertOne

UpdateGitProjectName sets the "git_project_name" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateMarsConfig

func (u *RepoUpsertOne) UpdateMarsConfig() *RepoUpsertOne

UpdateMarsConfig sets the "mars_config" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateName

func (u *RepoUpsertOne) UpdateName() *RepoUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateNeedGitRepo

func (u *RepoUpsertOne) UpdateNeedGitRepo() *RepoUpsertOne

UpdateNeedGitRepo sets the "need_git_repo" field to the value that was provided on create.

func (*RepoUpsertOne) UpdateNewValues

func (u *RepoUpsertOne) UpdateNewValues() *RepoUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Repo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*RepoUpsertOne) UpdateUpdatedAt

func (u *RepoUpsertOne) UpdateUpdatedAt() *RepoUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Repos

type Repos []*Repo

Repos is a parsable slice of Repo.

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 {

	// AccessToken is the client for interacting with the AccessToken builders.
	AccessToken *AccessTokenClient
	// CacheLock is the client for interacting with the CacheLock builders.
	CacheLock *CacheLockClient
	// Changelog is the client for interacting with the Changelog builders.
	Changelog *ChangelogClient
	// DBCache is the client for interacting with the DBCache builders.
	DBCache *DBCacheClient
	// Event is the client for interacting with the Event builders.
	Event *EventClient
	// Favorite is the client for interacting with the Favorite builders.
	Favorite *FavoriteClient
	// File is the client for interacting with the File builders.
	File *FileClient
	// Member is the client for interacting with the Member builders.
	Member *MemberClient
	// Namespace is the client for interacting with the Namespace builders.
	Namespace *NamespaceClient
	// Project is the client for interacting with the Project builders.
	Project *ProjectClient
	// Repo is the client for interacting with the Repo builders.
	Repo *RepoClient
	// 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