ent

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: GPL-3.0 Imports: 29 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.
	TypeBlueprint        = "Blueprint"
	TypeDeployment       = "Deployment"
	TypeGroup            = "Group"
	TypePermission       = "Permission"
	TypePermissionPolicy = "PermissionPolicy"
	TypeProvider         = "Provider"
	TypeProviderCommand  = "ProviderCommand"
	TypeUser             = "User"
)

Variables

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Blueprint

type Blueprint struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// BlueprintTemplate holds the value of the "blueprint_template" field.
	BlueprintTemplate []byte `json:"blueprint_template,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BlueprintQuery when eager-loading is set.
	Edges BlueprintEdges `json:"edges"`
	// contains filtered or unexported fields
}

Blueprint is the model entity for the Blueprint schema.

func (*Blueprint) QueryDeployments

func (b *Blueprint) QueryDeployments() *DeploymentQuery

QueryDeployments queries the "deployments" edge of the Blueprint entity.

func (*Blueprint) QueryParentGroup

func (b *Blueprint) QueryParentGroup() *GroupQuery

QueryParentGroup queries the "parent_group" edge of the Blueprint entity.

func (*Blueprint) QueryProvider

func (b *Blueprint) QueryProvider() *ProviderQuery

QueryProvider queries the "provider" edge of the Blueprint entity.

func (*Blueprint) String

func (b *Blueprint) String() string

String implements the fmt.Stringer.

func (*Blueprint) Unwrap

func (b *Blueprint) Unwrap() *Blueprint

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

func (b *Blueprint) Update() *BlueprintUpdateOne

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

func (*Blueprint) Value

func (b *Blueprint) Value(name string) (ent.Value, error)

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

type BlueprintClient

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

BlueprintClient is a client for the Blueprint schema.

func NewBlueprintClient

func NewBlueprintClient(c config) *BlueprintClient

NewBlueprintClient returns a client for the Blueprint from the given config.

func (*BlueprintClient) Create

func (c *BlueprintClient) Create() *BlueprintCreate

Create returns a builder for creating a Blueprint entity.

func (*BlueprintClient) CreateBulk

func (c *BlueprintClient) CreateBulk(builders ...*BlueprintCreate) *BlueprintCreateBulk

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

func (*BlueprintClient) Delete

func (c *BlueprintClient) Delete() *BlueprintDelete

Delete returns a delete builder for Blueprint.

func (*BlueprintClient) DeleteOne

func (c *BlueprintClient) DeleteOne(b *Blueprint) *BlueprintDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BlueprintClient) DeleteOneID

func (c *BlueprintClient) DeleteOneID(id uuid.UUID) *BlueprintDeleteOne

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

func (*BlueprintClient) Get

func (c *BlueprintClient) Get(ctx context.Context, id uuid.UUID) (*Blueprint, error)

Get returns a Blueprint entity by its id.

func (*BlueprintClient) GetX

func (c *BlueprintClient) GetX(ctx context.Context, id uuid.UUID) *Blueprint

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

func (*BlueprintClient) Hooks

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

Hooks returns the client hooks.

func (*BlueprintClient) Intercept

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

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

func (*BlueprintClient) Interceptors

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

Interceptors returns the client interceptors.

func (*BlueprintClient) MapCreateBulk

func (c *BlueprintClient) MapCreateBulk(slice any, setFunc func(*BlueprintCreate, int)) *BlueprintCreateBulk

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

func (c *BlueprintClient) Query() *BlueprintQuery

Query returns a query builder for Blueprint.

func (*BlueprintClient) QueryDeployments

func (c *BlueprintClient) QueryDeployments(b *Blueprint) *DeploymentQuery

QueryDeployments queries the deployments edge of a Blueprint.

func (*BlueprintClient) QueryParentGroup

func (c *BlueprintClient) QueryParentGroup(b *Blueprint) *GroupQuery

QueryParentGroup queries the parent_group edge of a Blueprint.

func (*BlueprintClient) QueryProvider

func (c *BlueprintClient) QueryProvider(b *Blueprint) *ProviderQuery

QueryProvider queries the provider edge of a Blueprint.

func (*BlueprintClient) Update

func (c *BlueprintClient) Update() *BlueprintUpdate

Update returns an update builder for Blueprint.

func (*BlueprintClient) UpdateOne

func (c *BlueprintClient) UpdateOne(b *Blueprint) *BlueprintUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BlueprintClient) UpdateOneID

func (c *BlueprintClient) UpdateOneID(id uuid.UUID) *BlueprintUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BlueprintClient) Use

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

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

type BlueprintCreate

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

BlueprintCreate is the builder for creating a Blueprint entity.

func (*BlueprintCreate) AddDeploymentIDs

func (bc *BlueprintCreate) AddDeploymentIDs(ids ...uuid.UUID) *BlueprintCreate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*BlueprintCreate) AddDeployments

func (bc *BlueprintCreate) AddDeployments(d ...*Deployment) *BlueprintCreate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*BlueprintCreate) Exec

func (bc *BlueprintCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BlueprintCreate) ExecX

func (bc *BlueprintCreate) ExecX(ctx context.Context)

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

func (*BlueprintCreate) Mutation

func (bc *BlueprintCreate) Mutation() *BlueprintMutation

Mutation returns the BlueprintMutation object of the builder.

func (*BlueprintCreate) Save

func (bc *BlueprintCreate) Save(ctx context.Context) (*Blueprint, error)

Save creates the Blueprint in the database.

func (*BlueprintCreate) SaveX

func (bc *BlueprintCreate) SaveX(ctx context.Context) *Blueprint

SaveX calls Save and panics if Save returns an error.

func (*BlueprintCreate) SetBlueprintTemplate

func (bc *BlueprintCreate) SetBlueprintTemplate(b []byte) *BlueprintCreate

SetBlueprintTemplate sets the "blueprint_template" field.

func (*BlueprintCreate) SetCreatedAt

func (bc *BlueprintCreate) SetCreatedAt(t time.Time) *BlueprintCreate

SetCreatedAt sets the "created_at" field.

func (*BlueprintCreate) SetDescription

func (bc *BlueprintCreate) SetDescription(s string) *BlueprintCreate

SetDescription sets the "description" field.

func (*BlueprintCreate) SetID

func (bc *BlueprintCreate) SetID(u uuid.UUID) *BlueprintCreate

SetID sets the "id" field.

func (*BlueprintCreate) SetName

func (bc *BlueprintCreate) SetName(s string) *BlueprintCreate

SetName sets the "name" field.

func (*BlueprintCreate) SetNillableCreatedAt

func (bc *BlueprintCreate) SetNillableCreatedAt(t *time.Time) *BlueprintCreate

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

func (*BlueprintCreate) SetNillableID

func (bc *BlueprintCreate) SetNillableID(u *uuid.UUID) *BlueprintCreate

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

func (*BlueprintCreate) SetNillableUpdatedAt

func (bc *BlueprintCreate) SetNillableUpdatedAt(t *time.Time) *BlueprintCreate

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

func (*BlueprintCreate) SetParentGroup

func (bc *BlueprintCreate) SetParentGroup(g *Group) *BlueprintCreate

SetParentGroup sets the "parent_group" edge to the Group entity.

func (*BlueprintCreate) SetParentGroupID

func (bc *BlueprintCreate) SetParentGroupID(id uuid.UUID) *BlueprintCreate

SetParentGroupID sets the "parent_group" edge to the Group entity by ID.

func (*BlueprintCreate) SetProvider

func (bc *BlueprintCreate) SetProvider(p *Provider) *BlueprintCreate

SetProvider sets the "provider" edge to the Provider entity.

func (*BlueprintCreate) SetProviderID

func (bc *BlueprintCreate) SetProviderID(id uuid.UUID) *BlueprintCreate

SetProviderID sets the "provider" edge to the Provider entity by ID.

func (*BlueprintCreate) SetUpdatedAt

func (bc *BlueprintCreate) SetUpdatedAt(t time.Time) *BlueprintCreate

SetUpdatedAt sets the "updated_at" field.

type BlueprintCreateBulk

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

BlueprintCreateBulk is the builder for creating many Blueprint entities in bulk.

func (*BlueprintCreateBulk) Exec

func (bcb *BlueprintCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BlueprintCreateBulk) ExecX

func (bcb *BlueprintCreateBulk) ExecX(ctx context.Context)

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

func (*BlueprintCreateBulk) Save

func (bcb *BlueprintCreateBulk) Save(ctx context.Context) ([]*Blueprint, error)

Save creates the Blueprint entities in the database.

func (*BlueprintCreateBulk) SaveX

func (bcb *BlueprintCreateBulk) SaveX(ctx context.Context) []*Blueprint

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

type BlueprintDelete

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

BlueprintDelete is the builder for deleting a Blueprint entity.

func (*BlueprintDelete) Exec

func (bd *BlueprintDelete) Exec(ctx context.Context) (int, error)

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

func (*BlueprintDelete) ExecX

func (bd *BlueprintDelete) ExecX(ctx context.Context) int

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

func (*BlueprintDelete) Where

Where appends a list predicates to the BlueprintDelete builder.

type BlueprintDeleteOne

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

BlueprintDeleteOne is the builder for deleting a single Blueprint entity.

func (*BlueprintDeleteOne) Exec

func (bdo *BlueprintDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BlueprintDeleteOne) ExecX

func (bdo *BlueprintDeleteOne) ExecX(ctx context.Context)

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

func (*BlueprintDeleteOne) Where

Where appends a list predicates to the BlueprintDelete builder.

type BlueprintEdges

type BlueprintEdges struct {
	// ParentGroup holds the value of the parent_group edge.
	ParentGroup *Group `json:"parent_group,omitempty"`
	// Provider holds the value of the provider edge.
	Provider *Provider `json:"provider,omitempty"`
	// Deployments holds the value of the deployments edge.
	Deployments []*Deployment `json:"deployments,omitempty"`
	// contains filtered or unexported fields
}

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

func (BlueprintEdges) DeploymentsOrErr

func (e BlueprintEdges) DeploymentsOrErr() ([]*Deployment, error)

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

func (BlueprintEdges) ParentGroupOrErr

func (e BlueprintEdges) ParentGroupOrErr() (*Group, error)

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

func (BlueprintEdges) ProviderOrErr

func (e BlueprintEdges) ProviderOrErr() (*Provider, error)

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

type BlueprintGroupBy

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

BlueprintGroupBy is the group-by builder for Blueprint entities.

func (*BlueprintGroupBy) Aggregate

func (bgb *BlueprintGroupBy) Aggregate(fns ...AggregateFunc) *BlueprintGroupBy

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

func (*BlueprintGroupBy) Bool

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

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

func (*BlueprintGroupBy) BoolX

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

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

func (*BlueprintGroupBy) Bools

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

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

func (*BlueprintGroupBy) BoolsX

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

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

func (*BlueprintGroupBy) Float64

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

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

func (*BlueprintGroupBy) Float64X

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

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

func (*BlueprintGroupBy) Float64s

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

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

func (*BlueprintGroupBy) Float64sX

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

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

func (*BlueprintGroupBy) Int

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

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

func (*BlueprintGroupBy) IntX

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

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

func (*BlueprintGroupBy) Ints

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

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

func (*BlueprintGroupBy) IntsX

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

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

func (*BlueprintGroupBy) Scan

func (bgb *BlueprintGroupBy) Scan(ctx context.Context, v any) error

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

func (*BlueprintGroupBy) ScanX

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

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

func (*BlueprintGroupBy) String

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

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

func (*BlueprintGroupBy) StringX

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

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

func (*BlueprintGroupBy) Strings

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

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

func (*BlueprintGroupBy) StringsX

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

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

type BlueprintMutation

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

BlueprintMutation represents an operation that mutates the Blueprint nodes in the graph.

func (*BlueprintMutation) AddDeploymentIDs

func (m *BlueprintMutation) AddDeploymentIDs(ids ...uuid.UUID)

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by ids.

func (*BlueprintMutation) AddField

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

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

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

func (*BlueprintMutation) AddedField

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

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

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

func (*BlueprintMutation) AddedIDs

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

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

func (*BlueprintMutation) BlueprintTemplate

func (m *BlueprintMutation) BlueprintTemplate() (r []byte, exists bool)

BlueprintTemplate returns the value of the "blueprint_template" field in the mutation.

func (*BlueprintMutation) ClearDeployments

func (m *BlueprintMutation) ClearDeployments()

ClearDeployments clears the "deployments" edge to the Deployment entity.

func (*BlueprintMutation) ClearEdge

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

func (m *BlueprintMutation) 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 (*BlueprintMutation) ClearParentGroup

func (m *BlueprintMutation) ClearParentGroup()

ClearParentGroup clears the "parent_group" edge to the Group entity.

func (*BlueprintMutation) ClearProvider

func (m *BlueprintMutation) ClearProvider()

ClearProvider clears the "provider" edge to the Provider entity.

func (*BlueprintMutation) ClearedEdges

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

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

func (*BlueprintMutation) ClearedFields

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

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

func (BlueprintMutation) Client

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

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

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

func (*BlueprintMutation) DeploymentsCleared

func (m *BlueprintMutation) DeploymentsCleared() bool

DeploymentsCleared reports if the "deployments" edge to the Deployment entity was cleared.

func (*BlueprintMutation) DeploymentsIDs

func (m *BlueprintMutation) DeploymentsIDs() (ids []uuid.UUID)

DeploymentsIDs returns the "deployments" edge IDs in the mutation.

func (*BlueprintMutation) Description

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

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

func (*BlueprintMutation) EdgeCleared

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

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

func (*BlueprintMutation) Field

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

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

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

func (*BlueprintMutation) Fields

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

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

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

func (*BlueprintMutation) IDs

func (m *BlueprintMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*BlueprintMutation) Name

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

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

func (*BlueprintMutation) OldBlueprintTemplate

func (m *BlueprintMutation) OldBlueprintTemplate(ctx context.Context) (v []byte, err error)

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

func (*BlueprintMutation) OldCreatedAt

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

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

func (*BlueprintMutation) OldDescription

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

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

func (*BlueprintMutation) OldField

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

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

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

func (*BlueprintMutation) OldUpdatedAt

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

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

func (*BlueprintMutation) Op

func (m *BlueprintMutation) Op() Op

Op returns the operation name.

func (*BlueprintMutation) ParentGroupCleared

func (m *BlueprintMutation) ParentGroupCleared() bool

ParentGroupCleared reports if the "parent_group" edge to the Group entity was cleared.

func (*BlueprintMutation) ParentGroupID

func (m *BlueprintMutation) ParentGroupID() (id uuid.UUID, exists bool)

ParentGroupID returns the "parent_group" edge ID in the mutation.

func (*BlueprintMutation) ParentGroupIDs

func (m *BlueprintMutation) ParentGroupIDs() (ids []uuid.UUID)

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

func (*BlueprintMutation) ProviderCleared

func (m *BlueprintMutation) ProviderCleared() bool

ProviderCleared reports if the "provider" edge to the Provider entity was cleared.

func (*BlueprintMutation) ProviderID

func (m *BlueprintMutation) ProviderID() (id uuid.UUID, exists bool)

ProviderID returns the "provider" edge ID in the mutation.

func (*BlueprintMutation) ProviderIDs

func (m *BlueprintMutation) ProviderIDs() (ids []uuid.UUID)

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

func (*BlueprintMutation) RemoveDeploymentIDs

func (m *BlueprintMutation) RemoveDeploymentIDs(ids ...uuid.UUID)

RemoveDeploymentIDs removes the "deployments" edge to the Deployment entity by IDs.

func (*BlueprintMutation) RemovedDeploymentsIDs

func (m *BlueprintMutation) RemovedDeploymentsIDs() (ids []uuid.UUID)

RemovedDeployments returns the removed IDs of the "deployments" edge to the Deployment entity.

func (*BlueprintMutation) RemovedEdges

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

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

func (*BlueprintMutation) RemovedIDs

func (m *BlueprintMutation) 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 (*BlueprintMutation) ResetBlueprintTemplate

func (m *BlueprintMutation) ResetBlueprintTemplate()

ResetBlueprintTemplate resets all changes to the "blueprint_template" field.

func (*BlueprintMutation) ResetCreatedAt

func (m *BlueprintMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*BlueprintMutation) ResetDeployments

func (m *BlueprintMutation) ResetDeployments()

ResetDeployments resets all changes to the "deployments" edge.

func (*BlueprintMutation) ResetDescription

func (m *BlueprintMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*BlueprintMutation) ResetEdge

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

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

func (m *BlueprintMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*BlueprintMutation) ResetParentGroup

func (m *BlueprintMutation) ResetParentGroup()

ResetParentGroup resets all changes to the "parent_group" edge.

func (*BlueprintMutation) ResetProvider

func (m *BlueprintMutation) ResetProvider()

ResetProvider resets all changes to the "provider" edge.

func (*BlueprintMutation) ResetUpdatedAt

func (m *BlueprintMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*BlueprintMutation) SetBlueprintTemplate

func (m *BlueprintMutation) SetBlueprintTemplate(b []byte)

SetBlueprintTemplate sets the "blueprint_template" field.

func (*BlueprintMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*BlueprintMutation) SetDescription

func (m *BlueprintMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*BlueprintMutation) SetField

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

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

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

func (*BlueprintMutation) SetName

func (m *BlueprintMutation) SetName(s string)

SetName sets the "name" field.

func (*BlueprintMutation) SetOp

func (m *BlueprintMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BlueprintMutation) SetParentGroupID

func (m *BlueprintMutation) SetParentGroupID(id uuid.UUID)

SetParentGroupID sets the "parent_group" edge to the Group entity by id.

func (*BlueprintMutation) SetProviderID

func (m *BlueprintMutation) SetProviderID(id uuid.UUID)

SetProviderID sets the "provider" edge to the Provider entity by id.

func (*BlueprintMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (BlueprintMutation) Tx

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

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

func (*BlueprintMutation) Type

func (m *BlueprintMutation) Type() string

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

func (*BlueprintMutation) UpdatedAt

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

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

func (*BlueprintMutation) Where

func (m *BlueprintMutation) Where(ps ...predicate.Blueprint)

Where appends a list predicates to the BlueprintMutation builder.

func (*BlueprintMutation) WhereP

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

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

type BlueprintQuery

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

BlueprintQuery is the builder for querying Blueprint entities.

func (*BlueprintQuery) Aggregate

func (bq *BlueprintQuery) Aggregate(fns ...AggregateFunc) *BlueprintSelect

Aggregate returns a BlueprintSelect configured with the given aggregations.

func (*BlueprintQuery) All

func (bq *BlueprintQuery) All(ctx context.Context) ([]*Blueprint, error)

All executes the query and returns a list of Blueprints.

func (*BlueprintQuery) AllX

func (bq *BlueprintQuery) AllX(ctx context.Context) []*Blueprint

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

func (*BlueprintQuery) Clone

func (bq *BlueprintQuery) Clone() *BlueprintQuery

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

func (*BlueprintQuery) Count

func (bq *BlueprintQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BlueprintQuery) CountX

func (bq *BlueprintQuery) CountX(ctx context.Context) int

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

func (*BlueprintQuery) Exist

func (bq *BlueprintQuery) Exist(ctx context.Context) (bool, error)

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

func (*BlueprintQuery) ExistX

func (bq *BlueprintQuery) ExistX(ctx context.Context) bool

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

func (*BlueprintQuery) First

func (bq *BlueprintQuery) First(ctx context.Context) (*Blueprint, error)

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

func (*BlueprintQuery) FirstID

func (bq *BlueprintQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*BlueprintQuery) FirstIDX

func (bq *BlueprintQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*BlueprintQuery) FirstX

func (bq *BlueprintQuery) FirstX(ctx context.Context) *Blueprint

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

func (*BlueprintQuery) GroupBy

func (bq *BlueprintQuery) GroupBy(field string, fields ...string) *BlueprintGroupBy

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.Blueprint.Query().
	GroupBy(blueprint.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BlueprintQuery) IDs

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

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

func (*BlueprintQuery) IDsX

func (bq *BlueprintQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*BlueprintQuery) Limit

func (bq *BlueprintQuery) Limit(limit int) *BlueprintQuery

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

func (*BlueprintQuery) Offset

func (bq *BlueprintQuery) Offset(offset int) *BlueprintQuery

Offset to start from.

func (*BlueprintQuery) Only

func (bq *BlueprintQuery) Only(ctx context.Context) (*Blueprint, error)

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

func (*BlueprintQuery) OnlyID

func (bq *BlueprintQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*BlueprintQuery) OnlyIDX

func (bq *BlueprintQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*BlueprintQuery) OnlyX

func (bq *BlueprintQuery) OnlyX(ctx context.Context) *Blueprint

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

func (*BlueprintQuery) Order

Order specifies how the records should be ordered.

func (*BlueprintQuery) QueryDeployments

func (bq *BlueprintQuery) QueryDeployments() *DeploymentQuery

QueryDeployments chains the current query on the "deployments" edge.

func (*BlueprintQuery) QueryParentGroup

func (bq *BlueprintQuery) QueryParentGroup() *GroupQuery

QueryParentGroup chains the current query on the "parent_group" edge.

func (*BlueprintQuery) QueryProvider

func (bq *BlueprintQuery) QueryProvider() *ProviderQuery

QueryProvider chains the current query on the "provider" edge.

func (*BlueprintQuery) Select

func (bq *BlueprintQuery) Select(fields ...string) *BlueprintSelect

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.Blueprint.Query().
	Select(blueprint.FieldCreatedAt).
	Scan(ctx, &v)

func (*BlueprintQuery) Unique

func (bq *BlueprintQuery) Unique(unique bool) *BlueprintQuery

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

Where adds a new predicate for the BlueprintQuery builder.

func (*BlueprintQuery) WithDeployments

func (bq *BlueprintQuery) WithDeployments(opts ...func(*DeploymentQuery)) *BlueprintQuery

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

func (*BlueprintQuery) WithParentGroup

func (bq *BlueprintQuery) WithParentGroup(opts ...func(*GroupQuery)) *BlueprintQuery

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

func (*BlueprintQuery) WithProvider

func (bq *BlueprintQuery) WithProvider(opts ...func(*ProviderQuery)) *BlueprintQuery

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

type BlueprintSelect

type BlueprintSelect struct {
	*BlueprintQuery
	// contains filtered or unexported fields
}

BlueprintSelect is the builder for selecting fields of Blueprint entities.

func (*BlueprintSelect) Aggregate

func (bs *BlueprintSelect) Aggregate(fns ...AggregateFunc) *BlueprintSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BlueprintSelect) Bool

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

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

func (*BlueprintSelect) BoolX

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

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

func (*BlueprintSelect) Bools

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

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

func (*BlueprintSelect) BoolsX

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

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

func (*BlueprintSelect) Float64

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

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

func (*BlueprintSelect) Float64X

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

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

func (*BlueprintSelect) Float64s

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

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

func (*BlueprintSelect) Float64sX

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

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

func (*BlueprintSelect) Int

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

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

func (*BlueprintSelect) IntX

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

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

func (*BlueprintSelect) Ints

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

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

func (*BlueprintSelect) IntsX

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

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

func (*BlueprintSelect) Scan

func (bs *BlueprintSelect) Scan(ctx context.Context, v any) error

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

func (*BlueprintSelect) ScanX

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

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

func (*BlueprintSelect) String

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

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

func (*BlueprintSelect) StringX

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

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

func (*BlueprintSelect) Strings

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

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

func (*BlueprintSelect) StringsX

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

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

type BlueprintUpdate

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

BlueprintUpdate is the builder for updating Blueprint entities.

func (*BlueprintUpdate) AddDeploymentIDs

func (bu *BlueprintUpdate) AddDeploymentIDs(ids ...uuid.UUID) *BlueprintUpdate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*BlueprintUpdate) AddDeployments

func (bu *BlueprintUpdate) AddDeployments(d ...*Deployment) *BlueprintUpdate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*BlueprintUpdate) ClearDeployments

func (bu *BlueprintUpdate) ClearDeployments() *BlueprintUpdate

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*BlueprintUpdate) ClearParentGroup

func (bu *BlueprintUpdate) ClearParentGroup() *BlueprintUpdate

ClearParentGroup clears the "parent_group" edge to the Group entity.

func (*BlueprintUpdate) ClearProvider

func (bu *BlueprintUpdate) ClearProvider() *BlueprintUpdate

ClearProvider clears the "provider" edge to the Provider entity.

func (*BlueprintUpdate) Exec

func (bu *BlueprintUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BlueprintUpdate) ExecX

func (bu *BlueprintUpdate) ExecX(ctx context.Context)

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

func (*BlueprintUpdate) Mutation

func (bu *BlueprintUpdate) Mutation() *BlueprintMutation

Mutation returns the BlueprintMutation object of the builder.

func (*BlueprintUpdate) RemoveDeploymentIDs

func (bu *BlueprintUpdate) RemoveDeploymentIDs(ids ...uuid.UUID) *BlueprintUpdate

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*BlueprintUpdate) RemoveDeployments

func (bu *BlueprintUpdate) RemoveDeployments(d ...*Deployment) *BlueprintUpdate

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*BlueprintUpdate) Save

func (bu *BlueprintUpdate) Save(ctx context.Context) (int, error)

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

func (*BlueprintUpdate) SaveX

func (bu *BlueprintUpdate) SaveX(ctx context.Context) int

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

func (*BlueprintUpdate) SetBlueprintTemplate

func (bu *BlueprintUpdate) SetBlueprintTemplate(b []byte) *BlueprintUpdate

SetBlueprintTemplate sets the "blueprint_template" field.

func (*BlueprintUpdate) SetDescription

func (bu *BlueprintUpdate) SetDescription(s string) *BlueprintUpdate

SetDescription sets the "description" field.

func (*BlueprintUpdate) SetName

func (bu *BlueprintUpdate) SetName(s string) *BlueprintUpdate

SetName sets the "name" field.

func (*BlueprintUpdate) SetParentGroup

func (bu *BlueprintUpdate) SetParentGroup(g *Group) *BlueprintUpdate

SetParentGroup sets the "parent_group" edge to the Group entity.

func (*BlueprintUpdate) SetParentGroupID

func (bu *BlueprintUpdate) SetParentGroupID(id uuid.UUID) *BlueprintUpdate

SetParentGroupID sets the "parent_group" edge to the Group entity by ID.

func (*BlueprintUpdate) SetProvider

func (bu *BlueprintUpdate) SetProvider(p *Provider) *BlueprintUpdate

SetProvider sets the "provider" edge to the Provider entity.

func (*BlueprintUpdate) SetProviderID

func (bu *BlueprintUpdate) SetProviderID(id uuid.UUID) *BlueprintUpdate

SetProviderID sets the "provider" edge to the Provider entity by ID.

func (*BlueprintUpdate) SetUpdatedAt

func (bu *BlueprintUpdate) SetUpdatedAt(t time.Time) *BlueprintUpdate

SetUpdatedAt sets the "updated_at" field.

func (*BlueprintUpdate) Where

Where appends a list predicates to the BlueprintUpdate builder.

type BlueprintUpdateOne

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

BlueprintUpdateOne is the builder for updating a single Blueprint entity.

func (*BlueprintUpdateOne) AddDeploymentIDs

func (buo *BlueprintUpdateOne) AddDeploymentIDs(ids ...uuid.UUID) *BlueprintUpdateOne

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*BlueprintUpdateOne) AddDeployments

func (buo *BlueprintUpdateOne) AddDeployments(d ...*Deployment) *BlueprintUpdateOne

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*BlueprintUpdateOne) ClearDeployments

func (buo *BlueprintUpdateOne) ClearDeployments() *BlueprintUpdateOne

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*BlueprintUpdateOne) ClearParentGroup

func (buo *BlueprintUpdateOne) ClearParentGroup() *BlueprintUpdateOne

ClearParentGroup clears the "parent_group" edge to the Group entity.

func (*BlueprintUpdateOne) ClearProvider

func (buo *BlueprintUpdateOne) ClearProvider() *BlueprintUpdateOne

ClearProvider clears the "provider" edge to the Provider entity.

func (*BlueprintUpdateOne) Exec

func (buo *BlueprintUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BlueprintUpdateOne) ExecX

func (buo *BlueprintUpdateOne) ExecX(ctx context.Context)

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

func (*BlueprintUpdateOne) Mutation

func (buo *BlueprintUpdateOne) Mutation() *BlueprintMutation

Mutation returns the BlueprintMutation object of the builder.

func (*BlueprintUpdateOne) RemoveDeploymentIDs

func (buo *BlueprintUpdateOne) RemoveDeploymentIDs(ids ...uuid.UUID) *BlueprintUpdateOne

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*BlueprintUpdateOne) RemoveDeployments

func (buo *BlueprintUpdateOne) RemoveDeployments(d ...*Deployment) *BlueprintUpdateOne

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*BlueprintUpdateOne) Save

func (buo *BlueprintUpdateOne) Save(ctx context.Context) (*Blueprint, error)

Save executes the query and returns the updated Blueprint entity.

func (*BlueprintUpdateOne) SaveX

func (buo *BlueprintUpdateOne) SaveX(ctx context.Context) *Blueprint

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

func (*BlueprintUpdateOne) Select

func (buo *BlueprintUpdateOne) Select(field string, fields ...string) *BlueprintUpdateOne

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

func (*BlueprintUpdateOne) SetBlueprintTemplate

func (buo *BlueprintUpdateOne) SetBlueprintTemplate(b []byte) *BlueprintUpdateOne

SetBlueprintTemplate sets the "blueprint_template" field.

func (*BlueprintUpdateOne) SetDescription

func (buo *BlueprintUpdateOne) SetDescription(s string) *BlueprintUpdateOne

SetDescription sets the "description" field.

func (*BlueprintUpdateOne) SetName

func (buo *BlueprintUpdateOne) SetName(s string) *BlueprintUpdateOne

SetName sets the "name" field.

func (*BlueprintUpdateOne) SetParentGroup

func (buo *BlueprintUpdateOne) SetParentGroup(g *Group) *BlueprintUpdateOne

SetParentGroup sets the "parent_group" edge to the Group entity.

func (*BlueprintUpdateOne) SetParentGroupID

func (buo *BlueprintUpdateOne) SetParentGroupID(id uuid.UUID) *BlueprintUpdateOne

SetParentGroupID sets the "parent_group" edge to the Group entity by ID.

func (*BlueprintUpdateOne) SetProvider

func (buo *BlueprintUpdateOne) SetProvider(p *Provider) *BlueprintUpdateOne

SetProvider sets the "provider" edge to the Provider entity.

func (*BlueprintUpdateOne) SetProviderID

func (buo *BlueprintUpdateOne) SetProviderID(id uuid.UUID) *BlueprintUpdateOne

SetProviderID sets the "provider" edge to the Provider entity by ID.

func (*BlueprintUpdateOne) SetUpdatedAt

func (buo *BlueprintUpdateOne) SetUpdatedAt(t time.Time) *BlueprintUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*BlueprintUpdateOne) Where

Where appends a list predicates to the BlueprintUpdate builder.

type Blueprints

type Blueprints []*Blueprint

Blueprints is a parsable slice of Blueprint.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Blueprint is the client for interacting with the Blueprint builders.
	Blueprint *BlueprintClient
	// Deployment is the client for interacting with the Deployment builders.
	Deployment *DeploymentClient
	// Group is the client for interacting with the Group builders.
	Group *GroupClient
	// Permission is the client for interacting with the Permission builders.
	Permission *PermissionClient
	// PermissionPolicy is the client for interacting with the PermissionPolicy builders.
	PermissionPolicy *PermissionPolicyClient
	// Provider is the client for interacting with the Provider builders.
	Provider *ProviderClient
	// ProviderCommand is the client for interacting with the ProviderCommand builders.
	ProviderCommand *ProviderCommandClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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().
	Blueprint.
	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 Deployment

type Deployment struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// TemplateVars holds the value of the "template_vars" field.
	TemplateVars map[string]interface{} `json:"template_vars,omitempty"`
	// DeploymentVars holds the value of the "deployment_vars" field.
	DeploymentVars map[string]interface{} `json:"deployment_vars,omitempty"`
	// DeploymentState holds the value of the "deployment_state" field.
	DeploymentState map[string]string `json:"deployment_state,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeploymentQuery when eager-loading is set.
	Edges DeploymentEdges `json:"edges"`
	// contains filtered or unexported fields
}

Deployment is the model entity for the Deployment schema.

func (*Deployment) QueryBlueprint

func (d *Deployment) QueryBlueprint() *BlueprintQuery

QueryBlueprint queries the "blueprint" edge of the Deployment entity.

func (*Deployment) QueryRequester

func (d *Deployment) QueryRequester() *UserQuery

QueryRequester queries the "requester" edge of the Deployment entity.

func (*Deployment) String

func (d *Deployment) String() string

String implements the fmt.Stringer.

func (*Deployment) Unwrap

func (d *Deployment) Unwrap() *Deployment

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

func (d *Deployment) Update() *DeploymentUpdateOne

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

func (*Deployment) Value

func (d *Deployment) Value(name string) (ent.Value, error)

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

type DeploymentClient

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

DeploymentClient is a client for the Deployment schema.

func NewDeploymentClient

func NewDeploymentClient(c config) *DeploymentClient

NewDeploymentClient returns a client for the Deployment from the given config.

func (*DeploymentClient) Create

func (c *DeploymentClient) Create() *DeploymentCreate

Create returns a builder for creating a Deployment entity.

func (*DeploymentClient) CreateBulk

func (c *DeploymentClient) CreateBulk(builders ...*DeploymentCreate) *DeploymentCreateBulk

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

func (*DeploymentClient) Delete

func (c *DeploymentClient) Delete() *DeploymentDelete

Delete returns a delete builder for Deployment.

func (*DeploymentClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeploymentClient) DeleteOneID

func (c *DeploymentClient) DeleteOneID(id uuid.UUID) *DeploymentDeleteOne

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

func (*DeploymentClient) Get

Get returns a Deployment entity by its id.

func (*DeploymentClient) GetX

func (c *DeploymentClient) GetX(ctx context.Context, id uuid.UUID) *Deployment

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

func (*DeploymentClient) Hooks

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

Hooks returns the client hooks.

func (*DeploymentClient) Intercept

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

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

func (*DeploymentClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DeploymentClient) MapCreateBulk

func (c *DeploymentClient) MapCreateBulk(slice any, setFunc func(*DeploymentCreate, int)) *DeploymentCreateBulk

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

func (c *DeploymentClient) Query() *DeploymentQuery

Query returns a query builder for Deployment.

func (*DeploymentClient) QueryBlueprint

func (c *DeploymentClient) QueryBlueprint(d *Deployment) *BlueprintQuery

QueryBlueprint queries the blueprint edge of a Deployment.

func (*DeploymentClient) QueryRequester

func (c *DeploymentClient) QueryRequester(d *Deployment) *UserQuery

QueryRequester queries the requester edge of a Deployment.

func (*DeploymentClient) Update

func (c *DeploymentClient) Update() *DeploymentUpdate

Update returns an update builder for Deployment.

func (*DeploymentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeploymentClient) UpdateOneID

func (c *DeploymentClient) UpdateOneID(id uuid.UUID) *DeploymentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeploymentClient) Use

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

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

type DeploymentCreate

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

DeploymentCreate is the builder for creating a Deployment entity.

func (*DeploymentCreate) Exec

func (dc *DeploymentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentCreate) ExecX

func (dc *DeploymentCreate) ExecX(ctx context.Context)

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

func (*DeploymentCreate) Mutation

func (dc *DeploymentCreate) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentCreate) Save

func (dc *DeploymentCreate) Save(ctx context.Context) (*Deployment, error)

Save creates the Deployment in the database.

func (*DeploymentCreate) SaveX

func (dc *DeploymentCreate) SaveX(ctx context.Context) *Deployment

SaveX calls Save and panics if Save returns an error.

func (*DeploymentCreate) SetBlueprint

func (dc *DeploymentCreate) SetBlueprint(b *Blueprint) *DeploymentCreate

SetBlueprint sets the "blueprint" edge to the Blueprint entity.

func (*DeploymentCreate) SetBlueprintID

func (dc *DeploymentCreate) SetBlueprintID(id uuid.UUID) *DeploymentCreate

SetBlueprintID sets the "blueprint" edge to the Blueprint entity by ID.

func (*DeploymentCreate) SetCreatedAt

func (dc *DeploymentCreate) SetCreatedAt(t time.Time) *DeploymentCreate

SetCreatedAt sets the "created_at" field.

func (*DeploymentCreate) SetDeploymentState

func (dc *DeploymentCreate) SetDeploymentState(m map[string]string) *DeploymentCreate

SetDeploymentState sets the "deployment_state" field.

func (*DeploymentCreate) SetDeploymentVars

func (dc *DeploymentCreate) SetDeploymentVars(m map[string]interface{}) *DeploymentCreate

SetDeploymentVars sets the "deployment_vars" field.

func (*DeploymentCreate) SetDescription

func (dc *DeploymentCreate) SetDescription(s string) *DeploymentCreate

SetDescription sets the "description" field.

func (*DeploymentCreate) SetID

SetID sets the "id" field.

func (*DeploymentCreate) SetName

func (dc *DeploymentCreate) SetName(s string) *DeploymentCreate

SetName sets the "name" field.

func (*DeploymentCreate) SetNillableCreatedAt

func (dc *DeploymentCreate) SetNillableCreatedAt(t *time.Time) *DeploymentCreate

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

func (*DeploymentCreate) SetNillableDescription

func (dc *DeploymentCreate) SetNillableDescription(s *string) *DeploymentCreate

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

func (*DeploymentCreate) SetNillableID

func (dc *DeploymentCreate) SetNillableID(u *uuid.UUID) *DeploymentCreate

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

func (*DeploymentCreate) SetNillableUpdatedAt

func (dc *DeploymentCreate) SetNillableUpdatedAt(t *time.Time) *DeploymentCreate

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

func (*DeploymentCreate) SetRequester

func (dc *DeploymentCreate) SetRequester(u *User) *DeploymentCreate

SetRequester sets the "requester" edge to the User entity.

func (*DeploymentCreate) SetRequesterID

func (dc *DeploymentCreate) SetRequesterID(id uuid.UUID) *DeploymentCreate

SetRequesterID sets the "requester" edge to the User entity by ID.

func (*DeploymentCreate) SetTemplateVars

func (dc *DeploymentCreate) SetTemplateVars(m map[string]interface{}) *DeploymentCreate

SetTemplateVars sets the "template_vars" field.

func (*DeploymentCreate) SetUpdatedAt

func (dc *DeploymentCreate) SetUpdatedAt(t time.Time) *DeploymentCreate

SetUpdatedAt sets the "updated_at" field.

type DeploymentCreateBulk

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

DeploymentCreateBulk is the builder for creating many Deployment entities in bulk.

func (*DeploymentCreateBulk) Exec

func (dcb *DeploymentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentCreateBulk) ExecX

func (dcb *DeploymentCreateBulk) ExecX(ctx context.Context)

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

func (*DeploymentCreateBulk) Save

func (dcb *DeploymentCreateBulk) Save(ctx context.Context) ([]*Deployment, error)

Save creates the Deployment entities in the database.

func (*DeploymentCreateBulk) SaveX

func (dcb *DeploymentCreateBulk) SaveX(ctx context.Context) []*Deployment

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

type DeploymentDelete

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

DeploymentDelete is the builder for deleting a Deployment entity.

func (*DeploymentDelete) Exec

func (dd *DeploymentDelete) Exec(ctx context.Context) (int, error)

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

func (*DeploymentDelete) ExecX

func (dd *DeploymentDelete) ExecX(ctx context.Context) int

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

func (*DeploymentDelete) Where

Where appends a list predicates to the DeploymentDelete builder.

type DeploymentDeleteOne

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

DeploymentDeleteOne is the builder for deleting a single Deployment entity.

func (*DeploymentDeleteOne) Exec

func (ddo *DeploymentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeploymentDeleteOne) ExecX

func (ddo *DeploymentDeleteOne) ExecX(ctx context.Context)

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

func (*DeploymentDeleteOne) Where

Where appends a list predicates to the DeploymentDelete builder.

type DeploymentEdges

type DeploymentEdges struct {
	// Blueprint holds the value of the blueprint edge.
	Blueprint *Blueprint `json:"blueprint,omitempty"`
	// Requester holds the value of the requester edge.
	Requester *User `json:"requester,omitempty"`
	// contains filtered or unexported fields
}

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

func (DeploymentEdges) BlueprintOrErr

func (e DeploymentEdges) BlueprintOrErr() (*Blueprint, error)

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

func (DeploymentEdges) RequesterOrErr

func (e DeploymentEdges) RequesterOrErr() (*User, error)

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

type DeploymentGroupBy

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

DeploymentGroupBy is the group-by builder for Deployment entities.

func (*DeploymentGroupBy) Aggregate

func (dgb *DeploymentGroupBy) Aggregate(fns ...AggregateFunc) *DeploymentGroupBy

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

func (*DeploymentGroupBy) Bool

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

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

func (*DeploymentGroupBy) BoolX

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

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

func (*DeploymentGroupBy) Bools

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

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

func (*DeploymentGroupBy) BoolsX

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

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

func (*DeploymentGroupBy) Float64

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

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

func (*DeploymentGroupBy) Float64X

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

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

func (*DeploymentGroupBy) Float64s

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

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

func (*DeploymentGroupBy) Float64sX

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

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

func (*DeploymentGroupBy) Int

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

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

func (*DeploymentGroupBy) IntX

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

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

func (*DeploymentGroupBy) Ints

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

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

func (*DeploymentGroupBy) IntsX

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

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

func (*DeploymentGroupBy) Scan

func (dgb *DeploymentGroupBy) Scan(ctx context.Context, v any) error

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

func (*DeploymentGroupBy) ScanX

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

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

func (*DeploymentGroupBy) String

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

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

func (*DeploymentGroupBy) StringX

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

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

func (*DeploymentGroupBy) Strings

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

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

func (*DeploymentGroupBy) StringsX

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

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

type DeploymentMutation

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

DeploymentMutation represents an operation that mutates the Deployment nodes in the graph.

func (*DeploymentMutation) AddField

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

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

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

func (*DeploymentMutation) AddedField

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

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

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

func (*DeploymentMutation) AddedIDs

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

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

func (*DeploymentMutation) BlueprintCleared

func (m *DeploymentMutation) BlueprintCleared() bool

BlueprintCleared reports if the "blueprint" edge to the Blueprint entity was cleared.

func (*DeploymentMutation) BlueprintID

func (m *DeploymentMutation) BlueprintID() (id uuid.UUID, exists bool)

BlueprintID returns the "blueprint" edge ID in the mutation.

func (*DeploymentMutation) BlueprintIDs

func (m *DeploymentMutation) BlueprintIDs() (ids []uuid.UUID)

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

func (*DeploymentMutation) ClearBlueprint

func (m *DeploymentMutation) ClearBlueprint()

ClearBlueprint clears the "blueprint" edge to the Blueprint entity.

func (*DeploymentMutation) ClearDescription

func (m *DeploymentMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*DeploymentMutation) ClearEdge

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

func (m *DeploymentMutation) 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 (*DeploymentMutation) ClearRequester

func (m *DeploymentMutation) ClearRequester()

ClearRequester clears the "requester" edge to the User entity.

func (*DeploymentMutation) ClearedEdges

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

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

func (*DeploymentMutation) ClearedFields

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

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

func (DeploymentMutation) Client

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

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

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

func (*DeploymentMutation) DeploymentState

func (m *DeploymentMutation) DeploymentState() (r map[string]string, exists bool)

DeploymentState returns the value of the "deployment_state" field in the mutation.

func (*DeploymentMutation) DeploymentVars

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

DeploymentVars returns the value of the "deployment_vars" field in the mutation.

func (*DeploymentMutation) Description

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

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

func (*DeploymentMutation) DescriptionCleared

func (m *DeploymentMutation) DescriptionCleared() bool

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

func (*DeploymentMutation) EdgeCleared

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

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

func (*DeploymentMutation) Field

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

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

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

func (*DeploymentMutation) Fields

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

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

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

func (*DeploymentMutation) IDs

func (m *DeploymentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*DeploymentMutation) Name

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

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

func (*DeploymentMutation) OldCreatedAt

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

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

func (*DeploymentMutation) OldDeploymentState

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

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

func (*DeploymentMutation) OldDeploymentVars

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

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

func (*DeploymentMutation) OldDescription

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

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

func (*DeploymentMutation) OldField

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

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

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

func (*DeploymentMutation) OldTemplateVars

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

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

func (*DeploymentMutation) OldUpdatedAt

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

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

func (*DeploymentMutation) Op

func (m *DeploymentMutation) Op() Op

Op returns the operation name.

func (*DeploymentMutation) RemovedEdges

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

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

func (*DeploymentMutation) RemovedIDs

func (m *DeploymentMutation) 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 (*DeploymentMutation) RequesterCleared

func (m *DeploymentMutation) RequesterCleared() bool

RequesterCleared reports if the "requester" edge to the User entity was cleared.

func (*DeploymentMutation) RequesterID

func (m *DeploymentMutation) RequesterID() (id uuid.UUID, exists bool)

RequesterID returns the "requester" edge ID in the mutation.

func (*DeploymentMutation) RequesterIDs

func (m *DeploymentMutation) RequesterIDs() (ids []uuid.UUID)

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

func (*DeploymentMutation) ResetBlueprint

func (m *DeploymentMutation) ResetBlueprint()

ResetBlueprint resets all changes to the "blueprint" edge.

func (*DeploymentMutation) ResetCreatedAt

func (m *DeploymentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeploymentMutation) ResetDeploymentState

func (m *DeploymentMutation) ResetDeploymentState()

ResetDeploymentState resets all changes to the "deployment_state" field.

func (*DeploymentMutation) ResetDeploymentVars

func (m *DeploymentMutation) ResetDeploymentVars()

ResetDeploymentVars resets all changes to the "deployment_vars" field.

func (*DeploymentMutation) ResetDescription

func (m *DeploymentMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*DeploymentMutation) ResetEdge

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

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

func (m *DeploymentMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DeploymentMutation) ResetRequester

func (m *DeploymentMutation) ResetRequester()

ResetRequester resets all changes to the "requester" edge.

func (*DeploymentMutation) ResetTemplateVars

func (m *DeploymentMutation) ResetTemplateVars()

ResetTemplateVars resets all changes to the "template_vars" field.

func (*DeploymentMutation) ResetUpdatedAt

func (m *DeploymentMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeploymentMutation) SetBlueprintID

func (m *DeploymentMutation) SetBlueprintID(id uuid.UUID)

SetBlueprintID sets the "blueprint" edge to the Blueprint entity by id.

func (*DeploymentMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*DeploymentMutation) SetDeploymentState

func (m *DeploymentMutation) SetDeploymentState(value map[string]string)

SetDeploymentState sets the "deployment_state" field.

func (*DeploymentMutation) SetDeploymentVars

func (m *DeploymentMutation) SetDeploymentVars(value map[string]interface{})

SetDeploymentVars sets the "deployment_vars" field.

func (*DeploymentMutation) SetDescription

func (m *DeploymentMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*DeploymentMutation) SetField

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

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

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

func (*DeploymentMutation) SetName

func (m *DeploymentMutation) SetName(s string)

SetName sets the "name" field.

func (*DeploymentMutation) SetOp

func (m *DeploymentMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeploymentMutation) SetRequesterID

func (m *DeploymentMutation) SetRequesterID(id uuid.UUID)

SetRequesterID sets the "requester" edge to the User entity by id.

func (*DeploymentMutation) SetTemplateVars

func (m *DeploymentMutation) SetTemplateVars(value map[string]interface{})

SetTemplateVars sets the "template_vars" field.

func (*DeploymentMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentMutation) TemplateVars

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

TemplateVars returns the value of the "template_vars" field in the mutation.

func (DeploymentMutation) Tx

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

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

func (*DeploymentMutation) Type

func (m *DeploymentMutation) Type() string

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

func (*DeploymentMutation) UpdatedAt

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

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

func (*DeploymentMutation) Where

func (m *DeploymentMutation) Where(ps ...predicate.Deployment)

Where appends a list predicates to the DeploymentMutation builder.

func (*DeploymentMutation) WhereP

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

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

type DeploymentQuery

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

DeploymentQuery is the builder for querying Deployment entities.

func (*DeploymentQuery) Aggregate

func (dq *DeploymentQuery) Aggregate(fns ...AggregateFunc) *DeploymentSelect

Aggregate returns a DeploymentSelect configured with the given aggregations.

func (*DeploymentQuery) All

func (dq *DeploymentQuery) All(ctx context.Context) ([]*Deployment, error)

All executes the query and returns a list of Deployments.

func (*DeploymentQuery) AllX

func (dq *DeploymentQuery) AllX(ctx context.Context) []*Deployment

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

func (*DeploymentQuery) Clone

func (dq *DeploymentQuery) Clone() *DeploymentQuery

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

func (*DeploymentQuery) Count

func (dq *DeploymentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeploymentQuery) CountX

func (dq *DeploymentQuery) CountX(ctx context.Context) int

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

func (*DeploymentQuery) Exist

func (dq *DeploymentQuery) Exist(ctx context.Context) (bool, error)

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

func (*DeploymentQuery) ExistX

func (dq *DeploymentQuery) ExistX(ctx context.Context) bool

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

func (*DeploymentQuery) First

func (dq *DeploymentQuery) First(ctx context.Context) (*Deployment, error)

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

func (*DeploymentQuery) FirstID

func (dq *DeploymentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*DeploymentQuery) FirstIDX

func (dq *DeploymentQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*DeploymentQuery) FirstX

func (dq *DeploymentQuery) FirstX(ctx context.Context) *Deployment

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

func (*DeploymentQuery) GroupBy

func (dq *DeploymentQuery) GroupBy(field string, fields ...string) *DeploymentGroupBy

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.Deployment.Query().
	GroupBy(deployment.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeploymentQuery) IDs

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

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

func (*DeploymentQuery) IDsX

func (dq *DeploymentQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*DeploymentQuery) Limit

func (dq *DeploymentQuery) Limit(limit int) *DeploymentQuery

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

func (*DeploymentQuery) Offset

func (dq *DeploymentQuery) Offset(offset int) *DeploymentQuery

Offset to start from.

func (*DeploymentQuery) Only

func (dq *DeploymentQuery) Only(ctx context.Context) (*Deployment, error)

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

func (*DeploymentQuery) OnlyID

func (dq *DeploymentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*DeploymentQuery) OnlyIDX

func (dq *DeploymentQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*DeploymentQuery) OnlyX

func (dq *DeploymentQuery) OnlyX(ctx context.Context) *Deployment

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

func (*DeploymentQuery) Order

Order specifies how the records should be ordered.

func (*DeploymentQuery) QueryBlueprint

func (dq *DeploymentQuery) QueryBlueprint() *BlueprintQuery

QueryBlueprint chains the current query on the "blueprint" edge.

func (*DeploymentQuery) QueryRequester

func (dq *DeploymentQuery) QueryRequester() *UserQuery

QueryRequester chains the current query on the "requester" edge.

func (*DeploymentQuery) Select

func (dq *DeploymentQuery) Select(fields ...string) *DeploymentSelect

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.Deployment.Query().
	Select(deployment.FieldCreatedAt).
	Scan(ctx, &v)

func (*DeploymentQuery) Unique

func (dq *DeploymentQuery) Unique(unique bool) *DeploymentQuery

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

Where adds a new predicate for the DeploymentQuery builder.

func (*DeploymentQuery) WithBlueprint

func (dq *DeploymentQuery) WithBlueprint(opts ...func(*BlueprintQuery)) *DeploymentQuery

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

func (*DeploymentQuery) WithRequester

func (dq *DeploymentQuery) WithRequester(opts ...func(*UserQuery)) *DeploymentQuery

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

type DeploymentSelect

type DeploymentSelect struct {
	*DeploymentQuery
	// contains filtered or unexported fields
}

DeploymentSelect is the builder for selecting fields of Deployment entities.

func (*DeploymentSelect) Aggregate

func (ds *DeploymentSelect) Aggregate(fns ...AggregateFunc) *DeploymentSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeploymentSelect) Bool

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

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

func (*DeploymentSelect) BoolX

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

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

func (*DeploymentSelect) Bools

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

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

func (*DeploymentSelect) BoolsX

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

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

func (*DeploymentSelect) Float64

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

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

func (*DeploymentSelect) Float64X

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

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

func (*DeploymentSelect) Float64s

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

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

func (*DeploymentSelect) Float64sX

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

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

func (*DeploymentSelect) Int

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

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

func (*DeploymentSelect) IntX

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

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

func (*DeploymentSelect) Ints

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

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

func (*DeploymentSelect) IntsX

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

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

func (*DeploymentSelect) Scan

func (ds *DeploymentSelect) Scan(ctx context.Context, v any) error

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

func (*DeploymentSelect) ScanX

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

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

func (*DeploymentSelect) String

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

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

func (*DeploymentSelect) StringX

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

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

func (*DeploymentSelect) Strings

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

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

func (*DeploymentSelect) StringsX

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

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

type DeploymentUpdate

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

DeploymentUpdate is the builder for updating Deployment entities.

func (*DeploymentUpdate) ClearBlueprint

func (du *DeploymentUpdate) ClearBlueprint() *DeploymentUpdate

ClearBlueprint clears the "blueprint" edge to the Blueprint entity.

func (*DeploymentUpdate) ClearDescription

func (du *DeploymentUpdate) ClearDescription() *DeploymentUpdate

ClearDescription clears the value of the "description" field.

func (*DeploymentUpdate) ClearRequester

func (du *DeploymentUpdate) ClearRequester() *DeploymentUpdate

ClearRequester clears the "requester" edge to the User entity.

func (*DeploymentUpdate) Exec

func (du *DeploymentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentUpdate) ExecX

func (du *DeploymentUpdate) ExecX(ctx context.Context)

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

func (*DeploymentUpdate) Mutation

func (du *DeploymentUpdate) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentUpdate) Save

func (du *DeploymentUpdate) Save(ctx context.Context) (int, error)

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

func (*DeploymentUpdate) SaveX

func (du *DeploymentUpdate) SaveX(ctx context.Context) int

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

func (*DeploymentUpdate) SetBlueprint

func (du *DeploymentUpdate) SetBlueprint(b *Blueprint) *DeploymentUpdate

SetBlueprint sets the "blueprint" edge to the Blueprint entity.

func (*DeploymentUpdate) SetBlueprintID

func (du *DeploymentUpdate) SetBlueprintID(id uuid.UUID) *DeploymentUpdate

SetBlueprintID sets the "blueprint" edge to the Blueprint entity by ID.

func (*DeploymentUpdate) SetDeploymentState

func (du *DeploymentUpdate) SetDeploymentState(m map[string]string) *DeploymentUpdate

SetDeploymentState sets the "deployment_state" field.

func (*DeploymentUpdate) SetDeploymentVars

func (du *DeploymentUpdate) SetDeploymentVars(m map[string]interface{}) *DeploymentUpdate

SetDeploymentVars sets the "deployment_vars" field.

func (*DeploymentUpdate) SetDescription

func (du *DeploymentUpdate) SetDescription(s string) *DeploymentUpdate

SetDescription sets the "description" field.

func (*DeploymentUpdate) SetName

func (du *DeploymentUpdate) SetName(s string) *DeploymentUpdate

SetName sets the "name" field.

func (*DeploymentUpdate) SetNillableDescription

func (du *DeploymentUpdate) SetNillableDescription(s *string) *DeploymentUpdate

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

func (*DeploymentUpdate) SetRequester

func (du *DeploymentUpdate) SetRequester(u *User) *DeploymentUpdate

SetRequester sets the "requester" edge to the User entity.

func (*DeploymentUpdate) SetRequesterID

func (du *DeploymentUpdate) SetRequesterID(id uuid.UUID) *DeploymentUpdate

SetRequesterID sets the "requester" edge to the User entity by ID.

func (*DeploymentUpdate) SetTemplateVars

func (du *DeploymentUpdate) SetTemplateVars(m map[string]interface{}) *DeploymentUpdate

SetTemplateVars sets the "template_vars" field.

func (*DeploymentUpdate) SetUpdatedAt

func (du *DeploymentUpdate) SetUpdatedAt(t time.Time) *DeploymentUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpdate) Where

Where appends a list predicates to the DeploymentUpdate builder.

type DeploymentUpdateOne

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

DeploymentUpdateOne is the builder for updating a single Deployment entity.

func (*DeploymentUpdateOne) ClearBlueprint

func (duo *DeploymentUpdateOne) ClearBlueprint() *DeploymentUpdateOne

ClearBlueprint clears the "blueprint" edge to the Blueprint entity.

func (*DeploymentUpdateOne) ClearDescription

func (duo *DeploymentUpdateOne) ClearDescription() *DeploymentUpdateOne

ClearDescription clears the value of the "description" field.

func (*DeploymentUpdateOne) ClearRequester

func (duo *DeploymentUpdateOne) ClearRequester() *DeploymentUpdateOne

ClearRequester clears the "requester" edge to the User entity.

func (*DeploymentUpdateOne) Exec

func (duo *DeploymentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeploymentUpdateOne) ExecX

func (duo *DeploymentUpdateOne) ExecX(ctx context.Context)

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

func (*DeploymentUpdateOne) Mutation

func (duo *DeploymentUpdateOne) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentUpdateOne) Save

func (duo *DeploymentUpdateOne) Save(ctx context.Context) (*Deployment, error)

Save executes the query and returns the updated Deployment entity.

func (*DeploymentUpdateOne) SaveX

func (duo *DeploymentUpdateOne) SaveX(ctx context.Context) *Deployment

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

func (*DeploymentUpdateOne) Select

func (duo *DeploymentUpdateOne) Select(field string, fields ...string) *DeploymentUpdateOne

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

func (*DeploymentUpdateOne) SetBlueprint

func (duo *DeploymentUpdateOne) SetBlueprint(b *Blueprint) *DeploymentUpdateOne

SetBlueprint sets the "blueprint" edge to the Blueprint entity.

func (*DeploymentUpdateOne) SetBlueprintID

func (duo *DeploymentUpdateOne) SetBlueprintID(id uuid.UUID) *DeploymentUpdateOne

SetBlueprintID sets the "blueprint" edge to the Blueprint entity by ID.

func (*DeploymentUpdateOne) SetDeploymentState

func (duo *DeploymentUpdateOne) SetDeploymentState(m map[string]string) *DeploymentUpdateOne

SetDeploymentState sets the "deployment_state" field.

func (*DeploymentUpdateOne) SetDeploymentVars

func (duo *DeploymentUpdateOne) SetDeploymentVars(m map[string]interface{}) *DeploymentUpdateOne

SetDeploymentVars sets the "deployment_vars" field.

func (*DeploymentUpdateOne) SetDescription

func (duo *DeploymentUpdateOne) SetDescription(s string) *DeploymentUpdateOne

SetDescription sets the "description" field.

func (*DeploymentUpdateOne) SetName

SetName sets the "name" field.

func (*DeploymentUpdateOne) SetNillableDescription

func (duo *DeploymentUpdateOne) SetNillableDescription(s *string) *DeploymentUpdateOne

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

func (*DeploymentUpdateOne) SetRequester

func (duo *DeploymentUpdateOne) SetRequester(u *User) *DeploymentUpdateOne

SetRequester sets the "requester" edge to the User entity.

func (*DeploymentUpdateOne) SetRequesterID

func (duo *DeploymentUpdateOne) SetRequesterID(id uuid.UUID) *DeploymentUpdateOne

SetRequesterID sets the "requester" edge to the User entity by ID.

func (*DeploymentUpdateOne) SetTemplateVars

func (duo *DeploymentUpdateOne) SetTemplateVars(m map[string]interface{}) *DeploymentUpdateOne

SetTemplateVars sets the "template_vars" field.

func (*DeploymentUpdateOne) SetUpdatedAt

func (duo *DeploymentUpdateOne) SetUpdatedAt(t time.Time) *DeploymentUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpdateOne) Where

Where appends a list predicates to the DeploymentUpdate builder.

type Deployments

type Deployments []*Deployment

Deployments is a parsable slice of Deployment.

type Group

type Group struct {

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

Group is the model entity for the Group schema.

func (*Group) QueryBlueprints

func (gr *Group) QueryBlueprints() *BlueprintQuery

QueryBlueprints queries the "blueprints" edge of the Group entity.

func (*Group) QueryChildren

func (gr *Group) QueryChildren() *GroupQuery

QueryChildren queries the "children" edge of the Group entity.

func (*Group) QueryParent

func (gr *Group) QueryParent() *GroupQuery

QueryParent queries the "parent" edge of the Group entity.

func (*Group) QueryPermissionPolicies

func (gr *Group) QueryPermissionPolicies() *PermissionPolicyQuery

QueryPermissionPolicies queries the "permission_policies" edge of the Group entity.

func (*Group) QueryUsers

func (gr *Group) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Group entity.

func (*Group) String

func (gr *Group) String() string

String implements the fmt.Stringer.

func (*Group) Unwrap

func (gr *Group) Unwrap() *Group

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

func (gr *Group) Update() *GroupUpdateOne

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

func (*Group) Value

func (gr *Group) Value(name string) (ent.Value, error)

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

type GroupClient

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

GroupClient is a client for the Group schema.

func NewGroupClient

func NewGroupClient(c config) *GroupClient

NewGroupClient returns a client for the Group from the given config.

func (*GroupClient) Create

func (c *GroupClient) Create() *GroupCreate

Create returns a builder for creating a Group entity.

func (*GroupClient) CreateBulk

func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk

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

func (*GroupClient) Delete

func (c *GroupClient) Delete() *GroupDelete

Delete returns a delete builder for Group.

func (*GroupClient) DeleteOne

func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GroupClient) DeleteOneID

func (c *GroupClient) DeleteOneID(id uuid.UUID) *GroupDeleteOne

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

func (*GroupClient) Get

func (c *GroupClient) Get(ctx context.Context, id uuid.UUID) (*Group, error)

Get returns a Group entity by its id.

func (*GroupClient) GetX

func (c *GroupClient) GetX(ctx context.Context, id uuid.UUID) *Group

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

func (*GroupClient) Hooks

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

Hooks returns the client hooks.

func (*GroupClient) Intercept

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

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

func (*GroupClient) Interceptors

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

Interceptors returns the client interceptors.

func (*GroupClient) MapCreateBulk

func (c *GroupClient) MapCreateBulk(slice any, setFunc func(*GroupCreate, int)) *GroupCreateBulk

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

func (c *GroupClient) Query() *GroupQuery

Query returns a query builder for Group.

func (*GroupClient) QueryBlueprints

func (c *GroupClient) QueryBlueprints(gr *Group) *BlueprintQuery

QueryBlueprints queries the blueprints edge of a Group.

func (*GroupClient) QueryChildren

func (c *GroupClient) QueryChildren(gr *Group) *GroupQuery

QueryChildren queries the children edge of a Group.

func (*GroupClient) QueryParent

func (c *GroupClient) QueryParent(gr *Group) *GroupQuery

QueryParent queries the parent edge of a Group.

func (*GroupClient) QueryPermissionPolicies

func (c *GroupClient) QueryPermissionPolicies(gr *Group) *PermissionPolicyQuery

QueryPermissionPolicies queries the permission_policies edge of a Group.

func (*GroupClient) QueryUsers

func (c *GroupClient) QueryUsers(gr *Group) *UserQuery

QueryUsers queries the users edge of a Group.

func (*GroupClient) Update

func (c *GroupClient) Update() *GroupUpdate

Update returns an update builder for Group.

func (*GroupClient) UpdateOne

func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GroupClient) UpdateOneID

func (c *GroupClient) UpdateOneID(id uuid.UUID) *GroupUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GroupClient) Use

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

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

type GroupCreate

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

GroupCreate is the builder for creating a Group entity.

func (*GroupCreate) AddBlueprintIDs

func (gc *GroupCreate) AddBlueprintIDs(ids ...uuid.UUID) *GroupCreate

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by IDs.

func (*GroupCreate) AddBlueprints

func (gc *GroupCreate) AddBlueprints(b ...*Blueprint) *GroupCreate

AddBlueprints adds the "blueprints" edges to the Blueprint entity.

func (*GroupCreate) AddChildIDs

func (gc *GroupCreate) AddChildIDs(ids ...uuid.UUID) *GroupCreate

AddChildIDs adds the "children" edge to the Group entity by IDs.

func (*GroupCreate) AddChildren

func (gc *GroupCreate) AddChildren(g ...*Group) *GroupCreate

AddChildren adds the "children" edges to the Group entity.

func (*GroupCreate) AddPermissionPolicies

func (gc *GroupCreate) AddPermissionPolicies(p ...*PermissionPolicy) *GroupCreate

AddPermissionPolicies adds the "permission_policies" edges to the PermissionPolicy entity.

func (*GroupCreate) AddPermissionPolicyIDs

func (gc *GroupCreate) AddPermissionPolicyIDs(ids ...uuid.UUID) *GroupCreate

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*GroupCreate) AddUserIDs

func (gc *GroupCreate) AddUserIDs(ids ...uuid.UUID) *GroupCreate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*GroupCreate) AddUsers

func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate

AddUsers adds the "users" edges to the User entity.

func (*GroupCreate) Exec

func (gc *GroupCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupCreate) ExecX

func (gc *GroupCreate) ExecX(ctx context.Context)

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

func (*GroupCreate) Mutation

func (gc *GroupCreate) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupCreate) Save

func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)

Save creates the Group in the database.

func (*GroupCreate) SaveX

func (gc *GroupCreate) SaveX(ctx context.Context) *Group

SaveX calls Save and panics if Save returns an error.

func (*GroupCreate) SetCreatedAt

func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate

SetCreatedAt sets the "created_at" field.

func (*GroupCreate) SetID

func (gc *GroupCreate) SetID(u uuid.UUID) *GroupCreate

SetID sets the "id" field.

func (*GroupCreate) SetName

func (gc *GroupCreate) SetName(s string) *GroupCreate

SetName sets the "name" field.

func (*GroupCreate) SetNillableCreatedAt

func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate

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

func (*GroupCreate) SetNillableID

func (gc *GroupCreate) SetNillableID(u *uuid.UUID) *GroupCreate

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

func (*GroupCreate) SetNillableParentID

func (gc *GroupCreate) SetNillableParentID(id *uuid.UUID) *GroupCreate

SetNillableParentID sets the "parent" edge to the Group entity by ID if the given value is not nil.

func (*GroupCreate) SetNillableUpdatedAt

func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate

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

func (*GroupCreate) SetParent

func (gc *GroupCreate) SetParent(g *Group) *GroupCreate

SetParent sets the "parent" edge to the Group entity.

func (*GroupCreate) SetParentID

func (gc *GroupCreate) SetParentID(id uuid.UUID) *GroupCreate

SetParentID sets the "parent" edge to the Group entity by ID.

func (*GroupCreate) SetUpdatedAt

func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate

SetUpdatedAt sets the "updated_at" field.

type GroupCreateBulk

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

GroupCreateBulk is the builder for creating many Group entities in bulk.

func (*GroupCreateBulk) Exec

func (gcb *GroupCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupCreateBulk) ExecX

func (gcb *GroupCreateBulk) ExecX(ctx context.Context)

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

func (*GroupCreateBulk) Save

func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error)

Save creates the Group entities in the database.

func (*GroupCreateBulk) SaveX

func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group

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

type GroupDelete

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

GroupDelete is the builder for deleting a Group entity.

func (*GroupDelete) Exec

func (gd *GroupDelete) Exec(ctx context.Context) (int, error)

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

func (*GroupDelete) ExecX

func (gd *GroupDelete) ExecX(ctx context.Context) int

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

func (*GroupDelete) Where

func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete

Where appends a list predicates to the GroupDelete builder.

type GroupDeleteOne

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

GroupDeleteOne is the builder for deleting a single Group entity.

func (*GroupDeleteOne) Exec

func (gdo *GroupDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GroupDeleteOne) ExecX

func (gdo *GroupDeleteOne) ExecX(ctx context.Context)

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

func (*GroupDeleteOne) Where

func (gdo *GroupDeleteOne) Where(ps ...predicate.Group) *GroupDeleteOne

Where appends a list predicates to the GroupDelete builder.

type GroupEdges

type GroupEdges struct {
	// Parent holds the value of the parent edge.
	Parent *Group `json:"parent,omitempty"`
	// Children holds the value of the children edge.
	Children []*Group `json:"children,omitempty"`
	// Users holds the value of the users edge.
	Users []*User `json:"users,omitempty"`
	// PermissionPolicies holds the value of the permission_policies edge.
	PermissionPolicies []*PermissionPolicy `json:"permission_policies,omitempty"`
	// Blueprints holds the value of the blueprints edge.
	Blueprints []*Blueprint `json:"blueprints,omitempty"`
	// contains filtered or unexported fields
}

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

func (GroupEdges) BlueprintsOrErr

func (e GroupEdges) BlueprintsOrErr() ([]*Blueprint, error)

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

func (GroupEdges) ChildrenOrErr

func (e GroupEdges) ChildrenOrErr() ([]*Group, error)

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

func (GroupEdges) ParentOrErr

func (e GroupEdges) ParentOrErr() (*Group, error)

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

func (GroupEdges) PermissionPoliciesOrErr

func (e GroupEdges) PermissionPoliciesOrErr() ([]*PermissionPolicy, error)

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

func (GroupEdges) UsersOrErr

func (e GroupEdges) UsersOrErr() ([]*User, error)

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

type GroupGroupBy

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

GroupGroupBy is the group-by builder for Group entities.

func (*GroupGroupBy) Aggregate

func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy

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

func (*GroupGroupBy) Bool

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

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

func (*GroupGroupBy) BoolX

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

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

func (*GroupGroupBy) Bools

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

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

func (*GroupGroupBy) BoolsX

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

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

func (*GroupGroupBy) Float64

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

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

func (*GroupGroupBy) Float64X

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

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

func (*GroupGroupBy) Float64s

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

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

func (*GroupGroupBy) Float64sX

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

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

func (*GroupGroupBy) Int

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

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

func (*GroupGroupBy) IntX

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

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

func (*GroupGroupBy) Ints

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

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

func (*GroupGroupBy) IntsX

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

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

func (*GroupGroupBy) Scan

func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error

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

func (*GroupGroupBy) ScanX

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

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

func (*GroupGroupBy) String

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

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

func (*GroupGroupBy) StringX

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

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

func (*GroupGroupBy) Strings

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

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

func (*GroupGroupBy) StringsX

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

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

type GroupMutation

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

GroupMutation represents an operation that mutates the Group nodes in the graph.

func (*GroupMutation) AddBlueprintIDs

func (m *GroupMutation) AddBlueprintIDs(ids ...uuid.UUID)

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by ids.

func (*GroupMutation) AddChildIDs

func (m *GroupMutation) AddChildIDs(ids ...uuid.UUID)

AddChildIDs adds the "children" edge to the Group entity by ids.

func (*GroupMutation) AddField

func (m *GroupMutation) 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 (*GroupMutation) AddPermissionPolicyIDs

func (m *GroupMutation) AddPermissionPolicyIDs(ids ...uuid.UUID)

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by ids.

func (*GroupMutation) AddUserIDs

func (m *GroupMutation) AddUserIDs(ids ...uuid.UUID)

AddUserIDs adds the "users" edge to the User entity by ids.

func (*GroupMutation) AddedEdges

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

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

func (*GroupMutation) AddedField

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

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

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

func (*GroupMutation) AddedIDs

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

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

func (*GroupMutation) BlueprintsCleared

func (m *GroupMutation) BlueprintsCleared() bool

BlueprintsCleared reports if the "blueprints" edge to the Blueprint entity was cleared.

func (*GroupMutation) BlueprintsIDs

func (m *GroupMutation) BlueprintsIDs() (ids []uuid.UUID)

BlueprintsIDs returns the "blueprints" edge IDs in the mutation.

func (*GroupMutation) ChildrenCleared

func (m *GroupMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the Group entity was cleared.

func (*GroupMutation) ChildrenIDs

func (m *GroupMutation) ChildrenIDs() (ids []uuid.UUID)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*GroupMutation) ClearBlueprints

func (m *GroupMutation) ClearBlueprints()

ClearBlueprints clears the "blueprints" edge to the Blueprint entity.

func (*GroupMutation) ClearChildren

func (m *GroupMutation) ClearChildren()

ClearChildren clears the "children" edge to the Group entity.

func (*GroupMutation) ClearEdge

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

func (m *GroupMutation) 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 (*GroupMutation) ClearParent

func (m *GroupMutation) ClearParent()

ClearParent clears the "parent" edge to the Group entity.

func (*GroupMutation) ClearPermissionPolicies

func (m *GroupMutation) ClearPermissionPolicies()

ClearPermissionPolicies clears the "permission_policies" edge to the PermissionPolicy entity.

func (*GroupMutation) ClearUsers

func (m *GroupMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*GroupMutation) ClearedEdges

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

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

func (*GroupMutation) ClearedFields

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

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

func (GroupMutation) Client

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

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

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

func (*GroupMutation) EdgeCleared

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

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

func (*GroupMutation) Field

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

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

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

func (*GroupMutation) Fields

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

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

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

func (*GroupMutation) IDs

func (m *GroupMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*GroupMutation) Name

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

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

func (*GroupMutation) OldCreatedAt

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

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

func (*GroupMutation) OldField

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

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

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

func (*GroupMutation) OldUpdatedAt

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

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

func (*GroupMutation) Op

func (m *GroupMutation) Op() Op

Op returns the operation name.

func (*GroupMutation) ParentCleared

func (m *GroupMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the Group entity was cleared.

func (*GroupMutation) ParentID

func (m *GroupMutation) ParentID() (id uuid.UUID, exists bool)

ParentID returns the "parent" edge ID in the mutation.

func (*GroupMutation) ParentIDs

func (m *GroupMutation) ParentIDs() (ids []uuid.UUID)

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

func (*GroupMutation) PermissionPoliciesCleared

func (m *GroupMutation) PermissionPoliciesCleared() bool

PermissionPoliciesCleared reports if the "permission_policies" edge to the PermissionPolicy entity was cleared.

func (*GroupMutation) PermissionPoliciesIDs

func (m *GroupMutation) PermissionPoliciesIDs() (ids []uuid.UUID)

PermissionPoliciesIDs returns the "permission_policies" edge IDs in the mutation.

func (*GroupMutation) RemoveBlueprintIDs

func (m *GroupMutation) RemoveBlueprintIDs(ids ...uuid.UUID)

RemoveBlueprintIDs removes the "blueprints" edge to the Blueprint entity by IDs.

func (*GroupMutation) RemoveChildIDs

func (m *GroupMutation) RemoveChildIDs(ids ...uuid.UUID)

RemoveChildIDs removes the "children" edge to the Group entity by IDs.

func (*GroupMutation) RemovePermissionPolicyIDs

func (m *GroupMutation) RemovePermissionPolicyIDs(ids ...uuid.UUID)

RemovePermissionPolicyIDs removes the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*GroupMutation) RemoveUserIDs

func (m *GroupMutation) RemoveUserIDs(ids ...uuid.UUID)

RemoveUserIDs removes the "users" edge to the User entity by IDs.

func (*GroupMutation) RemovedBlueprintsIDs

func (m *GroupMutation) RemovedBlueprintsIDs() (ids []uuid.UUID)

RemovedBlueprints returns the removed IDs of the "blueprints" edge to the Blueprint entity.

func (*GroupMutation) RemovedChildrenIDs

func (m *GroupMutation) RemovedChildrenIDs() (ids []uuid.UUID)

RemovedChildren returns the removed IDs of the "children" edge to the Group entity.

func (*GroupMutation) RemovedEdges

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

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

func (*GroupMutation) RemovedIDs

func (m *GroupMutation) 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 (*GroupMutation) RemovedPermissionPoliciesIDs

func (m *GroupMutation) RemovedPermissionPoliciesIDs() (ids []uuid.UUID)

RemovedPermissionPolicies returns the removed IDs of the "permission_policies" edge to the PermissionPolicy entity.

func (*GroupMutation) RemovedUsersIDs

func (m *GroupMutation) RemovedUsersIDs() (ids []uuid.UUID)

RemovedUsers returns the removed IDs of the "users" edge to the User entity.

func (*GroupMutation) ResetBlueprints

func (m *GroupMutation) ResetBlueprints()

ResetBlueprints resets all changes to the "blueprints" edge.

func (*GroupMutation) ResetChildren

func (m *GroupMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

func (*GroupMutation) ResetCreatedAt

func (m *GroupMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GroupMutation) ResetEdge

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

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

func (m *GroupMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GroupMutation) ResetParent

func (m *GroupMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*GroupMutation) ResetPermissionPolicies

func (m *GroupMutation) ResetPermissionPolicies()

ResetPermissionPolicies resets all changes to the "permission_policies" edge.

func (*GroupMutation) ResetUpdatedAt

func (m *GroupMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*GroupMutation) ResetUsers

func (m *GroupMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*GroupMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*GroupMutation) SetField

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

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

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

func (*GroupMutation) SetName

func (m *GroupMutation) SetName(s string)

SetName sets the "name" field.

func (*GroupMutation) SetOp

func (m *GroupMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GroupMutation) SetParentID

func (m *GroupMutation) SetParentID(id uuid.UUID)

SetParentID sets the "parent" edge to the Group entity by id.

func (*GroupMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (GroupMutation) Tx

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

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

func (*GroupMutation) Type

func (m *GroupMutation) Type() string

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

func (*GroupMutation) UpdatedAt

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

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

func (*GroupMutation) UsersCleared

func (m *GroupMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*GroupMutation) UsersIDs

func (m *GroupMutation) UsersIDs() (ids []uuid.UUID)

UsersIDs returns the "users" edge IDs in the mutation.

func (*GroupMutation) Where

func (m *GroupMutation) Where(ps ...predicate.Group)

Where appends a list predicates to the GroupMutation builder.

func (*GroupMutation) WhereP

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

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

type GroupQuery

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

GroupQuery is the builder for querying Group entities.

func (*GroupQuery) Aggregate

func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect

Aggregate returns a GroupSelect configured with the given aggregations.

func (*GroupQuery) All

func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)

All executes the query and returns a list of Groups.

func (*GroupQuery) AllX

func (gq *GroupQuery) AllX(ctx context.Context) []*Group

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

func (*GroupQuery) Clone

func (gq *GroupQuery) Clone() *GroupQuery

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

func (*GroupQuery) Count

func (gq *GroupQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GroupQuery) CountX

func (gq *GroupQuery) CountX(ctx context.Context) int

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

func (*GroupQuery) Exist

func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)

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

func (*GroupQuery) ExistX

func (gq *GroupQuery) ExistX(ctx context.Context) bool

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

func (*GroupQuery) First

func (gq *GroupQuery) First(ctx context.Context) (*Group, error)

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

func (*GroupQuery) FirstID

func (gq *GroupQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*GroupQuery) FirstIDX

func (gq *GroupQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*GroupQuery) FirstX

func (gq *GroupQuery) FirstX(ctx context.Context) *Group

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

func (*GroupQuery) GroupBy

func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy

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.Group.Query().
	GroupBy(group.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GroupQuery) IDs

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

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

func (*GroupQuery) IDsX

func (gq *GroupQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*GroupQuery) Limit

func (gq *GroupQuery) Limit(limit int) *GroupQuery

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

func (*GroupQuery) Offset

func (gq *GroupQuery) Offset(offset int) *GroupQuery

Offset to start from.

func (*GroupQuery) Only

func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)

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

func (*GroupQuery) OnlyID

func (gq *GroupQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*GroupQuery) OnlyIDX

func (gq *GroupQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*GroupQuery) OnlyX

func (gq *GroupQuery) OnlyX(ctx context.Context) *Group

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

func (*GroupQuery) Order

func (gq *GroupQuery) Order(o ...group.OrderOption) *GroupQuery

Order specifies how the records should be ordered.

func (*GroupQuery) QueryBlueprints

func (gq *GroupQuery) QueryBlueprints() *BlueprintQuery

QueryBlueprints chains the current query on the "blueprints" edge.

func (*GroupQuery) QueryChildren

func (gq *GroupQuery) QueryChildren() *GroupQuery

QueryChildren chains the current query on the "children" edge.

func (*GroupQuery) QueryParent

func (gq *GroupQuery) QueryParent() *GroupQuery

QueryParent chains the current query on the "parent" edge.

func (*GroupQuery) QueryPermissionPolicies

func (gq *GroupQuery) QueryPermissionPolicies() *PermissionPolicyQuery

QueryPermissionPolicies chains the current query on the "permission_policies" edge.

func (*GroupQuery) QueryUsers

func (gq *GroupQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*GroupQuery) Select

func (gq *GroupQuery) Select(fields ...string) *GroupSelect

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.Group.Query().
	Select(group.FieldCreatedAt).
	Scan(ctx, &v)

func (*GroupQuery) Unique

func (gq *GroupQuery) Unique(unique bool) *GroupQuery

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

func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery

Where adds a new predicate for the GroupQuery builder.

func (*GroupQuery) WithBlueprints

func (gq *GroupQuery) WithBlueprints(opts ...func(*BlueprintQuery)) *GroupQuery

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

func (*GroupQuery) WithChildren

func (gq *GroupQuery) WithChildren(opts ...func(*GroupQuery)) *GroupQuery

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

func (*GroupQuery) WithParent

func (gq *GroupQuery) WithParent(opts ...func(*GroupQuery)) *GroupQuery

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

func (*GroupQuery) WithPermissionPolicies

func (gq *GroupQuery) WithPermissionPolicies(opts ...func(*PermissionPolicyQuery)) *GroupQuery

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

func (*GroupQuery) WithUsers

func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery

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

type GroupSelect

type GroupSelect struct {
	*GroupQuery
	// contains filtered or unexported fields
}

GroupSelect is the builder for selecting fields of Group entities.

func (*GroupSelect) Aggregate

func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GroupSelect) Bool

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

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

func (*GroupSelect) BoolX

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

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

func (*GroupSelect) Bools

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

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

func (*GroupSelect) BoolsX

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

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

func (*GroupSelect) Float64

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

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

func (*GroupSelect) Float64X

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

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

func (*GroupSelect) Float64s

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

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

func (*GroupSelect) Float64sX

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

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

func (*GroupSelect) Int

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

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

func (*GroupSelect) IntX

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

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

func (*GroupSelect) Ints

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

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

func (*GroupSelect) IntsX

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

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

func (*GroupSelect) Scan

func (gs *GroupSelect) Scan(ctx context.Context, v any) error

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

func (*GroupSelect) ScanX

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

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

func (*GroupSelect) String

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

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

func (*GroupSelect) StringX

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

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

func (*GroupSelect) Strings

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

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

func (*GroupSelect) StringsX

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

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

type GroupUpdate

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

GroupUpdate is the builder for updating Group entities.

func (*GroupUpdate) AddBlueprintIDs

func (gu *GroupUpdate) AddBlueprintIDs(ids ...uuid.UUID) *GroupUpdate

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by IDs.

func (*GroupUpdate) AddBlueprints

func (gu *GroupUpdate) AddBlueprints(b ...*Blueprint) *GroupUpdate

AddBlueprints adds the "blueprints" edges to the Blueprint entity.

func (*GroupUpdate) AddChildIDs

func (gu *GroupUpdate) AddChildIDs(ids ...uuid.UUID) *GroupUpdate

AddChildIDs adds the "children" edge to the Group entity by IDs.

func (*GroupUpdate) AddChildren

func (gu *GroupUpdate) AddChildren(g ...*Group) *GroupUpdate

AddChildren adds the "children" edges to the Group entity.

func (*GroupUpdate) AddPermissionPolicies

func (gu *GroupUpdate) AddPermissionPolicies(p ...*PermissionPolicy) *GroupUpdate

AddPermissionPolicies adds the "permission_policies" edges to the PermissionPolicy entity.

func (*GroupUpdate) AddPermissionPolicyIDs

func (gu *GroupUpdate) AddPermissionPolicyIDs(ids ...uuid.UUID) *GroupUpdate

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*GroupUpdate) AddUserIDs

func (gu *GroupUpdate) AddUserIDs(ids ...uuid.UUID) *GroupUpdate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*GroupUpdate) AddUsers

func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate

AddUsers adds the "users" edges to the User entity.

func (*GroupUpdate) ClearBlueprints

func (gu *GroupUpdate) ClearBlueprints() *GroupUpdate

ClearBlueprints clears all "blueprints" edges to the Blueprint entity.

func (*GroupUpdate) ClearChildren

func (gu *GroupUpdate) ClearChildren() *GroupUpdate

ClearChildren clears all "children" edges to the Group entity.

func (*GroupUpdate) ClearParent

func (gu *GroupUpdate) ClearParent() *GroupUpdate

ClearParent clears the "parent" edge to the Group entity.

func (*GroupUpdate) ClearPermissionPolicies

func (gu *GroupUpdate) ClearPermissionPolicies() *GroupUpdate

ClearPermissionPolicies clears all "permission_policies" edges to the PermissionPolicy entity.

func (*GroupUpdate) ClearUsers

func (gu *GroupUpdate) ClearUsers() *GroupUpdate

ClearUsers clears all "users" edges to the User entity.

func (*GroupUpdate) Exec

func (gu *GroupUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupUpdate) ExecX

func (gu *GroupUpdate) ExecX(ctx context.Context)

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

func (*GroupUpdate) Mutation

func (gu *GroupUpdate) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupUpdate) RemoveBlueprintIDs

func (gu *GroupUpdate) RemoveBlueprintIDs(ids ...uuid.UUID) *GroupUpdate

RemoveBlueprintIDs removes the "blueprints" edge to Blueprint entities by IDs.

func (*GroupUpdate) RemoveBlueprints

func (gu *GroupUpdate) RemoveBlueprints(b ...*Blueprint) *GroupUpdate

RemoveBlueprints removes "blueprints" edges to Blueprint entities.

func (*GroupUpdate) RemoveChildIDs

func (gu *GroupUpdate) RemoveChildIDs(ids ...uuid.UUID) *GroupUpdate

RemoveChildIDs removes the "children" edge to Group entities by IDs.

func (*GroupUpdate) RemoveChildren

func (gu *GroupUpdate) RemoveChildren(g ...*Group) *GroupUpdate

RemoveChildren removes "children" edges to Group entities.

func (*GroupUpdate) RemovePermissionPolicies

func (gu *GroupUpdate) RemovePermissionPolicies(p ...*PermissionPolicy) *GroupUpdate

RemovePermissionPolicies removes "permission_policies" edges to PermissionPolicy entities.

func (*GroupUpdate) RemovePermissionPolicyIDs

func (gu *GroupUpdate) RemovePermissionPolicyIDs(ids ...uuid.UUID) *GroupUpdate

RemovePermissionPolicyIDs removes the "permission_policies" edge to PermissionPolicy entities by IDs.

func (*GroupUpdate) RemoveUserIDs

func (gu *GroupUpdate) RemoveUserIDs(ids ...uuid.UUID) *GroupUpdate

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*GroupUpdate) RemoveUsers

func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate

RemoveUsers removes "users" edges to User entities.

func (*GroupUpdate) Save

func (gu *GroupUpdate) Save(ctx context.Context) (int, error)

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

func (*GroupUpdate) SaveX

func (gu *GroupUpdate) SaveX(ctx context.Context) int

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

func (*GroupUpdate) SetName

func (gu *GroupUpdate) SetName(s string) *GroupUpdate

SetName sets the "name" field.

func (*GroupUpdate) SetNillableParentID

func (gu *GroupUpdate) SetNillableParentID(id *uuid.UUID) *GroupUpdate

SetNillableParentID sets the "parent" edge to the Group entity by ID if the given value is not nil.

func (*GroupUpdate) SetParent

func (gu *GroupUpdate) SetParent(g *Group) *GroupUpdate

SetParent sets the "parent" edge to the Group entity.

func (*GroupUpdate) SetParentID

func (gu *GroupUpdate) SetParentID(id uuid.UUID) *GroupUpdate

SetParentID sets the "parent" edge to the Group entity by ID.

func (*GroupUpdate) SetUpdatedAt

func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate

SetUpdatedAt sets the "updated_at" field.

func (*GroupUpdate) Where

func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate

Where appends a list predicates to the GroupUpdate builder.

type GroupUpdateOne

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

GroupUpdateOne is the builder for updating a single Group entity.

func (*GroupUpdateOne) AddBlueprintIDs

func (guo *GroupUpdateOne) AddBlueprintIDs(ids ...uuid.UUID) *GroupUpdateOne

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by IDs.

func (*GroupUpdateOne) AddBlueprints

func (guo *GroupUpdateOne) AddBlueprints(b ...*Blueprint) *GroupUpdateOne

AddBlueprints adds the "blueprints" edges to the Blueprint entity.

func (*GroupUpdateOne) AddChildIDs

func (guo *GroupUpdateOne) AddChildIDs(ids ...uuid.UUID) *GroupUpdateOne

AddChildIDs adds the "children" edge to the Group entity by IDs.

func (*GroupUpdateOne) AddChildren

func (guo *GroupUpdateOne) AddChildren(g ...*Group) *GroupUpdateOne

AddChildren adds the "children" edges to the Group entity.

func (*GroupUpdateOne) AddPermissionPolicies

func (guo *GroupUpdateOne) AddPermissionPolicies(p ...*PermissionPolicy) *GroupUpdateOne

AddPermissionPolicies adds the "permission_policies" edges to the PermissionPolicy entity.

func (*GroupUpdateOne) AddPermissionPolicyIDs

func (guo *GroupUpdateOne) AddPermissionPolicyIDs(ids ...uuid.UUID) *GroupUpdateOne

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*GroupUpdateOne) AddUserIDs

func (guo *GroupUpdateOne) AddUserIDs(ids ...uuid.UUID) *GroupUpdateOne

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*GroupUpdateOne) AddUsers

func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne

AddUsers adds the "users" edges to the User entity.

func (*GroupUpdateOne) ClearBlueprints

func (guo *GroupUpdateOne) ClearBlueprints() *GroupUpdateOne

ClearBlueprints clears all "blueprints" edges to the Blueprint entity.

func (*GroupUpdateOne) ClearChildren

func (guo *GroupUpdateOne) ClearChildren() *GroupUpdateOne

ClearChildren clears all "children" edges to the Group entity.

func (*GroupUpdateOne) ClearParent

func (guo *GroupUpdateOne) ClearParent() *GroupUpdateOne

ClearParent clears the "parent" edge to the Group entity.

func (*GroupUpdateOne) ClearPermissionPolicies

func (guo *GroupUpdateOne) ClearPermissionPolicies() *GroupUpdateOne

ClearPermissionPolicies clears all "permission_policies" edges to the PermissionPolicy entity.

func (*GroupUpdateOne) ClearUsers

func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne

ClearUsers clears all "users" edges to the User entity.

func (*GroupUpdateOne) Exec

func (guo *GroupUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GroupUpdateOne) ExecX

func (guo *GroupUpdateOne) ExecX(ctx context.Context)

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

func (*GroupUpdateOne) Mutation

func (guo *GroupUpdateOne) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupUpdateOne) RemoveBlueprintIDs

func (guo *GroupUpdateOne) RemoveBlueprintIDs(ids ...uuid.UUID) *GroupUpdateOne

RemoveBlueprintIDs removes the "blueprints" edge to Blueprint entities by IDs.

func (*GroupUpdateOne) RemoveBlueprints

func (guo *GroupUpdateOne) RemoveBlueprints(b ...*Blueprint) *GroupUpdateOne

RemoveBlueprints removes "blueprints" edges to Blueprint entities.

func (*GroupUpdateOne) RemoveChildIDs

func (guo *GroupUpdateOne) RemoveChildIDs(ids ...uuid.UUID) *GroupUpdateOne

RemoveChildIDs removes the "children" edge to Group entities by IDs.

func (*GroupUpdateOne) RemoveChildren

func (guo *GroupUpdateOne) RemoveChildren(g ...*Group) *GroupUpdateOne

RemoveChildren removes "children" edges to Group entities.

func (*GroupUpdateOne) RemovePermissionPolicies

func (guo *GroupUpdateOne) RemovePermissionPolicies(p ...*PermissionPolicy) *GroupUpdateOne

RemovePermissionPolicies removes "permission_policies" edges to PermissionPolicy entities.

func (*GroupUpdateOne) RemovePermissionPolicyIDs

func (guo *GroupUpdateOne) RemovePermissionPolicyIDs(ids ...uuid.UUID) *GroupUpdateOne

RemovePermissionPolicyIDs removes the "permission_policies" edge to PermissionPolicy entities by IDs.

func (*GroupUpdateOne) RemoveUserIDs

func (guo *GroupUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *GroupUpdateOne

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*GroupUpdateOne) RemoveUsers

func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne

RemoveUsers removes "users" edges to User entities.

func (*GroupUpdateOne) Save

func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)

Save executes the query and returns the updated Group entity.

func (*GroupUpdateOne) SaveX

func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group

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

func (*GroupUpdateOne) Select

func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne

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

func (*GroupUpdateOne) SetName

func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne

SetName sets the "name" field.

func (*GroupUpdateOne) SetNillableParentID

func (guo *GroupUpdateOne) SetNillableParentID(id *uuid.UUID) *GroupUpdateOne

SetNillableParentID sets the "parent" edge to the Group entity by ID if the given value is not nil.

func (*GroupUpdateOne) SetParent

func (guo *GroupUpdateOne) SetParent(g *Group) *GroupUpdateOne

SetParent sets the "parent" edge to the Group entity.

func (*GroupUpdateOne) SetParentID

func (guo *GroupUpdateOne) SetParentID(id uuid.UUID) *GroupUpdateOne

SetParentID sets the "parent" edge to the Group entity by ID.

func (*GroupUpdateOne) SetUpdatedAt

func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*GroupUpdateOne) Where

func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne

Where appends a list predicates to the GroupUpdate builder.

type Groups

type Groups []*Group

Groups is a parsable slice of Group.

type Hook

type Hook = ent.Hook

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

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

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

type Interceptor

type Interceptor = ent.Interceptor

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

type Permission

type Permission struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Key holds the value of the "key" field.
	Key string `json:"key,omitempty"`
	// Component holds the value of the "component" field.
	Component string `json:"component,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PermissionQuery when eager-loading is set.
	Edges PermissionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Permission is the model entity for the Permission schema.

func (*Permission) QueryPermissionPolicies

func (pe *Permission) QueryPermissionPolicies() *PermissionPolicyQuery

QueryPermissionPolicies queries the "permission_policies" edge of the Permission entity.

func (*Permission) String

func (pe *Permission) String() string

String implements the fmt.Stringer.

func (*Permission) Unwrap

func (pe *Permission) Unwrap() *Permission

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

func (pe *Permission) Update() *PermissionUpdateOne

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

func (*Permission) Value

func (pe *Permission) Value(name string) (ent.Value, error)

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

type PermissionClient

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

PermissionClient is a client for the Permission schema.

func NewPermissionClient

func NewPermissionClient(c config) *PermissionClient

NewPermissionClient returns a client for the Permission from the given config.

func (*PermissionClient) Create

func (c *PermissionClient) Create() *PermissionCreate

Create returns a builder for creating a Permission entity.

func (*PermissionClient) CreateBulk

func (c *PermissionClient) CreateBulk(builders ...*PermissionCreate) *PermissionCreateBulk

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

func (*PermissionClient) Delete

func (c *PermissionClient) Delete() *PermissionDelete

Delete returns a delete builder for Permission.

func (*PermissionClient) DeleteOne

func (c *PermissionClient) DeleteOne(pe *Permission) *PermissionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PermissionClient) DeleteOneID

func (c *PermissionClient) DeleteOneID(id uuid.UUID) *PermissionDeleteOne

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

func (*PermissionClient) Get

Get returns a Permission entity by its id.

func (*PermissionClient) GetX

func (c *PermissionClient) GetX(ctx context.Context, id uuid.UUID) *Permission

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

func (*PermissionClient) Hooks

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

Hooks returns the client hooks.

func (*PermissionClient) Intercept

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

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

func (*PermissionClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PermissionClient) MapCreateBulk

func (c *PermissionClient) MapCreateBulk(slice any, setFunc func(*PermissionCreate, int)) *PermissionCreateBulk

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

func (c *PermissionClient) Query() *PermissionQuery

Query returns a query builder for Permission.

func (*PermissionClient) QueryPermissionPolicies

func (c *PermissionClient) QueryPermissionPolicies(pe *Permission) *PermissionPolicyQuery

QueryPermissionPolicies queries the permission_policies edge of a Permission.

func (*PermissionClient) Update

func (c *PermissionClient) Update() *PermissionUpdate

Update returns an update builder for Permission.

func (*PermissionClient) UpdateOne

func (c *PermissionClient) UpdateOne(pe *Permission) *PermissionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PermissionClient) UpdateOneID

func (c *PermissionClient) UpdateOneID(id uuid.UUID) *PermissionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PermissionClient) Use

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

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

type PermissionCreate

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

PermissionCreate is the builder for creating a Permission entity.

func (*PermissionCreate) AddPermissionPolicies

func (pc *PermissionCreate) AddPermissionPolicies(p ...*PermissionPolicy) *PermissionCreate

AddPermissionPolicies adds the "permission_policies" edges to the PermissionPolicy entity.

func (*PermissionCreate) AddPermissionPolicyIDs

func (pc *PermissionCreate) AddPermissionPolicyIDs(ids ...uuid.UUID) *PermissionCreate

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*PermissionCreate) Exec

func (pc *PermissionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PermissionCreate) ExecX

func (pc *PermissionCreate) ExecX(ctx context.Context)

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

func (*PermissionCreate) Mutation

func (pc *PermissionCreate) Mutation() *PermissionMutation

Mutation returns the PermissionMutation object of the builder.

func (*PermissionCreate) Save

func (pc *PermissionCreate) Save(ctx context.Context) (*Permission, error)

Save creates the Permission in the database.

func (*PermissionCreate) SaveX

func (pc *PermissionCreate) SaveX(ctx context.Context) *Permission

SaveX calls Save and panics if Save returns an error.

func (*PermissionCreate) SetComponent

func (pc *PermissionCreate) SetComponent(s string) *PermissionCreate

SetComponent sets the "component" field.

func (*PermissionCreate) SetCreatedAt

func (pc *PermissionCreate) SetCreatedAt(t time.Time) *PermissionCreate

SetCreatedAt sets the "created_at" field.

func (*PermissionCreate) SetDescription

func (pc *PermissionCreate) SetDescription(s string) *PermissionCreate

SetDescription sets the "description" field.

func (*PermissionCreate) SetID

SetID sets the "id" field.

func (*PermissionCreate) SetKey

func (pc *PermissionCreate) SetKey(s string) *PermissionCreate

SetKey sets the "key" field.

func (*PermissionCreate) SetNillableCreatedAt

func (pc *PermissionCreate) SetNillableCreatedAt(t *time.Time) *PermissionCreate

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

func (*PermissionCreate) SetNillableID

func (pc *PermissionCreate) SetNillableID(u *uuid.UUID) *PermissionCreate

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

func (*PermissionCreate) SetNillableUpdatedAt

func (pc *PermissionCreate) SetNillableUpdatedAt(t *time.Time) *PermissionCreate

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

func (*PermissionCreate) SetUpdatedAt

func (pc *PermissionCreate) SetUpdatedAt(t time.Time) *PermissionCreate

SetUpdatedAt sets the "updated_at" field.

type PermissionCreateBulk

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

PermissionCreateBulk is the builder for creating many Permission entities in bulk.

func (*PermissionCreateBulk) Exec

func (pcb *PermissionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PermissionCreateBulk) ExecX

func (pcb *PermissionCreateBulk) ExecX(ctx context.Context)

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

func (*PermissionCreateBulk) Save

func (pcb *PermissionCreateBulk) Save(ctx context.Context) ([]*Permission, error)

Save creates the Permission entities in the database.

func (*PermissionCreateBulk) SaveX

func (pcb *PermissionCreateBulk) SaveX(ctx context.Context) []*Permission

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

type PermissionDelete

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

PermissionDelete is the builder for deleting a Permission entity.

func (*PermissionDelete) Exec

func (pd *PermissionDelete) Exec(ctx context.Context) (int, error)

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

func (*PermissionDelete) ExecX

func (pd *PermissionDelete) ExecX(ctx context.Context) int

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

func (*PermissionDelete) Where

Where appends a list predicates to the PermissionDelete builder.

type PermissionDeleteOne

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

PermissionDeleteOne is the builder for deleting a single Permission entity.

func (*PermissionDeleteOne) Exec

func (pdo *PermissionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PermissionDeleteOne) ExecX

func (pdo *PermissionDeleteOne) ExecX(ctx context.Context)

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

func (*PermissionDeleteOne) Where

Where appends a list predicates to the PermissionDelete builder.

type PermissionEdges

type PermissionEdges struct {
	// PermissionPolicies holds the value of the permission_policies edge.
	PermissionPolicies []*PermissionPolicy `json:"permission_policies,omitempty"`
	// contains filtered or unexported fields
}

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

func (PermissionEdges) PermissionPoliciesOrErr

func (e PermissionEdges) PermissionPoliciesOrErr() ([]*PermissionPolicy, error)

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

type PermissionGroupBy

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

PermissionGroupBy is the group-by builder for Permission entities.

func (*PermissionGroupBy) Aggregate

func (pgb *PermissionGroupBy) Aggregate(fns ...AggregateFunc) *PermissionGroupBy

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

func (*PermissionGroupBy) Bool

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

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

func (*PermissionGroupBy) BoolX

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

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

func (*PermissionGroupBy) Bools

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

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

func (*PermissionGroupBy) BoolsX

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

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

func (*PermissionGroupBy) Float64

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

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

func (*PermissionGroupBy) Float64X

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

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

func (*PermissionGroupBy) Float64s

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

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

func (*PermissionGroupBy) Float64sX

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

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

func (*PermissionGroupBy) Int

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

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

func (*PermissionGroupBy) IntX

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

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

func (*PermissionGroupBy) Ints

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

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

func (*PermissionGroupBy) IntsX

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

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

func (*PermissionGroupBy) Scan

func (pgb *PermissionGroupBy) Scan(ctx context.Context, v any) error

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

func (*PermissionGroupBy) ScanX

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

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

func (*PermissionGroupBy) String

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

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

func (*PermissionGroupBy) StringX

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

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

func (*PermissionGroupBy) Strings

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

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

func (*PermissionGroupBy) StringsX

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

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

type PermissionMutation

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

PermissionMutation represents an operation that mutates the Permission nodes in the graph.

func (*PermissionMutation) AddField

func (m *PermissionMutation) 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 (*PermissionMutation) AddPermissionPolicyIDs

func (m *PermissionMutation) AddPermissionPolicyIDs(ids ...uuid.UUID)

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by ids.

func (*PermissionMutation) AddedEdges

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

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

func (*PermissionMutation) AddedField

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

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

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

func (*PermissionMutation) AddedIDs

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

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

func (*PermissionMutation) ClearEdge

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

func (m *PermissionMutation) 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 (*PermissionMutation) ClearPermissionPolicies

func (m *PermissionMutation) ClearPermissionPolicies()

ClearPermissionPolicies clears the "permission_policies" edge to the PermissionPolicy entity.

func (*PermissionMutation) ClearedEdges

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

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

func (*PermissionMutation) ClearedFields

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

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

func (PermissionMutation) Client

func (m PermissionMutation) 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 (*PermissionMutation) Component

func (m *PermissionMutation) Component() (r string, exists bool)

Component returns the value of the "component" field in the mutation.

func (*PermissionMutation) CreatedAt

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

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

func (*PermissionMutation) Description

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

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

func (*PermissionMutation) EdgeCleared

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

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

func (*PermissionMutation) Field

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

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

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

func (*PermissionMutation) Fields

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

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

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

func (*PermissionMutation) IDs

func (m *PermissionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*PermissionMutation) Key

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

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

func (*PermissionMutation) OldComponent

func (m *PermissionMutation) OldComponent(ctx context.Context) (v string, err error)

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

func (*PermissionMutation) OldCreatedAt

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

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

func (*PermissionMutation) OldDescription

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

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

func (*PermissionMutation) OldField

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

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

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

func (*PermissionMutation) OldUpdatedAt

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

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

func (*PermissionMutation) Op

func (m *PermissionMutation) Op() Op

Op returns the operation name.

func (*PermissionMutation) PermissionPoliciesCleared

func (m *PermissionMutation) PermissionPoliciesCleared() bool

PermissionPoliciesCleared reports if the "permission_policies" edge to the PermissionPolicy entity was cleared.

func (*PermissionMutation) PermissionPoliciesIDs

func (m *PermissionMutation) PermissionPoliciesIDs() (ids []uuid.UUID)

PermissionPoliciesIDs returns the "permission_policies" edge IDs in the mutation.

func (*PermissionMutation) RemovePermissionPolicyIDs

func (m *PermissionMutation) RemovePermissionPolicyIDs(ids ...uuid.UUID)

RemovePermissionPolicyIDs removes the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*PermissionMutation) RemovedEdges

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

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

func (*PermissionMutation) RemovedIDs

func (m *PermissionMutation) 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 (*PermissionMutation) RemovedPermissionPoliciesIDs

func (m *PermissionMutation) RemovedPermissionPoliciesIDs() (ids []uuid.UUID)

RemovedPermissionPolicies returns the removed IDs of the "permission_policies" edge to the PermissionPolicy entity.

func (*PermissionMutation) ResetComponent

func (m *PermissionMutation) ResetComponent()

ResetComponent resets all changes to the "component" field.

func (*PermissionMutation) ResetCreatedAt

func (m *PermissionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PermissionMutation) ResetDescription

func (m *PermissionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*PermissionMutation) ResetEdge

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

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

func (m *PermissionMutation) ResetKey()

ResetKey resets all changes to the "key" field.

func (*PermissionMutation) ResetPermissionPolicies

func (m *PermissionMutation) ResetPermissionPolicies()

ResetPermissionPolicies resets all changes to the "permission_policies" edge.

func (*PermissionMutation) ResetUpdatedAt

func (m *PermissionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PermissionMutation) SetComponent

func (m *PermissionMutation) SetComponent(s string)

SetComponent sets the "component" field.

func (*PermissionMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*PermissionMutation) SetDescription

func (m *PermissionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*PermissionMutation) SetField

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

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

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

func (*PermissionMutation) SetKey

func (m *PermissionMutation) SetKey(s string)

SetKey sets the "key" field.

func (*PermissionMutation) SetOp

func (m *PermissionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PermissionMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (PermissionMutation) Tx

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

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

func (*PermissionMutation) Type

func (m *PermissionMutation) Type() string

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

func (*PermissionMutation) UpdatedAt

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

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

func (*PermissionMutation) Where

func (m *PermissionMutation) Where(ps ...predicate.Permission)

Where appends a list predicates to the PermissionMutation builder.

func (*PermissionMutation) WhereP

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

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

type PermissionPolicies

type PermissionPolicies []*PermissionPolicy

PermissionPolicies is a parsable slice of PermissionPolicy.

type PermissionPolicy

type PermissionPolicy struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Type holds the value of the "type" field.
	Type permissionpolicy.Type `json:"type,omitempty"`
	// IsInherited holds the value of the "is_inherited" field.
	IsInherited bool `json:"is_inherited,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PermissionPolicyQuery when eager-loading is set.
	Edges PermissionPolicyEdges `json:"edges"`
	// contains filtered or unexported fields
}

PermissionPolicy is the model entity for the PermissionPolicy schema.

func (*PermissionPolicy) QueryGroup

func (pp *PermissionPolicy) QueryGroup() *GroupQuery

QueryGroup queries the "group" edge of the PermissionPolicy entity.

func (*PermissionPolicy) QueryPermission

func (pp *PermissionPolicy) QueryPermission() *PermissionQuery

QueryPermission queries the "permission" edge of the PermissionPolicy entity.

func (*PermissionPolicy) String

func (pp *PermissionPolicy) String() string

String implements the fmt.Stringer.

func (*PermissionPolicy) Unwrap

func (pp *PermissionPolicy) Unwrap() *PermissionPolicy

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

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

func (*PermissionPolicy) Value

func (pp *PermissionPolicy) Value(name string) (ent.Value, error)

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

type PermissionPolicyClient

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

PermissionPolicyClient is a client for the PermissionPolicy schema.

func NewPermissionPolicyClient

func NewPermissionPolicyClient(c config) *PermissionPolicyClient

NewPermissionPolicyClient returns a client for the PermissionPolicy from the given config.

func (*PermissionPolicyClient) Create

Create returns a builder for creating a PermissionPolicy entity.

func (*PermissionPolicyClient) CreateBulk

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

func (*PermissionPolicyClient) Delete

Delete returns a delete builder for PermissionPolicy.

func (*PermissionPolicyClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PermissionPolicyClient) DeleteOneID

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

func (*PermissionPolicyClient) Get

Get returns a PermissionPolicy entity by its id.

func (*PermissionPolicyClient) GetX

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

func (*PermissionPolicyClient) Hooks

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

Hooks returns the client hooks.

func (*PermissionPolicyClient) Intercept

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

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

func (*PermissionPolicyClient) Interceptors

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

Interceptors returns the client interceptors.

func (*PermissionPolicyClient) MapCreateBulk

func (c *PermissionPolicyClient) MapCreateBulk(slice any, setFunc func(*PermissionPolicyCreate, int)) *PermissionPolicyCreateBulk

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

Query returns a query builder for PermissionPolicy.

func (*PermissionPolicyClient) QueryGroup

QueryGroup queries the group edge of a PermissionPolicy.

func (*PermissionPolicyClient) QueryPermission

func (c *PermissionPolicyClient) QueryPermission(pp *PermissionPolicy) *PermissionQuery

QueryPermission queries the permission edge of a PermissionPolicy.

func (*PermissionPolicyClient) Update

Update returns an update builder for PermissionPolicy.

func (*PermissionPolicyClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PermissionPolicyClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*PermissionPolicyClient) Use

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

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

type PermissionPolicyCreate

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

PermissionPolicyCreate is the builder for creating a PermissionPolicy entity.

func (*PermissionPolicyCreate) Exec

Exec executes the query.

func (*PermissionPolicyCreate) ExecX

func (ppc *PermissionPolicyCreate) ExecX(ctx context.Context)

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

func (*PermissionPolicyCreate) Mutation

Mutation returns the PermissionPolicyMutation object of the builder.

func (*PermissionPolicyCreate) Save

Save creates the PermissionPolicy in the database.

func (*PermissionPolicyCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PermissionPolicyCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*PermissionPolicyCreate) SetGroup

SetGroup sets the "group" edge to the Group entity.

func (*PermissionPolicyCreate) SetGroupID

SetGroupID sets the "group" edge to the Group entity by ID.

func (*PermissionPolicyCreate) SetID

SetID sets the "id" field.

func (*PermissionPolicyCreate) SetIsInherited

func (ppc *PermissionPolicyCreate) SetIsInherited(b bool) *PermissionPolicyCreate

SetIsInherited sets the "is_inherited" field.

func (*PermissionPolicyCreate) SetNillableCreatedAt

func (ppc *PermissionPolicyCreate) SetNillableCreatedAt(t *time.Time) *PermissionPolicyCreate

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

func (*PermissionPolicyCreate) SetNillableID

func (ppc *PermissionPolicyCreate) SetNillableID(u *uuid.UUID) *PermissionPolicyCreate

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

func (*PermissionPolicyCreate) SetNillableIsInherited

func (ppc *PermissionPolicyCreate) SetNillableIsInherited(b *bool) *PermissionPolicyCreate

SetNillableIsInherited sets the "is_inherited" field if the given value is not nil.

func (*PermissionPolicyCreate) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*PermissionPolicyCreate) SetNillableUpdatedAt

func (ppc *PermissionPolicyCreate) SetNillableUpdatedAt(t *time.Time) *PermissionPolicyCreate

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

func (*PermissionPolicyCreate) SetPermission

SetPermission sets the "permission" edge to the Permission entity.

func (*PermissionPolicyCreate) SetPermissionID

func (ppc *PermissionPolicyCreate) SetPermissionID(id uuid.UUID) *PermissionPolicyCreate

SetPermissionID sets the "permission" edge to the Permission entity by ID.

func (*PermissionPolicyCreate) SetType

SetType sets the "type" field.

func (*PermissionPolicyCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type PermissionPolicyCreateBulk

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

PermissionPolicyCreateBulk is the builder for creating many PermissionPolicy entities in bulk.

func (*PermissionPolicyCreateBulk) Exec

Exec executes the query.

func (*PermissionPolicyCreateBulk) ExecX

func (ppcb *PermissionPolicyCreateBulk) ExecX(ctx context.Context)

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

func (*PermissionPolicyCreateBulk) Save

Save creates the PermissionPolicy entities in the database.

func (*PermissionPolicyCreateBulk) SaveX

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

type PermissionPolicyDelete

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

PermissionPolicyDelete is the builder for deleting a PermissionPolicy entity.

func (*PermissionPolicyDelete) Exec

func (ppd *PermissionPolicyDelete) Exec(ctx context.Context) (int, error)

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

func (*PermissionPolicyDelete) ExecX

func (ppd *PermissionPolicyDelete) ExecX(ctx context.Context) int

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

func (*PermissionPolicyDelete) Where

Where appends a list predicates to the PermissionPolicyDelete builder.

type PermissionPolicyDeleteOne

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

PermissionPolicyDeleteOne is the builder for deleting a single PermissionPolicy entity.

func (*PermissionPolicyDeleteOne) Exec

Exec executes the deletion query.

func (*PermissionPolicyDeleteOne) ExecX

func (ppdo *PermissionPolicyDeleteOne) ExecX(ctx context.Context)

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

func (*PermissionPolicyDeleteOne) Where

Where appends a list predicates to the PermissionPolicyDelete builder.

type PermissionPolicyEdges

type PermissionPolicyEdges struct {
	// Permission holds the value of the permission edge.
	Permission *Permission `json:"permission,omitempty"`
	// Group holds the value of the group edge.
	Group *Group `json:"group,omitempty"`
	// contains filtered or unexported fields
}

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

func (PermissionPolicyEdges) GroupOrErr

func (e PermissionPolicyEdges) GroupOrErr() (*Group, error)

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

func (PermissionPolicyEdges) PermissionOrErr

func (e PermissionPolicyEdges) PermissionOrErr() (*Permission, error)

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

type PermissionPolicyGroupBy

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

PermissionPolicyGroupBy is the group-by builder for PermissionPolicy entities.

func (*PermissionPolicyGroupBy) Aggregate

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

func (*PermissionPolicyGroupBy) Bool

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

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

func (*PermissionPolicyGroupBy) BoolX

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

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

func (*PermissionPolicyGroupBy) Bools

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

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

func (*PermissionPolicyGroupBy) BoolsX

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

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

func (*PermissionPolicyGroupBy) Float64

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

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

func (*PermissionPolicyGroupBy) Float64X

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

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

func (*PermissionPolicyGroupBy) Float64s

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

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

func (*PermissionPolicyGroupBy) Float64sX

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

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

func (*PermissionPolicyGroupBy) Int

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

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

func (*PermissionPolicyGroupBy) IntX

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

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

func (*PermissionPolicyGroupBy) Ints

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

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

func (*PermissionPolicyGroupBy) IntsX

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

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

func (*PermissionPolicyGroupBy) Scan

func (ppgb *PermissionPolicyGroupBy) Scan(ctx context.Context, v any) error

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

func (*PermissionPolicyGroupBy) ScanX

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

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

func (*PermissionPolicyGroupBy) String

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

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

func (*PermissionPolicyGroupBy) StringX

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

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

func (*PermissionPolicyGroupBy) Strings

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

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

func (*PermissionPolicyGroupBy) StringsX

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

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

type PermissionPolicyMutation

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

PermissionPolicyMutation represents an operation that mutates the PermissionPolicy nodes in the graph.

func (*PermissionPolicyMutation) AddField

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) AddedEdges

func (m *PermissionPolicyMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PermissionPolicyMutation) AddedField

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) AddedFields

func (m *PermissionPolicyMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PermissionPolicyMutation) AddedIDs

func (m *PermissionPolicyMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PermissionPolicyMutation) ClearEdge

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) ClearField

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) ClearGroup

func (m *PermissionPolicyMutation) ClearGroup()

ClearGroup clears the "group" edge to the Group entity.

func (*PermissionPolicyMutation) ClearIsInherited

func (m *PermissionPolicyMutation) ClearIsInherited()

ClearIsInherited clears the value of the "is_inherited" field.

func (*PermissionPolicyMutation) ClearPermission

func (m *PermissionPolicyMutation) ClearPermission()

ClearPermission clears the "permission" edge to the Permission entity.

func (*PermissionPolicyMutation) ClearType

func (m *PermissionPolicyMutation) ClearType()

ClearType clears the value of the "type" field.

func (*PermissionPolicyMutation) ClearedEdges

func (m *PermissionPolicyMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PermissionPolicyMutation) ClearedFields

func (m *PermissionPolicyMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PermissionPolicyMutation) Client

func (m PermissionPolicyMutation) 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 (*PermissionPolicyMutation) CreatedAt

func (m *PermissionPolicyMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PermissionPolicyMutation) EdgeCleared

func (m *PermissionPolicyMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PermissionPolicyMutation) Field

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) FieldCleared

func (m *PermissionPolicyMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PermissionPolicyMutation) Fields

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) GetType

func (m *PermissionPolicyMutation) GetType() (r permissionpolicy.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*PermissionPolicyMutation) GroupCleared

func (m *PermissionPolicyMutation) GroupCleared() bool

GroupCleared reports if the "group" edge to the Group entity was cleared.

func (*PermissionPolicyMutation) GroupID

func (m *PermissionPolicyMutation) GroupID() (id uuid.UUID, exists bool)

GroupID returns the "group" edge ID in the mutation.

func (*PermissionPolicyMutation) GroupIDs

func (m *PermissionPolicyMutation) GroupIDs() (ids []uuid.UUID)

GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.

func (*PermissionPolicyMutation) ID

func (m *PermissionPolicyMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PermissionPolicyMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PermissionPolicyMutation) IsInherited

func (m *PermissionPolicyMutation) IsInherited() (r bool, exists bool)

IsInherited returns the value of the "is_inherited" field in the mutation.

func (*PermissionPolicyMutation) IsInheritedCleared

func (m *PermissionPolicyMutation) IsInheritedCleared() bool

IsInheritedCleared returns if the "is_inherited" field was cleared in this mutation.

func (*PermissionPolicyMutation) OldCreatedAt

func (m *PermissionPolicyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the PermissionPolicy entity. If the PermissionPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionPolicyMutation) OldField

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) OldIsInherited

func (m *PermissionPolicyMutation) OldIsInherited(ctx context.Context) (v bool, err error)

OldIsInherited returns the old "is_inherited" field's value of the PermissionPolicy entity. If the PermissionPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionPolicyMutation) OldType

OldType returns the old "type" field's value of the PermissionPolicy entity. If the PermissionPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionPolicyMutation) OldUpdatedAt

func (m *PermissionPolicyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the PermissionPolicy entity. If the PermissionPolicy object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermissionPolicyMutation) Op

func (m *PermissionPolicyMutation) Op() Op

Op returns the operation name.

func (*PermissionPolicyMutation) PermissionCleared

func (m *PermissionPolicyMutation) PermissionCleared() bool

PermissionCleared reports if the "permission" edge to the Permission entity was cleared.

func (*PermissionPolicyMutation) PermissionID

func (m *PermissionPolicyMutation) PermissionID() (id uuid.UUID, exists bool)

PermissionID returns the "permission" edge ID in the mutation.

func (*PermissionPolicyMutation) PermissionIDs

func (m *PermissionPolicyMutation) PermissionIDs() (ids []uuid.UUID)

PermissionIDs returns the "permission" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PermissionID instead. It exists only for internal usage by the builders.

func (*PermissionPolicyMutation) RemovedEdges

func (m *PermissionPolicyMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PermissionPolicyMutation) RemovedIDs

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) ResetCreatedAt

func (m *PermissionPolicyMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PermissionPolicyMutation) ResetEdge

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) ResetField

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) ResetGroup

func (m *PermissionPolicyMutation) ResetGroup()

ResetGroup resets all changes to the "group" edge.

func (*PermissionPolicyMutation) ResetIsInherited

func (m *PermissionPolicyMutation) ResetIsInherited()

ResetIsInherited resets all changes to the "is_inherited" field.

func (*PermissionPolicyMutation) ResetPermission

func (m *PermissionPolicyMutation) ResetPermission()

ResetPermission resets all changes to the "permission" edge.

func (*PermissionPolicyMutation) ResetType

func (m *PermissionPolicyMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*PermissionPolicyMutation) ResetUpdatedAt

func (m *PermissionPolicyMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PermissionPolicyMutation) SetCreatedAt

func (m *PermissionPolicyMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PermissionPolicyMutation) SetField

func (m *PermissionPolicyMutation) 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 (*PermissionPolicyMutation) SetGroupID

func (m *PermissionPolicyMutation) SetGroupID(id uuid.UUID)

SetGroupID sets the "group" edge to the Group entity by id.

func (*PermissionPolicyMutation) SetID

func (m *PermissionPolicyMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of PermissionPolicy entities.

func (*PermissionPolicyMutation) SetIsInherited

func (m *PermissionPolicyMutation) SetIsInherited(b bool)

SetIsInherited sets the "is_inherited" field.

func (*PermissionPolicyMutation) SetOp

func (m *PermissionPolicyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PermissionPolicyMutation) SetPermissionID

func (m *PermissionPolicyMutation) SetPermissionID(id uuid.UUID)

SetPermissionID sets the "permission" edge to the Permission entity by id.

func (*PermissionPolicyMutation) SetType

SetType sets the "type" field.

func (*PermissionPolicyMutation) SetUpdatedAt

func (m *PermissionPolicyMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (PermissionPolicyMutation) Tx

func (m PermissionPolicyMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PermissionPolicyMutation) Type

func (m *PermissionPolicyMutation) Type() string

Type returns the node type of this mutation (PermissionPolicy).

func (*PermissionPolicyMutation) TypeCleared

func (m *PermissionPolicyMutation) TypeCleared() bool

TypeCleared returns if the "type" field was cleared in this mutation.

func (*PermissionPolicyMutation) UpdatedAt

func (m *PermissionPolicyMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PermissionPolicyMutation) Where

Where appends a list predicates to the PermissionPolicyMutation builder.

func (*PermissionPolicyMutation) WhereP

func (m *PermissionPolicyMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PermissionPolicyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PermissionPolicyQuery

type PermissionPolicyQuery struct {
	// contains filtered or unexported fields
}

PermissionPolicyQuery is the builder for querying PermissionPolicy entities.

func (*PermissionPolicyQuery) Aggregate

Aggregate returns a PermissionPolicySelect configured with the given aggregations.

func (*PermissionPolicyQuery) All

All executes the query and returns a list of PermissionPolicies.

func (*PermissionPolicyQuery) AllX

AllX is like All, but panics if an error occurs.

func (*PermissionPolicyQuery) Clone

Clone returns a duplicate of the PermissionPolicyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PermissionPolicyQuery) Count

func (ppq *PermissionPolicyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PermissionPolicyQuery) CountX

func (ppq *PermissionPolicyQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PermissionPolicyQuery) Exist

func (ppq *PermissionPolicyQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PermissionPolicyQuery) ExistX

func (ppq *PermissionPolicyQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PermissionPolicyQuery) First

First returns the first PermissionPolicy entity from the query. Returns a *NotFoundError when no PermissionPolicy was found.

func (*PermissionPolicyQuery) FirstID

func (ppq *PermissionPolicyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first PermissionPolicy ID from the query. Returns a *NotFoundError when no PermissionPolicy ID was found.

func (*PermissionPolicyQuery) FirstIDX

func (ppq *PermissionPolicyQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PermissionPolicyQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*PermissionPolicyQuery) GroupBy

func (ppq *PermissionPolicyQuery) GroupBy(field string, fields ...string) *PermissionPolicyGroupBy

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.PermissionPolicy.Query().
	GroupBy(permissionpolicy.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PermissionPolicyQuery) IDs

func (ppq *PermissionPolicyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of PermissionPolicy IDs.

func (*PermissionPolicyQuery) IDsX

func (ppq *PermissionPolicyQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PermissionPolicyQuery) Limit

func (ppq *PermissionPolicyQuery) Limit(limit int) *PermissionPolicyQuery

Limit the number of records to be returned by this query.

func (*PermissionPolicyQuery) Offset

func (ppq *PermissionPolicyQuery) Offset(offset int) *PermissionPolicyQuery

Offset to start from.

func (*PermissionPolicyQuery) Only

Only returns a single PermissionPolicy entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PermissionPolicy entity is found. Returns a *NotFoundError when no PermissionPolicy entities are found.

func (*PermissionPolicyQuery) OnlyID

func (ppq *PermissionPolicyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only PermissionPolicy ID in the query. Returns a *NotSingularError when more than one PermissionPolicy ID is found. Returns a *NotFoundError when no entities are found.

func (*PermissionPolicyQuery) OnlyIDX

func (ppq *PermissionPolicyQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PermissionPolicyQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*PermissionPolicyQuery) Order

Order specifies how the records should be ordered.

func (*PermissionPolicyQuery) QueryGroup

func (ppq *PermissionPolicyQuery) QueryGroup() *GroupQuery

QueryGroup chains the current query on the "group" edge.

func (*PermissionPolicyQuery) QueryPermission

func (ppq *PermissionPolicyQuery) QueryPermission() *PermissionQuery

QueryPermission chains the current query on the "permission" edge.

func (*PermissionPolicyQuery) Select

func (ppq *PermissionPolicyQuery) Select(fields ...string) *PermissionPolicySelect

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.PermissionPolicy.Query().
	Select(permissionpolicy.FieldCreatedAt).
	Scan(ctx, &v)

func (*PermissionPolicyQuery) Unique

func (ppq *PermissionPolicyQuery) Unique(unique bool) *PermissionPolicyQuery

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 (*PermissionPolicyQuery) Where

Where adds a new predicate for the PermissionPolicyQuery builder.

func (*PermissionPolicyQuery) WithGroup

func (ppq *PermissionPolicyQuery) WithGroup(opts ...func(*GroupQuery)) *PermissionPolicyQuery

WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.

func (*PermissionPolicyQuery) WithPermission

func (ppq *PermissionPolicyQuery) WithPermission(opts ...func(*PermissionQuery)) *PermissionPolicyQuery

WithPermission tells the query-builder to eager-load the nodes that are connected to the "permission" edge. The optional arguments are used to configure the query builder of the edge.

type PermissionPolicySelect

type PermissionPolicySelect struct {
	*PermissionPolicyQuery
	// contains filtered or unexported fields
}

PermissionPolicySelect is the builder for selecting fields of PermissionPolicy entities.

func (*PermissionPolicySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*PermissionPolicySelect) Bool

func (s *PermissionPolicySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) BoolX

func (s *PermissionPolicySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PermissionPolicySelect) Bools

func (s *PermissionPolicySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) BoolsX

func (s *PermissionPolicySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PermissionPolicySelect) Float64

func (s *PermissionPolicySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) Float64X

func (s *PermissionPolicySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PermissionPolicySelect) Float64s

func (s *PermissionPolicySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) Float64sX

func (s *PermissionPolicySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PermissionPolicySelect) Int

func (s *PermissionPolicySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) IntX

func (s *PermissionPolicySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PermissionPolicySelect) Ints

func (s *PermissionPolicySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) IntsX

func (s *PermissionPolicySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PermissionPolicySelect) Scan

func (pps *PermissionPolicySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PermissionPolicySelect) ScanX

func (s *PermissionPolicySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PermissionPolicySelect) String

func (s *PermissionPolicySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) StringX

func (s *PermissionPolicySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PermissionPolicySelect) Strings

func (s *PermissionPolicySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PermissionPolicySelect) StringsX

func (s *PermissionPolicySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PermissionPolicyUpdate

type PermissionPolicyUpdate struct {
	// contains filtered or unexported fields
}

PermissionPolicyUpdate is the builder for updating PermissionPolicy entities.

func (*PermissionPolicyUpdate) ClearGroup

ClearGroup clears the "group" edge to the Group entity.

func (*PermissionPolicyUpdate) ClearIsInherited

func (ppu *PermissionPolicyUpdate) ClearIsInherited() *PermissionPolicyUpdate

ClearIsInherited clears the value of the "is_inherited" field.

func (*PermissionPolicyUpdate) ClearPermission

func (ppu *PermissionPolicyUpdate) ClearPermission() *PermissionPolicyUpdate

ClearPermission clears the "permission" edge to the Permission entity.

func (*PermissionPolicyUpdate) ClearType

ClearType clears the value of the "type" field.

func (*PermissionPolicyUpdate) Exec

Exec executes the query.

func (*PermissionPolicyUpdate) ExecX

func (ppu *PermissionPolicyUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionPolicyUpdate) Mutation

Mutation returns the PermissionPolicyMutation object of the builder.

func (*PermissionPolicyUpdate) Save

func (ppu *PermissionPolicyUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PermissionPolicyUpdate) SaveX

func (ppu *PermissionPolicyUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PermissionPolicyUpdate) SetGroup

SetGroup sets the "group" edge to the Group entity.

func (*PermissionPolicyUpdate) SetGroupID

SetGroupID sets the "group" edge to the Group entity by ID.

func (*PermissionPolicyUpdate) SetIsInherited

func (ppu *PermissionPolicyUpdate) SetIsInherited(b bool) *PermissionPolicyUpdate

SetIsInherited sets the "is_inherited" field.

func (*PermissionPolicyUpdate) SetNillableIsInherited

func (ppu *PermissionPolicyUpdate) SetNillableIsInherited(b *bool) *PermissionPolicyUpdate

SetNillableIsInherited sets the "is_inherited" field if the given value is not nil.

func (*PermissionPolicyUpdate) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*PermissionPolicyUpdate) SetPermission

SetPermission sets the "permission" edge to the Permission entity.

func (*PermissionPolicyUpdate) SetPermissionID

func (ppu *PermissionPolicyUpdate) SetPermissionID(id uuid.UUID) *PermissionPolicyUpdate

SetPermissionID sets the "permission" edge to the Permission entity by ID.

func (*PermissionPolicyUpdate) SetType

SetType sets the "type" field.

func (*PermissionPolicyUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*PermissionPolicyUpdate) Where

Where appends a list predicates to the PermissionPolicyUpdate builder.

type PermissionPolicyUpdateOne

type PermissionPolicyUpdateOne struct {
	// contains filtered or unexported fields
}

PermissionPolicyUpdateOne is the builder for updating a single PermissionPolicy entity.

func (*PermissionPolicyUpdateOne) ClearGroup

ClearGroup clears the "group" edge to the Group entity.

func (*PermissionPolicyUpdateOne) ClearIsInherited

func (ppuo *PermissionPolicyUpdateOne) ClearIsInherited() *PermissionPolicyUpdateOne

ClearIsInherited clears the value of the "is_inherited" field.

func (*PermissionPolicyUpdateOne) ClearPermission

func (ppuo *PermissionPolicyUpdateOne) ClearPermission() *PermissionPolicyUpdateOne

ClearPermission clears the "permission" edge to the Permission entity.

func (*PermissionPolicyUpdateOne) ClearType

ClearType clears the value of the "type" field.

func (*PermissionPolicyUpdateOne) Exec

Exec executes the query on the entity.

func (*PermissionPolicyUpdateOne) ExecX

func (ppuo *PermissionPolicyUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionPolicyUpdateOne) Mutation

Mutation returns the PermissionPolicyMutation object of the builder.

func (*PermissionPolicyUpdateOne) Save

Save executes the query and returns the updated PermissionPolicy entity.

func (*PermissionPolicyUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*PermissionPolicyUpdateOne) Select

func (ppuo *PermissionPolicyUpdateOne) Select(field string, fields ...string) *PermissionPolicyUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PermissionPolicyUpdateOne) SetGroup

SetGroup sets the "group" edge to the Group entity.

func (*PermissionPolicyUpdateOne) SetGroupID

SetGroupID sets the "group" edge to the Group entity by ID.

func (*PermissionPolicyUpdateOne) SetIsInherited

func (ppuo *PermissionPolicyUpdateOne) SetIsInherited(b bool) *PermissionPolicyUpdateOne

SetIsInherited sets the "is_inherited" field.

func (*PermissionPolicyUpdateOne) SetNillableIsInherited

func (ppuo *PermissionPolicyUpdateOne) SetNillableIsInherited(b *bool) *PermissionPolicyUpdateOne

SetNillableIsInherited sets the "is_inherited" field if the given value is not nil.

func (*PermissionPolicyUpdateOne) SetNillableType

SetNillableType sets the "type" field if the given value is not nil.

func (*PermissionPolicyUpdateOne) SetPermission

SetPermission sets the "permission" edge to the Permission entity.

func (*PermissionPolicyUpdateOne) SetPermissionID

func (ppuo *PermissionPolicyUpdateOne) SetPermissionID(id uuid.UUID) *PermissionPolicyUpdateOne

SetPermissionID sets the "permission" edge to the Permission entity by ID.

func (*PermissionPolicyUpdateOne) SetType

SetType sets the "type" field.

func (*PermissionPolicyUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*PermissionPolicyUpdateOne) Where

Where appends a list predicates to the PermissionPolicyUpdate builder.

type PermissionQuery

type PermissionQuery struct {
	// contains filtered or unexported fields
}

PermissionQuery is the builder for querying Permission entities.

func (*PermissionQuery) Aggregate

func (pq *PermissionQuery) Aggregate(fns ...AggregateFunc) *PermissionSelect

Aggregate returns a PermissionSelect configured with the given aggregations.

func (*PermissionQuery) All

func (pq *PermissionQuery) All(ctx context.Context) ([]*Permission, error)

All executes the query and returns a list of Permissions.

func (*PermissionQuery) AllX

func (pq *PermissionQuery) AllX(ctx context.Context) []*Permission

AllX is like All, but panics if an error occurs.

func (*PermissionQuery) Clone

func (pq *PermissionQuery) Clone() *PermissionQuery

Clone returns a duplicate of the PermissionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PermissionQuery) Count

func (pq *PermissionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PermissionQuery) CountX

func (pq *PermissionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PermissionQuery) Exist

func (pq *PermissionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PermissionQuery) ExistX

func (pq *PermissionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PermissionQuery) First

func (pq *PermissionQuery) First(ctx context.Context) (*Permission, error)

First returns the first Permission entity from the query. Returns a *NotFoundError when no Permission was found.

func (*PermissionQuery) FirstID

func (pq *PermissionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Permission ID from the query. Returns a *NotFoundError when no Permission ID was found.

func (*PermissionQuery) FirstIDX

func (pq *PermissionQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PermissionQuery) FirstX

func (pq *PermissionQuery) FirstX(ctx context.Context) *Permission

FirstX is like First, but panics if an error occurs.

func (*PermissionQuery) GroupBy

func (pq *PermissionQuery) GroupBy(field string, fields ...string) *PermissionGroupBy

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.Permission.Query().
	GroupBy(permission.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PermissionQuery) IDs

func (pq *PermissionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Permission IDs.

func (*PermissionQuery) IDsX

func (pq *PermissionQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PermissionQuery) Limit

func (pq *PermissionQuery) Limit(limit int) *PermissionQuery

Limit the number of records to be returned by this query.

func (*PermissionQuery) Offset

func (pq *PermissionQuery) Offset(offset int) *PermissionQuery

Offset to start from.

func (*PermissionQuery) Only

func (pq *PermissionQuery) Only(ctx context.Context) (*Permission, error)

Only returns a single Permission entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Permission entity is found. Returns a *NotFoundError when no Permission entities are found.

func (*PermissionQuery) OnlyID

func (pq *PermissionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Permission ID in the query. Returns a *NotSingularError when more than one Permission ID is found. Returns a *NotFoundError when no entities are found.

func (*PermissionQuery) OnlyIDX

func (pq *PermissionQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PermissionQuery) OnlyX

func (pq *PermissionQuery) OnlyX(ctx context.Context) *Permission

OnlyX is like Only, but panics if an error occurs.

func (*PermissionQuery) Order

Order specifies how the records should be ordered.

func (*PermissionQuery) QueryPermissionPolicies

func (pq *PermissionQuery) QueryPermissionPolicies() *PermissionPolicyQuery

QueryPermissionPolicies chains the current query on the "permission_policies" edge.

func (*PermissionQuery) Select

func (pq *PermissionQuery) Select(fields ...string) *PermissionSelect

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.Permission.Query().
	Select(permission.FieldCreatedAt).
	Scan(ctx, &v)

func (*PermissionQuery) Unique

func (pq *PermissionQuery) Unique(unique bool) *PermissionQuery

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 (*PermissionQuery) Where

Where adds a new predicate for the PermissionQuery builder.

func (*PermissionQuery) WithPermissionPolicies

func (pq *PermissionQuery) WithPermissionPolicies(opts ...func(*PermissionPolicyQuery)) *PermissionQuery

WithPermissionPolicies tells the query-builder to eager-load the nodes that are connected to the "permission_policies" edge. The optional arguments are used to configure the query builder of the edge.

type PermissionSelect

type PermissionSelect struct {
	*PermissionQuery
	// contains filtered or unexported fields
}

PermissionSelect is the builder for selecting fields of Permission entities.

func (*PermissionSelect) Aggregate

func (ps *PermissionSelect) Aggregate(fns ...AggregateFunc) *PermissionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PermissionSelect) Bool

func (s *PermissionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) BoolX

func (s *PermissionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PermissionSelect) Bools

func (s *PermissionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) BoolsX

func (s *PermissionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PermissionSelect) Float64

func (s *PermissionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) Float64X

func (s *PermissionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PermissionSelect) Float64s

func (s *PermissionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) Float64sX

func (s *PermissionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PermissionSelect) Int

func (s *PermissionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) IntX

func (s *PermissionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PermissionSelect) Ints

func (s *PermissionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) IntsX

func (s *PermissionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PermissionSelect) Scan

func (ps *PermissionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PermissionSelect) ScanX

func (s *PermissionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PermissionSelect) String

func (s *PermissionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) StringX

func (s *PermissionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PermissionSelect) Strings

func (s *PermissionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PermissionSelect) StringsX

func (s *PermissionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PermissionUpdate

type PermissionUpdate struct {
	// contains filtered or unexported fields
}

PermissionUpdate is the builder for updating Permission entities.

func (*PermissionUpdate) AddPermissionPolicies

func (pu *PermissionUpdate) AddPermissionPolicies(p ...*PermissionPolicy) *PermissionUpdate

AddPermissionPolicies adds the "permission_policies" edges to the PermissionPolicy entity.

func (*PermissionUpdate) AddPermissionPolicyIDs

func (pu *PermissionUpdate) AddPermissionPolicyIDs(ids ...uuid.UUID) *PermissionUpdate

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*PermissionUpdate) ClearPermissionPolicies

func (pu *PermissionUpdate) ClearPermissionPolicies() *PermissionUpdate

ClearPermissionPolicies clears all "permission_policies" edges to the PermissionPolicy entity.

func (*PermissionUpdate) Exec

func (pu *PermissionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PermissionUpdate) ExecX

func (pu *PermissionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionUpdate) Mutation

func (pu *PermissionUpdate) Mutation() *PermissionMutation

Mutation returns the PermissionMutation object of the builder.

func (*PermissionUpdate) RemovePermissionPolicies

func (pu *PermissionUpdate) RemovePermissionPolicies(p ...*PermissionPolicy) *PermissionUpdate

RemovePermissionPolicies removes "permission_policies" edges to PermissionPolicy entities.

func (*PermissionUpdate) RemovePermissionPolicyIDs

func (pu *PermissionUpdate) RemovePermissionPolicyIDs(ids ...uuid.UUID) *PermissionUpdate

RemovePermissionPolicyIDs removes the "permission_policies" edge to PermissionPolicy entities by IDs.

func (*PermissionUpdate) Save

func (pu *PermissionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PermissionUpdate) SaveX

func (pu *PermissionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PermissionUpdate) SetComponent

func (pu *PermissionUpdate) SetComponent(s string) *PermissionUpdate

SetComponent sets the "component" field.

func (*PermissionUpdate) SetDescription

func (pu *PermissionUpdate) SetDescription(s string) *PermissionUpdate

SetDescription sets the "description" field.

func (*PermissionUpdate) SetKey

func (pu *PermissionUpdate) SetKey(s string) *PermissionUpdate

SetKey sets the "key" field.

func (*PermissionUpdate) SetUpdatedAt

func (pu *PermissionUpdate) SetUpdatedAt(t time.Time) *PermissionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpdate) Where

Where appends a list predicates to the PermissionUpdate builder.

type PermissionUpdateOne

type PermissionUpdateOne struct {
	// contains filtered or unexported fields
}

PermissionUpdateOne is the builder for updating a single Permission entity.

func (*PermissionUpdateOne) AddPermissionPolicies

func (puo *PermissionUpdateOne) AddPermissionPolicies(p ...*PermissionPolicy) *PermissionUpdateOne

AddPermissionPolicies adds the "permission_policies" edges to the PermissionPolicy entity.

func (*PermissionUpdateOne) AddPermissionPolicyIDs

func (puo *PermissionUpdateOne) AddPermissionPolicyIDs(ids ...uuid.UUID) *PermissionUpdateOne

AddPermissionPolicyIDs adds the "permission_policies" edge to the PermissionPolicy entity by IDs.

func (*PermissionUpdateOne) ClearPermissionPolicies

func (puo *PermissionUpdateOne) ClearPermissionPolicies() *PermissionUpdateOne

ClearPermissionPolicies clears all "permission_policies" edges to the PermissionPolicy entity.

func (*PermissionUpdateOne) Exec

func (puo *PermissionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PermissionUpdateOne) ExecX

func (puo *PermissionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermissionUpdateOne) Mutation

func (puo *PermissionUpdateOne) Mutation() *PermissionMutation

Mutation returns the PermissionMutation object of the builder.

func (*PermissionUpdateOne) RemovePermissionPolicies

func (puo *PermissionUpdateOne) RemovePermissionPolicies(p ...*PermissionPolicy) *PermissionUpdateOne

RemovePermissionPolicies removes "permission_policies" edges to PermissionPolicy entities.

func (*PermissionUpdateOne) RemovePermissionPolicyIDs

func (puo *PermissionUpdateOne) RemovePermissionPolicyIDs(ids ...uuid.UUID) *PermissionUpdateOne

RemovePermissionPolicyIDs removes the "permission_policies" edge to PermissionPolicy entities by IDs.

func (*PermissionUpdateOne) Save

func (puo *PermissionUpdateOne) Save(ctx context.Context) (*Permission, error)

Save executes the query and returns the updated Permission entity.

func (*PermissionUpdateOne) SaveX

func (puo *PermissionUpdateOne) SaveX(ctx context.Context) *Permission

SaveX is like Save, but panics if an error occurs.

func (*PermissionUpdateOne) Select

func (puo *PermissionUpdateOne) Select(field string, fields ...string) *PermissionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PermissionUpdateOne) SetComponent

func (puo *PermissionUpdateOne) SetComponent(s string) *PermissionUpdateOne

SetComponent sets the "component" field.

func (*PermissionUpdateOne) SetDescription

func (puo *PermissionUpdateOne) SetDescription(s string) *PermissionUpdateOne

SetDescription sets the "description" field.

func (*PermissionUpdateOne) SetKey

SetKey sets the "key" field.

func (*PermissionUpdateOne) SetUpdatedAt

func (puo *PermissionUpdateOne) SetUpdatedAt(t time.Time) *PermissionUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PermissionUpdateOne) Where

Where appends a list predicates to the PermissionUpdate builder.

type Permissions

type Permissions []*Permission

Permissions is a parsable slice of Permission.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Provider

type Provider struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DisplayName holds the value of the "display_name" field.
	DisplayName string `json:"display_name,omitempty"`
	// ProviderGitURL holds the value of the "provider_git_url" field.
	ProviderGitURL string `json:"provider_git_url,omitempty"`
	// ProviderVersion holds the value of the "provider_version" field.
	ProviderVersion string `json:"provider_version,omitempty"`
	// ConfigBytes holds the value of the "config_bytes" field.
	ConfigBytes []byte `json:"config_bytes,omitempty"`
	// IsLoaded holds the value of the "is_loaded" field.
	IsLoaded bool `json:"is_loaded,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProviderQuery when eager-loading is set.
	Edges ProviderEdges `json:"edges"`
	// contains filtered or unexported fields
}

Provider is the model entity for the Provider schema.

func (*Provider) QueryBlueprints

func (pr *Provider) QueryBlueprints() *BlueprintQuery

QueryBlueprints queries the "blueprints" edge of the Provider entity.

func (*Provider) String

func (pr *Provider) String() string

String implements the fmt.Stringer.

func (*Provider) Unwrap

func (pr *Provider) Unwrap() *Provider

Unwrap unwraps the Provider 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 (*Provider) Update

func (pr *Provider) Update() *ProviderUpdateOne

Update returns a builder for updating this Provider. Note that you need to call Provider.Unwrap() before calling this method if this Provider was returned from a transaction, and the transaction was committed or rolled back.

func (*Provider) Value

func (pr *Provider) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Provider. This includes values selected through modifiers, order, etc.

type ProviderClient

type ProviderClient struct {
	// contains filtered or unexported fields
}

ProviderClient is a client for the Provider schema.

func NewProviderClient

func NewProviderClient(c config) *ProviderClient

NewProviderClient returns a client for the Provider from the given config.

func (*ProviderClient) Create

func (c *ProviderClient) Create() *ProviderCreate

Create returns a builder for creating a Provider entity.

func (*ProviderClient) CreateBulk

func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk

CreateBulk returns a builder for creating a bulk of Provider entities.

func (*ProviderClient) Delete

func (c *ProviderClient) Delete() *ProviderDelete

Delete returns a delete builder for Provider.

func (*ProviderClient) DeleteOne

func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProviderClient) DeleteOneID

func (c *ProviderClient) DeleteOneID(id uuid.UUID) *ProviderDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProviderClient) Get

func (c *ProviderClient) Get(ctx context.Context, id uuid.UUID) (*Provider, error)

Get returns a Provider entity by its id.

func (*ProviderClient) GetX

func (c *ProviderClient) GetX(ctx context.Context, id uuid.UUID) *Provider

GetX is like Get, but panics if an error occurs.

func (*ProviderClient) Hooks

func (c *ProviderClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProviderClient) Intercept

func (c *ProviderClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `provider.Intercept(f(g(h())))`.

func (*ProviderClient) Interceptors

func (c *ProviderClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProviderClient) MapCreateBulk

func (c *ProviderClient) MapCreateBulk(slice any, setFunc func(*ProviderCreate, int)) *ProviderCreateBulk

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 (*ProviderClient) Query

func (c *ProviderClient) Query() *ProviderQuery

Query returns a query builder for Provider.

func (*ProviderClient) QueryBlueprints

func (c *ProviderClient) QueryBlueprints(pr *Provider) *BlueprintQuery

QueryBlueprints queries the blueprints edge of a Provider.

func (*ProviderClient) Update

func (c *ProviderClient) Update() *ProviderUpdate

Update returns an update builder for Provider.

func (*ProviderClient) UpdateOne

func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProviderClient) UpdateOneID

func (c *ProviderClient) UpdateOneID(id uuid.UUID) *ProviderUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ProviderClient) Use

func (c *ProviderClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `provider.Hooks(f(g(h())))`.

type ProviderCommand

type ProviderCommand struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CommandType holds the value of the "command_type" field.
	CommandType providercommand.CommandType `json:"command_type,omitempty"`
	// Status holds the value of the "status" field.
	Status providercommand.Status `json:"status,omitempty"`
	// Arguments holds the value of the "arguments" field.
	Arguments []string `json:"arguments,omitempty"`
	// StartTime holds the value of the "start_time" field.
	StartTime time.Time `json:"start_time,omitempty"`
	// EndTime holds the value of the "end_time" field.
	EndTime time.Time `json:"end_time,omitempty"`
	// Output holds the value of the "output" field.
	Output string `json:"output,omitempty"`
	// Error holds the value of the "error" field.
	Error string `json:"error,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ProviderCommandQuery when eager-loading is set.
	Edges ProviderCommandEdges `json:"edges"`
	// contains filtered or unexported fields
}

ProviderCommand is the model entity for the ProviderCommand schema.

func (*ProviderCommand) QueryDeployment

func (pc *ProviderCommand) QueryDeployment() *DeploymentQuery

QueryDeployment queries the "deployment" edge of the ProviderCommand entity.

func (*ProviderCommand) QueryProvider

func (pc *ProviderCommand) QueryProvider() *ProviderQuery

QueryProvider queries the "provider" edge of the ProviderCommand entity.

func (*ProviderCommand) String

func (pc *ProviderCommand) String() string

String implements the fmt.Stringer.

func (*ProviderCommand) Unwrap

func (pc *ProviderCommand) Unwrap() *ProviderCommand

Unwrap unwraps the ProviderCommand 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 (*ProviderCommand) Update

Update returns a builder for updating this ProviderCommand. Note that you need to call ProviderCommand.Unwrap() before calling this method if this ProviderCommand was returned from a transaction, and the transaction was committed or rolled back.

func (*ProviderCommand) Value

func (pc *ProviderCommand) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ProviderCommand. This includes values selected through modifiers, order, etc.

type ProviderCommandClient

type ProviderCommandClient struct {
	// contains filtered or unexported fields
}

ProviderCommandClient is a client for the ProviderCommand schema.

func NewProviderCommandClient

func NewProviderCommandClient(c config) *ProviderCommandClient

NewProviderCommandClient returns a client for the ProviderCommand from the given config.

func (*ProviderCommandClient) Create

Create returns a builder for creating a ProviderCommand entity.

func (*ProviderCommandClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ProviderCommand entities.

func (*ProviderCommandClient) Delete

Delete returns a delete builder for ProviderCommand.

func (*ProviderCommandClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ProviderCommandClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ProviderCommandClient) Get

Get returns a ProviderCommand entity by its id.

func (*ProviderCommandClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ProviderCommandClient) Hooks

func (c *ProviderCommandClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ProviderCommandClient) Intercept

func (c *ProviderCommandClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `providercommand.Intercept(f(g(h())))`.

func (*ProviderCommandClient) Interceptors

func (c *ProviderCommandClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ProviderCommandClient) MapCreateBulk

func (c *ProviderCommandClient) MapCreateBulk(slice any, setFunc func(*ProviderCommandCreate, int)) *ProviderCommandCreateBulk

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 (*ProviderCommandClient) Query

Query returns a query builder for ProviderCommand.

func (*ProviderCommandClient) QueryDeployment

func (c *ProviderCommandClient) QueryDeployment(pc *ProviderCommand) *DeploymentQuery

QueryDeployment queries the deployment edge of a ProviderCommand.

func (*ProviderCommandClient) QueryProvider

func (c *ProviderCommandClient) QueryProvider(pc *ProviderCommand) *ProviderQuery

QueryProvider queries the provider edge of a ProviderCommand.

func (*ProviderCommandClient) Update

Update returns an update builder for ProviderCommand.

func (*ProviderCommandClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ProviderCommandClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ProviderCommandClient) Use

func (c *ProviderCommandClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `providercommand.Hooks(f(g(h())))`.

type ProviderCommandCreate

type ProviderCommandCreate struct {
	// contains filtered or unexported fields
}

ProviderCommandCreate is the builder for creating a ProviderCommand entity.

func (*ProviderCommandCreate) Exec

func (pcc *ProviderCommandCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProviderCommandCreate) ExecX

func (pcc *ProviderCommandCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCommandCreate) Mutation

Mutation returns the ProviderCommandMutation object of the builder.

func (*ProviderCommandCreate) Save

Save creates the ProviderCommand in the database.

func (*ProviderCommandCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ProviderCommandCreate) SetArguments

func (pcc *ProviderCommandCreate) SetArguments(s []string) *ProviderCommandCreate

SetArguments sets the "arguments" field.

func (*ProviderCommandCreate) SetCommandType

SetCommandType sets the "command_type" field.

func (*ProviderCommandCreate) SetCreatedAt

func (pcc *ProviderCommandCreate) SetCreatedAt(t time.Time) *ProviderCommandCreate

SetCreatedAt sets the "created_at" field.

func (*ProviderCommandCreate) SetDeployment

func (pcc *ProviderCommandCreate) SetDeployment(d *Deployment) *ProviderCommandCreate

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ProviderCommandCreate) SetDeploymentID

func (pcc *ProviderCommandCreate) SetDeploymentID(id uuid.UUID) *ProviderCommandCreate

SetDeploymentID sets the "deployment" edge to the Deployment entity by ID.

func (*ProviderCommandCreate) SetEndTime

SetEndTime sets the "end_time" field.

func (*ProviderCommandCreate) SetError

SetError sets the "error" field.

func (*ProviderCommandCreate) SetID

SetID sets the "id" field.

func (*ProviderCommandCreate) SetNillableCreatedAt

func (pcc *ProviderCommandCreate) SetNillableCreatedAt(t *time.Time) *ProviderCommandCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableDeploymentID

func (pcc *ProviderCommandCreate) SetNillableDeploymentID(id *uuid.UUID) *ProviderCommandCreate

SetNillableDeploymentID sets the "deployment" edge to the Deployment entity by ID if the given value is not nil.

func (*ProviderCommandCreate) SetNillableEndTime

func (pcc *ProviderCommandCreate) SetNillableEndTime(t *time.Time) *ProviderCommandCreate

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableError

func (pcc *ProviderCommandCreate) SetNillableError(s *string) *ProviderCommandCreate

SetNillableError sets the "error" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableID

func (pcc *ProviderCommandCreate) SetNillableID(u *uuid.UUID) *ProviderCommandCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableOutput

func (pcc *ProviderCommandCreate) SetNillableOutput(s *string) *ProviderCommandCreate

SetNillableOutput sets the "output" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableStartTime

func (pcc *ProviderCommandCreate) SetNillableStartTime(t *time.Time) *ProviderCommandCreate

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ProviderCommandCreate) SetNillableUpdatedAt

func (pcc *ProviderCommandCreate) SetNillableUpdatedAt(t *time.Time) *ProviderCommandCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProviderCommandCreate) SetOutput

SetOutput sets the "output" field.

func (*ProviderCommandCreate) SetProvider

SetProvider sets the "provider" edge to the Provider entity.

func (*ProviderCommandCreate) SetProviderID

func (pcc *ProviderCommandCreate) SetProviderID(id uuid.UUID) *ProviderCommandCreate

SetProviderID sets the "provider" edge to the Provider entity by ID.

func (*ProviderCommandCreate) SetStartTime

func (pcc *ProviderCommandCreate) SetStartTime(t time.Time) *ProviderCommandCreate

SetStartTime sets the "start_time" field.

func (*ProviderCommandCreate) SetStatus

SetStatus sets the "status" field.

func (*ProviderCommandCreate) SetUpdatedAt

func (pcc *ProviderCommandCreate) SetUpdatedAt(t time.Time) *ProviderCommandCreate

SetUpdatedAt sets the "updated_at" field.

type ProviderCommandCreateBulk

type ProviderCommandCreateBulk struct {
	// contains filtered or unexported fields
}

ProviderCommandCreateBulk is the builder for creating many ProviderCommand entities in bulk.

func (*ProviderCommandCreateBulk) Exec

Exec executes the query.

func (*ProviderCommandCreateBulk) ExecX

func (pccb *ProviderCommandCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCommandCreateBulk) Save

Save creates the ProviderCommand entities in the database.

func (*ProviderCommandCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ProviderCommandDelete

type ProviderCommandDelete struct {
	// contains filtered or unexported fields
}

ProviderCommandDelete is the builder for deleting a ProviderCommand entity.

func (*ProviderCommandDelete) Exec

func (pcd *ProviderCommandDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProviderCommandDelete) ExecX

func (pcd *ProviderCommandDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCommandDelete) Where

Where appends a list predicates to the ProviderCommandDelete builder.

type ProviderCommandDeleteOne

type ProviderCommandDeleteOne struct {
	// contains filtered or unexported fields
}

ProviderCommandDeleteOne is the builder for deleting a single ProviderCommand entity.

func (*ProviderCommandDeleteOne) Exec

Exec executes the deletion query.

func (*ProviderCommandDeleteOne) ExecX

func (pcdo *ProviderCommandDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCommandDeleteOne) Where

Where appends a list predicates to the ProviderCommandDelete builder.

type ProviderCommandEdges

type ProviderCommandEdges struct {
	// Provider holds the value of the provider edge.
	Provider *Provider `json:"provider,omitempty"`
	// Deployment holds the value of the deployment edge.
	Deployment *Deployment `json:"deployment,omitempty"`
	// contains filtered or unexported fields
}

ProviderCommandEdges holds the relations/edges for other nodes in the graph.

func (ProviderCommandEdges) DeploymentOrErr

func (e ProviderCommandEdges) DeploymentOrErr() (*Deployment, error)

DeploymentOrErr returns the Deployment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ProviderCommandEdges) ProviderOrErr

func (e ProviderCommandEdges) ProviderOrErr() (*Provider, error)

ProviderOrErr returns the Provider value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ProviderCommandGroupBy

type ProviderCommandGroupBy struct {
	// contains filtered or unexported fields
}

ProviderCommandGroupBy is the group-by builder for ProviderCommand entities.

func (*ProviderCommandGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ProviderCommandGroupBy) Bool

func (s *ProviderCommandGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) BoolX

func (s *ProviderCommandGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProviderCommandGroupBy) Bools

func (s *ProviderCommandGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) BoolsX

func (s *ProviderCommandGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProviderCommandGroupBy) Float64

func (s *ProviderCommandGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) Float64X

func (s *ProviderCommandGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProviderCommandGroupBy) Float64s

func (s *ProviderCommandGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) Float64sX

func (s *ProviderCommandGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProviderCommandGroupBy) Int

func (s *ProviderCommandGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) IntX

func (s *ProviderCommandGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProviderCommandGroupBy) Ints

func (s *ProviderCommandGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) IntsX

func (s *ProviderCommandGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProviderCommandGroupBy) Scan

func (pcgb *ProviderCommandGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProviderCommandGroupBy) ScanX

func (s *ProviderCommandGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProviderCommandGroupBy) String

func (s *ProviderCommandGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) StringX

func (s *ProviderCommandGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProviderCommandGroupBy) Strings

func (s *ProviderCommandGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProviderCommandGroupBy) StringsX

func (s *ProviderCommandGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProviderCommandMutation

type ProviderCommandMutation struct {
	// contains filtered or unexported fields
}

ProviderCommandMutation represents an operation that mutates the ProviderCommand nodes in the graph.

func (*ProviderCommandMutation) AddField

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) AddedEdges

func (m *ProviderCommandMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProviderCommandMutation) AddedField

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) AddedFields

func (m *ProviderCommandMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProviderCommandMutation) AddedIDs

func (m *ProviderCommandMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProviderCommandMutation) AppendArguments

func (m *ProviderCommandMutation) AppendArguments(s []string)

AppendArguments adds s to the "arguments" field.

func (*ProviderCommandMutation) AppendedArguments

func (m *ProviderCommandMutation) AppendedArguments() ([]string, bool)

AppendedArguments returns the list of values that were appended to the "arguments" field in this mutation.

func (*ProviderCommandMutation) Arguments

func (m *ProviderCommandMutation) Arguments() (r []string, exists bool)

Arguments returns the value of the "arguments" field in the mutation.

func (*ProviderCommandMutation) ArgumentsCleared

func (m *ProviderCommandMutation) ArgumentsCleared() bool

ArgumentsCleared returns if the "arguments" field was cleared in this mutation.

func (*ProviderCommandMutation) ClearArguments

func (m *ProviderCommandMutation) ClearArguments()

ClearArguments clears the value of the "arguments" field.

func (*ProviderCommandMutation) ClearDeployment

func (m *ProviderCommandMutation) ClearDeployment()

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ProviderCommandMutation) ClearEdge

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) ClearEndTime

func (m *ProviderCommandMutation) ClearEndTime()

ClearEndTime clears the value of the "end_time" field.

func (*ProviderCommandMutation) ClearField

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) ClearProvider

func (m *ProviderCommandMutation) ClearProvider()

ClearProvider clears the "provider" edge to the Provider entity.

func (*ProviderCommandMutation) ClearStartTime

func (m *ProviderCommandMutation) ClearStartTime()

ClearStartTime clears the value of the "start_time" field.

func (*ProviderCommandMutation) ClearedEdges

func (m *ProviderCommandMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProviderCommandMutation) ClearedFields

func (m *ProviderCommandMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProviderCommandMutation) Client

func (m ProviderCommandMutation) 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 (*ProviderCommandMutation) CommandType

func (m *ProviderCommandMutation) CommandType() (r providercommand.CommandType, exists bool)

CommandType returns the value of the "command_type" field in the mutation.

func (*ProviderCommandMutation) CreatedAt

func (m *ProviderCommandMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ProviderCommandMutation) DeploymentCleared

func (m *ProviderCommandMutation) DeploymentCleared() bool

DeploymentCleared reports if the "deployment" edge to the Deployment entity was cleared.

func (*ProviderCommandMutation) DeploymentID

func (m *ProviderCommandMutation) DeploymentID() (id uuid.UUID, exists bool)

DeploymentID returns the "deployment" edge ID in the mutation.

func (*ProviderCommandMutation) DeploymentIDs

func (m *ProviderCommandMutation) DeploymentIDs() (ids []uuid.UUID)

DeploymentIDs returns the "deployment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeploymentID instead. It exists only for internal usage by the builders.

func (*ProviderCommandMutation) EdgeCleared

func (m *ProviderCommandMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProviderCommandMutation) EndTime

func (m *ProviderCommandMutation) EndTime() (r time.Time, exists bool)

EndTime returns the value of the "end_time" field in the mutation.

func (*ProviderCommandMutation) EndTimeCleared

func (m *ProviderCommandMutation) EndTimeCleared() bool

EndTimeCleared returns if the "end_time" field was cleared in this mutation.

func (*ProviderCommandMutation) Error

func (m *ProviderCommandMutation) Error() (r string, exists bool)

Error returns the value of the "error" field in the mutation.

func (*ProviderCommandMutation) Field

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) FieldCleared

func (m *ProviderCommandMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProviderCommandMutation) Fields

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) ID

func (m *ProviderCommandMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ProviderCommandMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProviderCommandMutation) OldArguments

func (m *ProviderCommandMutation) OldArguments(ctx context.Context) (v []string, err error)

OldArguments returns the old "arguments" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldCommandType

func (m *ProviderCommandMutation) OldCommandType(ctx context.Context) (v providercommand.CommandType, err error)

OldCommandType returns the old "command_type" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldCreatedAt

func (m *ProviderCommandMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldEndTime

func (m *ProviderCommandMutation) OldEndTime(ctx context.Context) (v time.Time, err error)

OldEndTime returns the old "end_time" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldError

func (m *ProviderCommandMutation) OldError(ctx context.Context) (v string, err error)

OldError returns the old "error" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldField

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) OldOutput

func (m *ProviderCommandMutation) OldOutput(ctx context.Context) (v string, err error)

OldOutput returns the old "output" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldStartTime

func (m *ProviderCommandMutation) OldStartTime(ctx context.Context) (v time.Time, err error)

OldStartTime returns the old "start_time" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldStatus

OldStatus returns the old "status" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) OldUpdatedAt

func (m *ProviderCommandMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ProviderCommand entity. If the ProviderCommand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderCommandMutation) Op

func (m *ProviderCommandMutation) Op() Op

Op returns the operation name.

func (*ProviderCommandMutation) Output

func (m *ProviderCommandMutation) Output() (r string, exists bool)

Output returns the value of the "output" field in the mutation.

func (*ProviderCommandMutation) ProviderCleared

func (m *ProviderCommandMutation) ProviderCleared() bool

ProviderCleared reports if the "provider" edge to the Provider entity was cleared.

func (*ProviderCommandMutation) ProviderID

func (m *ProviderCommandMutation) ProviderID() (id uuid.UUID, exists bool)

ProviderID returns the "provider" edge ID in the mutation.

func (*ProviderCommandMutation) ProviderIDs

func (m *ProviderCommandMutation) ProviderIDs() (ids []uuid.UUID)

ProviderIDs returns the "provider" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProviderID instead. It exists only for internal usage by the builders.

func (*ProviderCommandMutation) RemovedEdges

func (m *ProviderCommandMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProviderCommandMutation) RemovedIDs

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) ResetArguments

func (m *ProviderCommandMutation) ResetArguments()

ResetArguments resets all changes to the "arguments" field.

func (*ProviderCommandMutation) ResetCommandType

func (m *ProviderCommandMutation) ResetCommandType()

ResetCommandType resets all changes to the "command_type" field.

func (*ProviderCommandMutation) ResetCreatedAt

func (m *ProviderCommandMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ProviderCommandMutation) ResetDeployment

func (m *ProviderCommandMutation) ResetDeployment()

ResetDeployment resets all changes to the "deployment" edge.

func (*ProviderCommandMutation) ResetEdge

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) ResetEndTime

func (m *ProviderCommandMutation) ResetEndTime()

ResetEndTime resets all changes to the "end_time" field.

func (*ProviderCommandMutation) ResetError

func (m *ProviderCommandMutation) ResetError()

ResetError resets all changes to the "error" field.

func (*ProviderCommandMutation) ResetField

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) ResetOutput

func (m *ProviderCommandMutation) ResetOutput()

ResetOutput resets all changes to the "output" field.

func (*ProviderCommandMutation) ResetProvider

func (m *ProviderCommandMutation) ResetProvider()

ResetProvider resets all changes to the "provider" edge.

func (*ProviderCommandMutation) ResetStartTime

func (m *ProviderCommandMutation) ResetStartTime()

ResetStartTime resets all changes to the "start_time" field.

func (*ProviderCommandMutation) ResetStatus

func (m *ProviderCommandMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ProviderCommandMutation) ResetUpdatedAt

func (m *ProviderCommandMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ProviderCommandMutation) SetArguments

func (m *ProviderCommandMutation) SetArguments(s []string)

SetArguments sets the "arguments" field.

func (*ProviderCommandMutation) SetCommandType

func (m *ProviderCommandMutation) SetCommandType(pt providercommand.CommandType)

SetCommandType sets the "command_type" field.

func (*ProviderCommandMutation) SetCreatedAt

func (m *ProviderCommandMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ProviderCommandMutation) SetDeploymentID

func (m *ProviderCommandMutation) SetDeploymentID(id uuid.UUID)

SetDeploymentID sets the "deployment" edge to the Deployment entity by id.

func (*ProviderCommandMutation) SetEndTime

func (m *ProviderCommandMutation) SetEndTime(t time.Time)

SetEndTime sets the "end_time" field.

func (*ProviderCommandMutation) SetError

func (m *ProviderCommandMutation) SetError(s string)

SetError sets the "error" field.

func (*ProviderCommandMutation) SetField

func (m *ProviderCommandMutation) 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 (*ProviderCommandMutation) SetID

func (m *ProviderCommandMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ProviderCommand entities.

func (*ProviderCommandMutation) SetOp

func (m *ProviderCommandMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProviderCommandMutation) SetOutput

func (m *ProviderCommandMutation) SetOutput(s string)

SetOutput sets the "output" field.

func (*ProviderCommandMutation) SetProviderID

func (m *ProviderCommandMutation) SetProviderID(id uuid.UUID)

SetProviderID sets the "provider" edge to the Provider entity by id.

func (*ProviderCommandMutation) SetStartTime

func (m *ProviderCommandMutation) SetStartTime(t time.Time)

SetStartTime sets the "start_time" field.

func (*ProviderCommandMutation) SetStatus

SetStatus sets the "status" field.

func (*ProviderCommandMutation) SetUpdatedAt

func (m *ProviderCommandMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ProviderCommandMutation) StartTime

func (m *ProviderCommandMutation) StartTime() (r time.Time, exists bool)

StartTime returns the value of the "start_time" field in the mutation.

func (*ProviderCommandMutation) StartTimeCleared

func (m *ProviderCommandMutation) StartTimeCleared() bool

StartTimeCleared returns if the "start_time" field was cleared in this mutation.

func (*ProviderCommandMutation) Status

func (m *ProviderCommandMutation) Status() (r providercommand.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (ProviderCommandMutation) Tx

func (m ProviderCommandMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProviderCommandMutation) Type

func (m *ProviderCommandMutation) Type() string

Type returns the node type of this mutation (ProviderCommand).

func (*ProviderCommandMutation) UpdatedAt

func (m *ProviderCommandMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ProviderCommandMutation) Where

Where appends a list predicates to the ProviderCommandMutation builder.

func (*ProviderCommandMutation) WhereP

func (m *ProviderCommandMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProviderCommandMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProviderCommandQuery

type ProviderCommandQuery struct {
	// contains filtered or unexported fields
}

ProviderCommandQuery is the builder for querying ProviderCommand entities.

func (*ProviderCommandQuery) Aggregate

Aggregate returns a ProviderCommandSelect configured with the given aggregations.

func (*ProviderCommandQuery) All

All executes the query and returns a list of ProviderCommands.

func (*ProviderCommandQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ProviderCommandQuery) Clone

Clone returns a duplicate of the ProviderCommandQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProviderCommandQuery) Count

func (pcq *ProviderCommandQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProviderCommandQuery) CountX

func (pcq *ProviderCommandQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProviderCommandQuery) Exist

func (pcq *ProviderCommandQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProviderCommandQuery) ExistX

func (pcq *ProviderCommandQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProviderCommandQuery) First

First returns the first ProviderCommand entity from the query. Returns a *NotFoundError when no ProviderCommand was found.

func (*ProviderCommandQuery) FirstID

func (pcq *ProviderCommandQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first ProviderCommand ID from the query. Returns a *NotFoundError when no ProviderCommand ID was found.

func (*ProviderCommandQuery) FirstIDX

func (pcq *ProviderCommandQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProviderCommandQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ProviderCommandQuery) GroupBy

func (pcq *ProviderCommandQuery) GroupBy(field string, fields ...string) *ProviderCommandGroupBy

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.ProviderCommand.Query().
	GroupBy(providercommand.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProviderCommandQuery) IDs

func (pcq *ProviderCommandQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of ProviderCommand IDs.

func (*ProviderCommandQuery) IDsX

func (pcq *ProviderCommandQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ProviderCommandQuery) Limit

func (pcq *ProviderCommandQuery) Limit(limit int) *ProviderCommandQuery

Limit the number of records to be returned by this query.

func (*ProviderCommandQuery) Offset

func (pcq *ProviderCommandQuery) Offset(offset int) *ProviderCommandQuery

Offset to start from.

func (*ProviderCommandQuery) Only

Only returns a single ProviderCommand entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProviderCommand entity is found. Returns a *NotFoundError when no ProviderCommand entities are found.

func (*ProviderCommandQuery) OnlyID

func (pcq *ProviderCommandQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only ProviderCommand ID in the query. Returns a *NotSingularError when more than one ProviderCommand ID is found. Returns a *NotFoundError when no entities are found.

func (*ProviderCommandQuery) OnlyIDX

func (pcq *ProviderCommandQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProviderCommandQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ProviderCommandQuery) Order

Order specifies how the records should be ordered.

func (*ProviderCommandQuery) QueryDeployment

func (pcq *ProviderCommandQuery) QueryDeployment() *DeploymentQuery

QueryDeployment chains the current query on the "deployment" edge.

func (*ProviderCommandQuery) QueryProvider

func (pcq *ProviderCommandQuery) QueryProvider() *ProviderQuery

QueryProvider chains the current query on the "provider" edge.

func (*ProviderCommandQuery) Select

func (pcq *ProviderCommandQuery) Select(fields ...string) *ProviderCommandSelect

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.ProviderCommand.Query().
	Select(providercommand.FieldCreatedAt).
	Scan(ctx, &v)

func (*ProviderCommandQuery) Unique

func (pcq *ProviderCommandQuery) Unique(unique bool) *ProviderCommandQuery

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 (*ProviderCommandQuery) Where

Where adds a new predicate for the ProviderCommandQuery builder.

func (*ProviderCommandQuery) WithDeployment

func (pcq *ProviderCommandQuery) WithDeployment(opts ...func(*DeploymentQuery)) *ProviderCommandQuery

WithDeployment tells the query-builder to eager-load the nodes that are connected to the "deployment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ProviderCommandQuery) WithProvider

func (pcq *ProviderCommandQuery) WithProvider(opts ...func(*ProviderQuery)) *ProviderCommandQuery

WithProvider tells the query-builder to eager-load the nodes that are connected to the "provider" edge. The optional arguments are used to configure the query builder of the edge.

type ProviderCommandSelect

type ProviderCommandSelect struct {
	*ProviderCommandQuery
	// contains filtered or unexported fields
}

ProviderCommandSelect is the builder for selecting fields of ProviderCommand entities.

func (*ProviderCommandSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ProviderCommandSelect) Bool

func (s *ProviderCommandSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) BoolX

func (s *ProviderCommandSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProviderCommandSelect) Bools

func (s *ProviderCommandSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) BoolsX

func (s *ProviderCommandSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProviderCommandSelect) Float64

func (s *ProviderCommandSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) Float64X

func (s *ProviderCommandSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProviderCommandSelect) Float64s

func (s *ProviderCommandSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) Float64sX

func (s *ProviderCommandSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProviderCommandSelect) Int

func (s *ProviderCommandSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) IntX

func (s *ProviderCommandSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProviderCommandSelect) Ints

func (s *ProviderCommandSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) IntsX

func (s *ProviderCommandSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProviderCommandSelect) Scan

func (pcs *ProviderCommandSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProviderCommandSelect) ScanX

func (s *ProviderCommandSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProviderCommandSelect) String

func (s *ProviderCommandSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) StringX

func (s *ProviderCommandSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProviderCommandSelect) Strings

func (s *ProviderCommandSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProviderCommandSelect) StringsX

func (s *ProviderCommandSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProviderCommandUpdate

type ProviderCommandUpdate struct {
	// contains filtered or unexported fields
}

ProviderCommandUpdate is the builder for updating ProviderCommand entities.

func (*ProviderCommandUpdate) AppendArguments

func (pcu *ProviderCommandUpdate) AppendArguments(s []string) *ProviderCommandUpdate

AppendArguments appends s to the "arguments" field.

func (*ProviderCommandUpdate) ClearArguments

func (pcu *ProviderCommandUpdate) ClearArguments() *ProviderCommandUpdate

ClearArguments clears the value of the "arguments" field.

func (*ProviderCommandUpdate) ClearDeployment

func (pcu *ProviderCommandUpdate) ClearDeployment() *ProviderCommandUpdate

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ProviderCommandUpdate) ClearEndTime

func (pcu *ProviderCommandUpdate) ClearEndTime() *ProviderCommandUpdate

ClearEndTime clears the value of the "end_time" field.

func (*ProviderCommandUpdate) ClearProvider

func (pcu *ProviderCommandUpdate) ClearProvider() *ProviderCommandUpdate

ClearProvider clears the "provider" edge to the Provider entity.

func (*ProviderCommandUpdate) ClearStartTime

func (pcu *ProviderCommandUpdate) ClearStartTime() *ProviderCommandUpdate

ClearStartTime clears the value of the "start_time" field.

func (*ProviderCommandUpdate) Exec

func (pcu *ProviderCommandUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProviderCommandUpdate) ExecX

func (pcu *ProviderCommandUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCommandUpdate) Mutation

Mutation returns the ProviderCommandMutation object of the builder.

func (*ProviderCommandUpdate) Save

func (pcu *ProviderCommandUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProviderCommandUpdate) SaveX

func (pcu *ProviderCommandUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProviderCommandUpdate) SetArguments

func (pcu *ProviderCommandUpdate) SetArguments(s []string) *ProviderCommandUpdate

SetArguments sets the "arguments" field.

func (*ProviderCommandUpdate) SetCommandType

SetCommandType sets the "command_type" field.

func (*ProviderCommandUpdate) SetDeployment

func (pcu *ProviderCommandUpdate) SetDeployment(d *Deployment) *ProviderCommandUpdate

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ProviderCommandUpdate) SetDeploymentID

func (pcu *ProviderCommandUpdate) SetDeploymentID(id uuid.UUID) *ProviderCommandUpdate

SetDeploymentID sets the "deployment" edge to the Deployment entity by ID.

func (*ProviderCommandUpdate) SetEndTime

SetEndTime sets the "end_time" field.

func (*ProviderCommandUpdate) SetError

SetError sets the "error" field.

func (*ProviderCommandUpdate) SetNillableDeploymentID

func (pcu *ProviderCommandUpdate) SetNillableDeploymentID(id *uuid.UUID) *ProviderCommandUpdate

SetNillableDeploymentID sets the "deployment" edge to the Deployment entity by ID if the given value is not nil.

func (*ProviderCommandUpdate) SetNillableEndTime

func (pcu *ProviderCommandUpdate) SetNillableEndTime(t *time.Time) *ProviderCommandUpdate

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*ProviderCommandUpdate) SetNillableError

func (pcu *ProviderCommandUpdate) SetNillableError(s *string) *ProviderCommandUpdate

SetNillableError sets the "error" field if the given value is not nil.

func (*ProviderCommandUpdate) SetNillableOutput

func (pcu *ProviderCommandUpdate) SetNillableOutput(s *string) *ProviderCommandUpdate

SetNillableOutput sets the "output" field if the given value is not nil.

func (*ProviderCommandUpdate) SetNillableStartTime

func (pcu *ProviderCommandUpdate) SetNillableStartTime(t *time.Time) *ProviderCommandUpdate

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*ProviderCommandUpdate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ProviderCommandUpdate) SetOutput

SetOutput sets the "output" field.

func (*ProviderCommandUpdate) SetProvider

SetProvider sets the "provider" edge to the Provider entity.

func (*ProviderCommandUpdate) SetProviderID

func (pcu *ProviderCommandUpdate) SetProviderID(id uuid.UUID) *ProviderCommandUpdate

SetProviderID sets the "provider" edge to the Provider entity by ID.

func (*ProviderCommandUpdate) SetStartTime

func (pcu *ProviderCommandUpdate) SetStartTime(t time.Time) *ProviderCommandUpdate

SetStartTime sets the "start_time" field.

func (*ProviderCommandUpdate) SetStatus

SetStatus sets the "status" field.

func (*ProviderCommandUpdate) SetUpdatedAt

func (pcu *ProviderCommandUpdate) SetUpdatedAt(t time.Time) *ProviderCommandUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ProviderCommandUpdate) Where

Where appends a list predicates to the ProviderCommandUpdate builder.

type ProviderCommandUpdateOne

type ProviderCommandUpdateOne struct {
	// contains filtered or unexported fields
}

ProviderCommandUpdateOne is the builder for updating a single ProviderCommand entity.

func (*ProviderCommandUpdateOne) AppendArguments

func (pcuo *ProviderCommandUpdateOne) AppendArguments(s []string) *ProviderCommandUpdateOne

AppendArguments appends s to the "arguments" field.

func (*ProviderCommandUpdateOne) ClearArguments

func (pcuo *ProviderCommandUpdateOne) ClearArguments() *ProviderCommandUpdateOne

ClearArguments clears the value of the "arguments" field.

func (*ProviderCommandUpdateOne) ClearDeployment

func (pcuo *ProviderCommandUpdateOne) ClearDeployment() *ProviderCommandUpdateOne

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ProviderCommandUpdateOne) ClearEndTime

func (pcuo *ProviderCommandUpdateOne) ClearEndTime() *ProviderCommandUpdateOne

ClearEndTime clears the value of the "end_time" field.

func (*ProviderCommandUpdateOne) ClearProvider

func (pcuo *ProviderCommandUpdateOne) ClearProvider() *ProviderCommandUpdateOne

ClearProvider clears the "provider" edge to the Provider entity.

func (*ProviderCommandUpdateOne) ClearStartTime

func (pcuo *ProviderCommandUpdateOne) ClearStartTime() *ProviderCommandUpdateOne

ClearStartTime clears the value of the "start_time" field.

func (*ProviderCommandUpdateOne) Exec

Exec executes the query on the entity.

func (*ProviderCommandUpdateOne) ExecX

func (pcuo *ProviderCommandUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCommandUpdateOne) Mutation

Mutation returns the ProviderCommandMutation object of the builder.

func (*ProviderCommandUpdateOne) Save

Save executes the query and returns the updated ProviderCommand entity.

func (*ProviderCommandUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ProviderCommandUpdateOne) Select

func (pcuo *ProviderCommandUpdateOne) Select(field string, fields ...string) *ProviderCommandUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProviderCommandUpdateOne) SetArguments

func (pcuo *ProviderCommandUpdateOne) SetArguments(s []string) *ProviderCommandUpdateOne

SetArguments sets the "arguments" field.

func (*ProviderCommandUpdateOne) SetCommandType

SetCommandType sets the "command_type" field.

func (*ProviderCommandUpdateOne) SetDeployment

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ProviderCommandUpdateOne) SetDeploymentID

func (pcuo *ProviderCommandUpdateOne) SetDeploymentID(id uuid.UUID) *ProviderCommandUpdateOne

SetDeploymentID sets the "deployment" edge to the Deployment entity by ID.

func (*ProviderCommandUpdateOne) SetEndTime

SetEndTime sets the "end_time" field.

func (*ProviderCommandUpdateOne) SetError

SetError sets the "error" field.

func (*ProviderCommandUpdateOne) SetNillableDeploymentID

func (pcuo *ProviderCommandUpdateOne) SetNillableDeploymentID(id *uuid.UUID) *ProviderCommandUpdateOne

SetNillableDeploymentID sets the "deployment" edge to the Deployment entity by ID if the given value is not nil.

func (*ProviderCommandUpdateOne) SetNillableEndTime

func (pcuo *ProviderCommandUpdateOne) SetNillableEndTime(t *time.Time) *ProviderCommandUpdateOne

SetNillableEndTime sets the "end_time" field if the given value is not nil.

func (*ProviderCommandUpdateOne) SetNillableError

func (pcuo *ProviderCommandUpdateOne) SetNillableError(s *string) *ProviderCommandUpdateOne

SetNillableError sets the "error" field if the given value is not nil.

func (*ProviderCommandUpdateOne) SetNillableOutput

func (pcuo *ProviderCommandUpdateOne) SetNillableOutput(s *string) *ProviderCommandUpdateOne

SetNillableOutput sets the "output" field if the given value is not nil.

func (*ProviderCommandUpdateOne) SetNillableStartTime

func (pcuo *ProviderCommandUpdateOne) SetNillableStartTime(t *time.Time) *ProviderCommandUpdateOne

SetNillableStartTime sets the "start_time" field if the given value is not nil.

func (*ProviderCommandUpdateOne) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ProviderCommandUpdateOne) SetOutput

SetOutput sets the "output" field.

func (*ProviderCommandUpdateOne) SetProvider

SetProvider sets the "provider" edge to the Provider entity.

func (*ProviderCommandUpdateOne) SetProviderID

SetProviderID sets the "provider" edge to the Provider entity by ID.

func (*ProviderCommandUpdateOne) SetStartTime

SetStartTime sets the "start_time" field.

func (*ProviderCommandUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*ProviderCommandUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ProviderCommandUpdateOne) Where

Where appends a list predicates to the ProviderCommandUpdate builder.

type ProviderCommands

type ProviderCommands []*ProviderCommand

ProviderCommands is a parsable slice of ProviderCommand.

type ProviderCreate

type ProviderCreate struct {
	// contains filtered or unexported fields
}

ProviderCreate is the builder for creating a Provider entity.

func (*ProviderCreate) AddBlueprintIDs

func (pc *ProviderCreate) AddBlueprintIDs(ids ...uuid.UUID) *ProviderCreate

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by IDs.

func (*ProviderCreate) AddBlueprints

func (pc *ProviderCreate) AddBlueprints(b ...*Blueprint) *ProviderCreate

AddBlueprints adds the "blueprints" edges to the Blueprint entity.

func (*ProviderCreate) Exec

func (pc *ProviderCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProviderCreate) ExecX

func (pc *ProviderCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCreate) Mutation

func (pc *ProviderCreate) Mutation() *ProviderMutation

Mutation returns the ProviderMutation object of the builder.

func (*ProviderCreate) Save

func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)

Save creates the Provider in the database.

func (*ProviderCreate) SaveX

func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider

SaveX calls Save and panics if Save returns an error.

func (*ProviderCreate) SetConfigBytes

func (pc *ProviderCreate) SetConfigBytes(b []byte) *ProviderCreate

SetConfigBytes sets the "config_bytes" field.

func (*ProviderCreate) SetCreatedAt

func (pc *ProviderCreate) SetCreatedAt(t time.Time) *ProviderCreate

SetCreatedAt sets the "created_at" field.

func (*ProviderCreate) SetDisplayName

func (pc *ProviderCreate) SetDisplayName(s string) *ProviderCreate

SetDisplayName sets the "display_name" field.

func (*ProviderCreate) SetID

func (pc *ProviderCreate) SetID(u uuid.UUID) *ProviderCreate

SetID sets the "id" field.

func (*ProviderCreate) SetIsLoaded

func (pc *ProviderCreate) SetIsLoaded(b bool) *ProviderCreate

SetIsLoaded sets the "is_loaded" field.

func (*ProviderCreate) SetNillableCreatedAt

func (pc *ProviderCreate) SetNillableCreatedAt(t *time.Time) *ProviderCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ProviderCreate) SetNillableID

func (pc *ProviderCreate) SetNillableID(u *uuid.UUID) *ProviderCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ProviderCreate) SetNillableIsLoaded

func (pc *ProviderCreate) SetNillableIsLoaded(b *bool) *ProviderCreate

SetNillableIsLoaded sets the "is_loaded" field if the given value is not nil.

func (*ProviderCreate) SetNillableUpdatedAt

func (pc *ProviderCreate) SetNillableUpdatedAt(t *time.Time) *ProviderCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ProviderCreate) SetProviderGitURL

func (pc *ProviderCreate) SetProviderGitURL(s string) *ProviderCreate

SetProviderGitURL sets the "provider_git_url" field.

func (*ProviderCreate) SetProviderVersion

func (pc *ProviderCreate) SetProviderVersion(s string) *ProviderCreate

SetProviderVersion sets the "provider_version" field.

func (*ProviderCreate) SetUpdatedAt

func (pc *ProviderCreate) SetUpdatedAt(t time.Time) *ProviderCreate

SetUpdatedAt sets the "updated_at" field.

type ProviderCreateBulk

type ProviderCreateBulk struct {
	// contains filtered or unexported fields
}

ProviderCreateBulk is the builder for creating many Provider entities in bulk.

func (*ProviderCreateBulk) Exec

func (pcb *ProviderCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ProviderCreateBulk) ExecX

func (pcb *ProviderCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderCreateBulk) Save

func (pcb *ProviderCreateBulk) Save(ctx context.Context) ([]*Provider, error)

Save creates the Provider entities in the database.

func (*ProviderCreateBulk) SaveX

func (pcb *ProviderCreateBulk) SaveX(ctx context.Context) []*Provider

SaveX is like Save, but panics if an error occurs.

type ProviderDelete

type ProviderDelete struct {
	// contains filtered or unexported fields
}

ProviderDelete is the builder for deleting a Provider entity.

func (*ProviderDelete) Exec

func (pd *ProviderDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ProviderDelete) ExecX

func (pd *ProviderDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ProviderDelete) Where

func (pd *ProviderDelete) Where(ps ...predicate.Provider) *ProviderDelete

Where appends a list predicates to the ProviderDelete builder.

type ProviderDeleteOne

type ProviderDeleteOne struct {
	// contains filtered or unexported fields
}

ProviderDeleteOne is the builder for deleting a single Provider entity.

func (*ProviderDeleteOne) Exec

func (pdo *ProviderDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ProviderDeleteOne) ExecX

func (pdo *ProviderDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderDeleteOne) Where

Where appends a list predicates to the ProviderDelete builder.

type ProviderEdges

type ProviderEdges struct {
	// Blueprints holds the value of the blueprints edge.
	Blueprints []*Blueprint `json:"blueprints,omitempty"`
	// contains filtered or unexported fields
}

ProviderEdges holds the relations/edges for other nodes in the graph.

func (ProviderEdges) BlueprintsOrErr

func (e ProviderEdges) BlueprintsOrErr() ([]*Blueprint, error)

BlueprintsOrErr returns the Blueprints value or an error if the edge was not loaded in eager-loading.

type ProviderGroupBy

type ProviderGroupBy struct {
	// contains filtered or unexported fields
}

ProviderGroupBy is the group-by builder for Provider entities.

func (*ProviderGroupBy) Aggregate

func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ProviderGroupBy) Bool

func (s *ProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) BoolX

func (s *ProviderGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProviderGroupBy) Bools

func (s *ProviderGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) BoolsX

func (s *ProviderGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProviderGroupBy) Float64

func (s *ProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) Float64X

func (s *ProviderGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProviderGroupBy) Float64s

func (s *ProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) Float64sX

func (s *ProviderGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProviderGroupBy) Int

func (s *ProviderGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) IntX

func (s *ProviderGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProviderGroupBy) Ints

func (s *ProviderGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) IntsX

func (s *ProviderGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProviderGroupBy) Scan

func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProviderGroupBy) ScanX

func (s *ProviderGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProviderGroupBy) String

func (s *ProviderGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) StringX

func (s *ProviderGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProviderGroupBy) Strings

func (s *ProviderGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProviderGroupBy) StringsX

func (s *ProviderGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProviderMutation

type ProviderMutation struct {
	// contains filtered or unexported fields
}

ProviderMutation represents an operation that mutates the Provider nodes in the graph.

func (*ProviderMutation) AddBlueprintIDs

func (m *ProviderMutation) AddBlueprintIDs(ids ...uuid.UUID)

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by ids.

func (*ProviderMutation) AddField

func (m *ProviderMutation) 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 (*ProviderMutation) AddedEdges

func (m *ProviderMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ProviderMutation) AddedField

func (m *ProviderMutation) 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 (*ProviderMutation) AddedFields

func (m *ProviderMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ProviderMutation) AddedIDs

func (m *ProviderMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ProviderMutation) BlueprintsCleared

func (m *ProviderMutation) BlueprintsCleared() bool

BlueprintsCleared reports if the "blueprints" edge to the Blueprint entity was cleared.

func (*ProviderMutation) BlueprintsIDs

func (m *ProviderMutation) BlueprintsIDs() (ids []uuid.UUID)

BlueprintsIDs returns the "blueprints" edge IDs in the mutation.

func (*ProviderMutation) ClearBlueprints

func (m *ProviderMutation) ClearBlueprints()

ClearBlueprints clears the "blueprints" edge to the Blueprint entity.

func (*ProviderMutation) ClearEdge

func (m *ProviderMutation) 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 (*ProviderMutation) ClearField

func (m *ProviderMutation) 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 (*ProviderMutation) ClearedEdges

func (m *ProviderMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ProviderMutation) ClearedFields

func (m *ProviderMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ProviderMutation) Client

func (m ProviderMutation) 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 (*ProviderMutation) ConfigBytes

func (m *ProviderMutation) ConfigBytes() (r []byte, exists bool)

ConfigBytes returns the value of the "config_bytes" field in the mutation.

func (*ProviderMutation) CreatedAt

func (m *ProviderMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ProviderMutation) DisplayName

func (m *ProviderMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*ProviderMutation) EdgeCleared

func (m *ProviderMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ProviderMutation) Field

func (m *ProviderMutation) 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 (*ProviderMutation) FieldCleared

func (m *ProviderMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ProviderMutation) Fields

func (m *ProviderMutation) 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 (*ProviderMutation) ID

func (m *ProviderMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ProviderMutation) IDs

func (m *ProviderMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ProviderMutation) IsLoaded

func (m *ProviderMutation) IsLoaded() (r bool, exists bool)

IsLoaded returns the value of the "is_loaded" field in the mutation.

func (*ProviderMutation) OldConfigBytes

func (m *ProviderMutation) OldConfigBytes(ctx context.Context) (v []byte, err error)

OldConfigBytes returns the old "config_bytes" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) OldCreatedAt

func (m *ProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) OldDisplayName

func (m *ProviderMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) OldField

func (m *ProviderMutation) 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 (*ProviderMutation) OldIsLoaded

func (m *ProviderMutation) OldIsLoaded(ctx context.Context) (v bool, err error)

OldIsLoaded returns the old "is_loaded" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) OldProviderGitURL

func (m *ProviderMutation) OldProviderGitURL(ctx context.Context) (v string, err error)

OldProviderGitURL returns the old "provider_git_url" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) OldProviderVersion

func (m *ProviderMutation) OldProviderVersion(ctx context.Context) (v string, err error)

OldProviderVersion returns the old "provider_version" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) OldUpdatedAt

func (m *ProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ProviderMutation) Op

func (m *ProviderMutation) Op() Op

Op returns the operation name.

func (*ProviderMutation) ProviderGitURL

func (m *ProviderMutation) ProviderGitURL() (r string, exists bool)

ProviderGitURL returns the value of the "provider_git_url" field in the mutation.

func (*ProviderMutation) ProviderVersion

func (m *ProviderMutation) ProviderVersion() (r string, exists bool)

ProviderVersion returns the value of the "provider_version" field in the mutation.

func (*ProviderMutation) RemoveBlueprintIDs

func (m *ProviderMutation) RemoveBlueprintIDs(ids ...uuid.UUID)

RemoveBlueprintIDs removes the "blueprints" edge to the Blueprint entity by IDs.

func (*ProviderMutation) RemovedBlueprintsIDs

func (m *ProviderMutation) RemovedBlueprintsIDs() (ids []uuid.UUID)

RemovedBlueprints returns the removed IDs of the "blueprints" edge to the Blueprint entity.

func (*ProviderMutation) RemovedEdges

func (m *ProviderMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ProviderMutation) RemovedIDs

func (m *ProviderMutation) 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 (*ProviderMutation) ResetBlueprints

func (m *ProviderMutation) ResetBlueprints()

ResetBlueprints resets all changes to the "blueprints" edge.

func (*ProviderMutation) ResetConfigBytes

func (m *ProviderMutation) ResetConfigBytes()

ResetConfigBytes resets all changes to the "config_bytes" field.

func (*ProviderMutation) ResetCreatedAt

func (m *ProviderMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ProviderMutation) ResetDisplayName

func (m *ProviderMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*ProviderMutation) ResetEdge

func (m *ProviderMutation) 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 (*ProviderMutation) ResetField

func (m *ProviderMutation) 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 (*ProviderMutation) ResetIsLoaded

func (m *ProviderMutation) ResetIsLoaded()

ResetIsLoaded resets all changes to the "is_loaded" field.

func (*ProviderMutation) ResetProviderGitURL

func (m *ProviderMutation) ResetProviderGitURL()

ResetProviderGitURL resets all changes to the "provider_git_url" field.

func (*ProviderMutation) ResetProviderVersion

func (m *ProviderMutation) ResetProviderVersion()

ResetProviderVersion resets all changes to the "provider_version" field.

func (*ProviderMutation) ResetUpdatedAt

func (m *ProviderMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ProviderMutation) SetConfigBytes

func (m *ProviderMutation) SetConfigBytes(b []byte)

SetConfigBytes sets the "config_bytes" field.

func (*ProviderMutation) SetCreatedAt

func (m *ProviderMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ProviderMutation) SetDisplayName

func (m *ProviderMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*ProviderMutation) SetField

func (m *ProviderMutation) 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 (*ProviderMutation) SetID

func (m *ProviderMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Provider entities.

func (*ProviderMutation) SetIsLoaded

func (m *ProviderMutation) SetIsLoaded(b bool)

SetIsLoaded sets the "is_loaded" field.

func (*ProviderMutation) SetOp

func (m *ProviderMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ProviderMutation) SetProviderGitURL

func (m *ProviderMutation) SetProviderGitURL(s string)

SetProviderGitURL sets the "provider_git_url" field.

func (*ProviderMutation) SetProviderVersion

func (m *ProviderMutation) SetProviderVersion(s string)

SetProviderVersion sets the "provider_version" field.

func (*ProviderMutation) SetUpdatedAt

func (m *ProviderMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (ProviderMutation) Tx

func (m ProviderMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ProviderMutation) Type

func (m *ProviderMutation) Type() string

Type returns the node type of this mutation (Provider).

func (*ProviderMutation) UpdatedAt

func (m *ProviderMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ProviderMutation) Where

func (m *ProviderMutation) Where(ps ...predicate.Provider)

Where appends a list predicates to the ProviderMutation builder.

func (*ProviderMutation) WhereP

func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ProviderQuery

type ProviderQuery struct {
	// contains filtered or unexported fields
}

ProviderQuery is the builder for querying Provider entities.

func (*ProviderQuery) Aggregate

func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect

Aggregate returns a ProviderSelect configured with the given aggregations.

func (*ProviderQuery) All

func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)

All executes the query and returns a list of Providers.

func (*ProviderQuery) AllX

func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider

AllX is like All, but panics if an error occurs.

func (*ProviderQuery) Clone

func (pq *ProviderQuery) Clone() *ProviderQuery

Clone returns a duplicate of the ProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ProviderQuery) Count

func (pq *ProviderQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ProviderQuery) CountX

func (pq *ProviderQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ProviderQuery) Exist

func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ProviderQuery) ExistX

func (pq *ProviderQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ProviderQuery) First

func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)

First returns the first Provider entity from the query. Returns a *NotFoundError when no Provider was found.

func (*ProviderQuery) FirstID

func (pq *ProviderQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Provider ID from the query. Returns a *NotFoundError when no Provider ID was found.

func (*ProviderQuery) FirstIDX

func (pq *ProviderQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ProviderQuery) FirstX

func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider

FirstX is like First, but panics if an error occurs.

func (*ProviderQuery) GroupBy

func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy

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.Provider.Query().
	GroupBy(provider.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ProviderQuery) IDs

func (pq *ProviderQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Provider IDs.

func (*ProviderQuery) IDsX

func (pq *ProviderQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ProviderQuery) Limit

func (pq *ProviderQuery) Limit(limit int) *ProviderQuery

Limit the number of records to be returned by this query.

func (*ProviderQuery) Offset

func (pq *ProviderQuery) Offset(offset int) *ProviderQuery

Offset to start from.

func (*ProviderQuery) Only

func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)

Only returns a single Provider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Provider entity is found. Returns a *NotFoundError when no Provider entities are found.

func (*ProviderQuery) OnlyID

func (pq *ProviderQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Provider ID in the query. Returns a *NotSingularError when more than one Provider ID is found. Returns a *NotFoundError when no entities are found.

func (*ProviderQuery) OnlyIDX

func (pq *ProviderQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ProviderQuery) OnlyX

func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider

OnlyX is like Only, but panics if an error occurs.

func (*ProviderQuery) Order

Order specifies how the records should be ordered.

func (*ProviderQuery) QueryBlueprints

func (pq *ProviderQuery) QueryBlueprints() *BlueprintQuery

QueryBlueprints chains the current query on the "blueprints" edge.

func (*ProviderQuery) Select

func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect

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.Provider.Query().
	Select(provider.FieldCreatedAt).
	Scan(ctx, &v)

func (*ProviderQuery) Unique

func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery

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 (*ProviderQuery) Where

func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery

Where adds a new predicate for the ProviderQuery builder.

func (*ProviderQuery) WithBlueprints

func (pq *ProviderQuery) WithBlueprints(opts ...func(*BlueprintQuery)) *ProviderQuery

WithBlueprints tells the query-builder to eager-load the nodes that are connected to the "blueprints" edge. The optional arguments are used to configure the query builder of the edge.

type ProviderSelect

type ProviderSelect struct {
	*ProviderQuery
	// contains filtered or unexported fields
}

ProviderSelect is the builder for selecting fields of Provider entities.

func (*ProviderSelect) Aggregate

func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ProviderSelect) Bool

func (s *ProviderSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) BoolX

func (s *ProviderSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ProviderSelect) Bools

func (s *ProviderSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) BoolsX

func (s *ProviderSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ProviderSelect) Float64

func (s *ProviderSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) Float64X

func (s *ProviderSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ProviderSelect) Float64s

func (s *ProviderSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) Float64sX

func (s *ProviderSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ProviderSelect) Int

func (s *ProviderSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) IntX

func (s *ProviderSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ProviderSelect) Ints

func (s *ProviderSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) IntsX

func (s *ProviderSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ProviderSelect) Scan

func (ps *ProviderSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ProviderSelect) ScanX

func (s *ProviderSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ProviderSelect) String

func (s *ProviderSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) StringX

func (s *ProviderSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ProviderSelect) Strings

func (s *ProviderSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ProviderSelect) StringsX

func (s *ProviderSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ProviderUpdate

type ProviderUpdate struct {
	// contains filtered or unexported fields
}

ProviderUpdate is the builder for updating Provider entities.

func (*ProviderUpdate) AddBlueprintIDs

func (pu *ProviderUpdate) AddBlueprintIDs(ids ...uuid.UUID) *ProviderUpdate

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by IDs.

func (*ProviderUpdate) AddBlueprints

func (pu *ProviderUpdate) AddBlueprints(b ...*Blueprint) *ProviderUpdate

AddBlueprints adds the "blueprints" edges to the Blueprint entity.

func (*ProviderUpdate) ClearBlueprints

func (pu *ProviderUpdate) ClearBlueprints() *ProviderUpdate

ClearBlueprints clears all "blueprints" edges to the Blueprint entity.

func (*ProviderUpdate) Exec

func (pu *ProviderUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ProviderUpdate) ExecX

func (pu *ProviderUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderUpdate) Mutation

func (pu *ProviderUpdate) Mutation() *ProviderMutation

Mutation returns the ProviderMutation object of the builder.

func (*ProviderUpdate) RemoveBlueprintIDs

func (pu *ProviderUpdate) RemoveBlueprintIDs(ids ...uuid.UUID) *ProviderUpdate

RemoveBlueprintIDs removes the "blueprints" edge to Blueprint entities by IDs.

func (*ProviderUpdate) RemoveBlueprints

func (pu *ProviderUpdate) RemoveBlueprints(b ...*Blueprint) *ProviderUpdate

RemoveBlueprints removes "blueprints" edges to Blueprint entities.

func (*ProviderUpdate) Save

func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ProviderUpdate) SaveX

func (pu *ProviderUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ProviderUpdate) SetConfigBytes

func (pu *ProviderUpdate) SetConfigBytes(b []byte) *ProviderUpdate

SetConfigBytes sets the "config_bytes" field.

func (*ProviderUpdate) SetDisplayName

func (pu *ProviderUpdate) SetDisplayName(s string) *ProviderUpdate

SetDisplayName sets the "display_name" field.

func (*ProviderUpdate) SetIsLoaded

func (pu *ProviderUpdate) SetIsLoaded(b bool) *ProviderUpdate

SetIsLoaded sets the "is_loaded" field.

func (*ProviderUpdate) SetNillableIsLoaded

func (pu *ProviderUpdate) SetNillableIsLoaded(b *bool) *ProviderUpdate

SetNillableIsLoaded sets the "is_loaded" field if the given value is not nil.

func (*ProviderUpdate) SetProviderGitURL

func (pu *ProviderUpdate) SetProviderGitURL(s string) *ProviderUpdate

SetProviderGitURL sets the "provider_git_url" field.

func (*ProviderUpdate) SetProviderVersion

func (pu *ProviderUpdate) SetProviderVersion(s string) *ProviderUpdate

SetProviderVersion sets the "provider_version" field.

func (*ProviderUpdate) SetUpdatedAt

func (pu *ProviderUpdate) SetUpdatedAt(t time.Time) *ProviderUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ProviderUpdate) Where

func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate

Where appends a list predicates to the ProviderUpdate builder.

type ProviderUpdateOne

type ProviderUpdateOne struct {
	// contains filtered or unexported fields
}

ProviderUpdateOne is the builder for updating a single Provider entity.

func (*ProviderUpdateOne) AddBlueprintIDs

func (puo *ProviderUpdateOne) AddBlueprintIDs(ids ...uuid.UUID) *ProviderUpdateOne

AddBlueprintIDs adds the "blueprints" edge to the Blueprint entity by IDs.

func (*ProviderUpdateOne) AddBlueprints

func (puo *ProviderUpdateOne) AddBlueprints(b ...*Blueprint) *ProviderUpdateOne

AddBlueprints adds the "blueprints" edges to the Blueprint entity.

func (*ProviderUpdateOne) ClearBlueprints

func (puo *ProviderUpdateOne) ClearBlueprints() *ProviderUpdateOne

ClearBlueprints clears all "blueprints" edges to the Blueprint entity.

func (*ProviderUpdateOne) Exec

func (puo *ProviderUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ProviderUpdateOne) ExecX

func (puo *ProviderUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ProviderUpdateOne) Mutation

func (puo *ProviderUpdateOne) Mutation() *ProviderMutation

Mutation returns the ProviderMutation object of the builder.

func (*ProviderUpdateOne) RemoveBlueprintIDs

func (puo *ProviderUpdateOne) RemoveBlueprintIDs(ids ...uuid.UUID) *ProviderUpdateOne

RemoveBlueprintIDs removes the "blueprints" edge to Blueprint entities by IDs.

func (*ProviderUpdateOne) RemoveBlueprints

func (puo *ProviderUpdateOne) RemoveBlueprints(b ...*Blueprint) *ProviderUpdateOne

RemoveBlueprints removes "blueprints" edges to Blueprint entities.

func (*ProviderUpdateOne) Save

func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)

Save executes the query and returns the updated Provider entity.

func (*ProviderUpdateOne) SaveX

func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider

SaveX is like Save, but panics if an error occurs.

func (*ProviderUpdateOne) Select

func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ProviderUpdateOne) SetConfigBytes

func (puo *ProviderUpdateOne) SetConfigBytes(b []byte) *ProviderUpdateOne

SetConfigBytes sets the "config_bytes" field.

func (*ProviderUpdateOne) SetDisplayName

func (puo *ProviderUpdateOne) SetDisplayName(s string) *ProviderUpdateOne

SetDisplayName sets the "display_name" field.

func (*ProviderUpdateOne) SetIsLoaded

func (puo *ProviderUpdateOne) SetIsLoaded(b bool) *ProviderUpdateOne

SetIsLoaded sets the "is_loaded" field.

func (*ProviderUpdateOne) SetNillableIsLoaded

func (puo *ProviderUpdateOne) SetNillableIsLoaded(b *bool) *ProviderUpdateOne

SetNillableIsLoaded sets the "is_loaded" field if the given value is not nil.

func (*ProviderUpdateOne) SetProviderGitURL

func (puo *ProviderUpdateOne) SetProviderGitURL(s string) *ProviderUpdateOne

SetProviderGitURL sets the "provider_git_url" field.

func (*ProviderUpdateOne) SetProviderVersion

func (puo *ProviderUpdateOne) SetProviderVersion(s string) *ProviderUpdateOne

SetProviderVersion sets the "provider_version" field.

func (*ProviderUpdateOne) SetUpdatedAt

func (puo *ProviderUpdateOne) SetUpdatedAt(t time.Time) *ProviderUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ProviderUpdateOne) Where

Where appends a list predicates to the ProviderUpdate builder.

type Providers

type Providers []*Provider

Providers is a parsable slice of Provider.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// Blueprint is the client for interacting with the Blueprint builders.
	Blueprint *BlueprintClient
	// Deployment is the client for interacting with the Deployment builders.
	Deployment *DeploymentClient
	// Group is the client for interacting with the Group builders.
	Group *GroupClient
	// Permission is the client for interacting with the Permission builders.
	Permission *PermissionClient
	// PermissionPolicy is the client for interacting with the PermissionPolicy builders.
	PermissionPolicy *PermissionPolicyClient
	// Provider is the client for interacting with the Provider builders.
	Provider *ProviderClient
	// ProviderCommand is the client for interacting with the ProviderCommand builders.
	ProviderCommand *ProviderCommandClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// 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"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"-"`
	// FirstName holds the value of the "first_name" field.
	FirstName string `json:"first_name,omitempty"`
	// LastName holds the value of the "last_name" field.
	LastName string `json:"last_name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryDeployments

func (u *User) QueryDeployments() *DeploymentQuery

QueryDeployments queries the "deployments" edge of the User entity.

func (*User) QueryGroups

func (u *User) QueryGroups() *GroupQuery

QueryGroups queries the "groups" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryDeployments

func (c *UserClient) QueryDeployments(u *User) *DeploymentQuery

QueryDeployments queries the deployments edge of a User.

func (*UserClient) QueryGroups

func (c *UserClient) QueryGroups(u *User) *GroupQuery

QueryGroups queries the groups edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddDeploymentIDs

func (uc *UserCreate) AddDeploymentIDs(ids ...uuid.UUID) *UserCreate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*UserCreate) AddDeployments

func (uc *UserCreate) AddDeployments(d ...*Deployment) *UserCreate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*UserCreate) AddGroupIDs

func (uc *UserCreate) AddGroupIDs(ids ...uuid.UUID) *UserCreate

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*UserCreate) AddGroups

func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate

AddGroups adds the "groups" edges to the Group entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetFirstName

func (uc *UserCreate) SetFirstName(s string) *UserCreate

SetFirstName sets the "first_name" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLastName

func (uc *UserCreate) SetLastName(s string) *UserCreate

SetLastName sets the "last_name" field.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetPassword

func (uc *UserCreate) SetPassword(s string) *UserCreate

SetPassword sets the "password" field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdges

type UserEdges struct {
	// Groups holds the value of the groups edge.
	Groups []*Group `json:"groups,omitempty"`
	// Deployments holds the value of the deployments edge.
	Deployments []*Deployment `json:"deployments,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) DeploymentsOrErr

func (e UserEdges) DeploymentsOrErr() ([]*Deployment, error)

DeploymentsOrErr returns the Deployments value or an error if the edge was not loaded in eager-loading.

func (UserEdges) GroupsOrErr

func (e UserEdges) GroupsOrErr() ([]*Group, error)

GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddDeploymentIDs

func (m *UserMutation) AddDeploymentIDs(ids ...uuid.UUID)

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddGroupIDs

func (m *UserMutation) AddGroupIDs(ids ...uuid.UUID)

AddGroupIDs adds the "groups" edge to the Group entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearDeployments

func (m *UserMutation) ClearDeployments()

ClearDeployments clears the "deployments" edge to the Deployment entity.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearGroups

func (m *UserMutation) ClearGroups()

ClearGroups clears the "groups" edge to the Group entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) DeploymentsCleared

func (m *UserMutation) DeploymentsCleared() bool

DeploymentsCleared reports if the "deployments" edge to the Deployment entity was cleared.

func (*UserMutation) DeploymentsIDs

func (m *UserMutation) DeploymentsIDs() (ids []uuid.UUID)

DeploymentsIDs returns the "deployments" edge IDs in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) FirstName

func (m *UserMutation) FirstName() (r string, exists bool)

FirstName returns the value of the "first_name" field in the mutation.

func (*UserMutation) GroupsCleared

func (m *UserMutation) GroupsCleared() bool

GroupsCleared reports if the "groups" edge to the Group entity was cleared.

func (*UserMutation) GroupsIDs

func (m *UserMutation) GroupsIDs() (ids []uuid.UUID)

GroupsIDs returns the "groups" edge IDs in the mutation.

func (*UserMutation) ID

func (m *UserMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) LastName

func (m *UserMutation) LastName() (r string, exists bool)

LastName returns the value of the "last_name" field in the mutation.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldFirstName

func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)

OldFirstName returns the old "first_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldLastName

func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)

OldLastName returns the old "last_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPassword

func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) Password

func (m *UserMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*UserMutation) RemoveDeploymentIDs

func (m *UserMutation) RemoveDeploymentIDs(ids ...uuid.UUID)

RemoveDeploymentIDs removes the "deployments" edge to the Deployment entity by IDs.

func (*UserMutation) RemoveGroupIDs

func (m *UserMutation) RemoveGroupIDs(ids ...uuid.UUID)

RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.

func (*UserMutation) RemovedDeploymentsIDs

func (m *UserMutation) RemovedDeploymentsIDs() (ids []uuid.UUID)

RemovedDeployments returns the removed IDs of the "deployments" edge to the Deployment entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedGroupsIDs

func (m *UserMutation) RemovedGroupsIDs() (ids []uuid.UUID)

RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetDeployments

func (m *UserMutation) ResetDeployments()

ResetDeployments resets all changes to the "deployments" edge.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetFirstName

func (m *UserMutation) ResetFirstName()

ResetFirstName resets all changes to the "first_name" field.

func (*UserMutation) ResetGroups

func (m *UserMutation) ResetGroups()

ResetGroups resets all changes to the "groups" edge.

func (*UserMutation) ResetLastName

func (m *UserMutation) ResetLastName()

ResetLastName resets all changes to the "last_name" field.

func (*UserMutation) ResetPassword

func (m *UserMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetFirstName

func (m *UserMutation) SetFirstName(s string)

SetFirstName sets the "first_name" field.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLastName

func (m *UserMutation) SetLastName(s string)

SetLastName sets the "last_name" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPassword

func (m *UserMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryDeployments

func (uq *UserQuery) QueryDeployments() *DeploymentQuery

QueryDeployments chains the current query on the "deployments" edge.

func (*UserQuery) QueryGroups

func (uq *UserQuery) QueryGroups() *GroupQuery

QueryGroups chains the current query on the "groups" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreatedAt time.Time `json:"created_at,omitempty"`
}

client.User.Query().
	Select(user.FieldCreatedAt).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithDeployments

func (uq *UserQuery) WithDeployments(opts ...func(*DeploymentQuery)) *UserQuery

WithDeployments tells the query-builder to eager-load the nodes that are connected to the "deployments" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithGroups

func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery

WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddDeploymentIDs

func (uu *UserUpdate) AddDeploymentIDs(ids ...uuid.UUID) *UserUpdate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*UserUpdate) AddDeployments

func (uu *UserUpdate) AddDeployments(d ...*Deployment) *UserUpdate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*UserUpdate) AddGroupIDs

func (uu *UserUpdate) AddGroupIDs(ids ...uuid.UUID) *UserUpdate

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*UserUpdate) AddGroups

func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate

AddGroups adds the "groups" edges to the Group entity.

func (*UserUpdate) ClearDeployments

func (uu *UserUpdate) ClearDeployments() *UserUpdate

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*UserUpdate) ClearGroups

func (uu *UserUpdate) ClearGroups() *UserUpdate

ClearGroups clears all "groups" edges to the Group entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveDeploymentIDs

func (uu *UserUpdate) RemoveDeploymentIDs(ids ...uuid.UUID) *UserUpdate

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*UserUpdate) RemoveDeployments

func (uu *UserUpdate) RemoveDeployments(d ...*Deployment) *UserUpdate

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*UserUpdate) RemoveGroupIDs

func (uu *UserUpdate) RemoveGroupIDs(ids ...uuid.UUID) *UserUpdate

RemoveGroupIDs removes the "groups" edge to Group entities by IDs.

func (*UserUpdate) RemoveGroups

func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate

RemoveGroups removes "groups" edges to Group entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetFirstName

func (uu *UserUpdate) SetFirstName(s string) *UserUpdate

SetFirstName sets the "first_name" field.

func (*UserUpdate) SetLastName

func (uu *UserUpdate) SetLastName(s string) *UserUpdate

SetLastName sets the "last_name" field.

func (*UserUpdate) SetPassword

func (uu *UserUpdate) SetPassword(s string) *UserUpdate

SetPassword sets the "password" field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddDeploymentIDs

func (uuo *UserUpdateOne) AddDeploymentIDs(ids ...uuid.UUID) *UserUpdateOne

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*UserUpdateOne) AddDeployments

func (uuo *UserUpdateOne) AddDeployments(d ...*Deployment) *UserUpdateOne

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*UserUpdateOne) AddGroupIDs

func (uuo *UserUpdateOne) AddGroupIDs(ids ...uuid.UUID) *UserUpdateOne

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*UserUpdateOne) AddGroups

func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne

AddGroups adds the "groups" edges to the Group entity.

func (*UserUpdateOne) ClearDeployments

func (uuo *UserUpdateOne) ClearDeployments() *UserUpdateOne

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*UserUpdateOne) ClearGroups

func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne

ClearGroups clears all "groups" edges to the Group entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveDeploymentIDs

func (uuo *UserUpdateOne) RemoveDeploymentIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*UserUpdateOne) RemoveDeployments

func (uuo *UserUpdateOne) RemoveDeployments(d ...*Deployment) *UserUpdateOne

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*UserUpdateOne) RemoveGroupIDs

func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveGroupIDs removes the "groups" edge to Group entities by IDs.

func (*UserUpdateOne) RemoveGroups

func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne

RemoveGroups removes "groups" edges to Group entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetFirstName

func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne

SetFirstName sets the "first_name" field.

func (*UserUpdateOne) SetLastName

func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne

SetLastName sets the "last_name" field.

func (*UserUpdateOne) SetPassword

func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne

SetPassword sets the "password" field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL