generated

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeAnnotation          = "Annotation"
	TypeAnnotationNamespace = "AnnotationNamespace"
	TypeMetadata            = "Metadata"
	TypeStatus              = "Status"
	TypeStatusNamespace     = "StatusNamespace"
)

Variables

View Source
var (
	// AnnotationOrderFieldCreatedAt orders Annotation by created_at.
	AnnotationOrderFieldCreatedAt = &AnnotationOrderField{
		Value: func(a *Annotation) (ent.Value, error) {
			return a.CreatedAt, nil
		},
		column: annotation.FieldCreatedAt,
		toTerm: annotation.ByCreatedAt,
		toCursor: func(a *Annotation) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.CreatedAt,
			}
		},
	}
	// AnnotationOrderFieldUpdatedAt orders Annotation by updated_at.
	AnnotationOrderFieldUpdatedAt = &AnnotationOrderField{
		Value: func(a *Annotation) (ent.Value, error) {
			return a.UpdatedAt, nil
		},
		column: annotation.FieldUpdatedAt,
		toTerm: annotation.ByUpdatedAt,
		toCursor: func(a *Annotation) Cursor {
			return Cursor{
				ID:    a.ID,
				Value: a.UpdatedAt,
			}
		},
	}
)
View Source
var (
	// AnnotationNamespaceOrderFieldID orders AnnotationNamespace by id.
	AnnotationNamespaceOrderFieldID = &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.ID, nil
		},
		column: annotationnamespace.FieldID,
		toTerm: annotationnamespace.ByID,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{
				ID:    an.ID,
				Value: an.ID,
			}
		},
	}
	// AnnotationNamespaceOrderFieldCreatedAt orders AnnotationNamespace by created_at.
	AnnotationNamespaceOrderFieldCreatedAt = &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.CreatedAt, nil
		},
		column: annotationnamespace.FieldCreatedAt,
		toTerm: annotationnamespace.ByCreatedAt,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{
				ID:    an.ID,
				Value: an.CreatedAt,
			}
		},
	}
	// AnnotationNamespaceOrderFieldUpdatedAt orders AnnotationNamespace by updated_at.
	AnnotationNamespaceOrderFieldUpdatedAt = &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.UpdatedAt, nil
		},
		column: annotationnamespace.FieldUpdatedAt,
		toTerm: annotationnamespace.ByUpdatedAt,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{
				ID:    an.ID,
				Value: an.UpdatedAt,
			}
		},
	}
	// AnnotationNamespaceOrderFieldName orders AnnotationNamespace by name.
	AnnotationNamespaceOrderFieldName = &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.Name, nil
		},
		column: annotationnamespace.FieldName,
		toTerm: annotationnamespace.ByName,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{
				ID:    an.ID,
				Value: an.Name,
			}
		},
	}
	// AnnotationNamespaceOrderFieldOwnerID orders AnnotationNamespace by owner_id.
	AnnotationNamespaceOrderFieldOwnerID = &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.OwnerID, nil
		},
		column: annotationnamespace.FieldOwnerID,
		toTerm: annotationnamespace.ByOwnerID,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{
				ID:    an.ID,
				Value: an.OwnerID,
			}
		},
	}
	// AnnotationNamespaceOrderFieldPrivate orders AnnotationNamespace by private.
	AnnotationNamespaceOrderFieldPrivate = &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.Private, nil
		},
		column: annotationnamespace.FieldPrivate,
		toTerm: annotationnamespace.ByPrivate,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{
				ID:    an.ID,
				Value: an.Private,
			}
		},
	}
)
View Source
var (
	// MetadataOrderFieldCreatedAt orders Metadata by created_at.
	MetadataOrderFieldCreatedAt = &MetadataOrderField{
		Value: func(m *Metadata) (ent.Value, error) {
			return m.CreatedAt, nil
		},
		column: metadata.FieldCreatedAt,
		toTerm: metadata.ByCreatedAt,
		toCursor: func(m *Metadata) Cursor {
			return Cursor{
				ID:    m.ID,
				Value: m.CreatedAt,
			}
		},
	}
	// MetadataOrderFieldUpdatedAt orders Metadata by updated_at.
	MetadataOrderFieldUpdatedAt = &MetadataOrderField{
		Value: func(m *Metadata) (ent.Value, error) {
			return m.UpdatedAt, nil
		},
		column: metadata.FieldUpdatedAt,
		toTerm: metadata.ByUpdatedAt,
		toCursor: func(m *Metadata) Cursor {
			return Cursor{
				ID:    m.ID,
				Value: m.UpdatedAt,
			}
		},
	}
)
View Source
var (
	// StatusOrderFieldCreatedAt orders Status by created_at.
	StatusOrderFieldCreatedAt = &StatusOrderField{
		Value: func(s *Status) (ent.Value, error) {
			return s.CreatedAt, nil
		},
		column: status.FieldCreatedAt,
		toTerm: status.ByCreatedAt,
		toCursor: func(s *Status) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.CreatedAt,
			}
		},
	}
	// StatusOrderFieldUpdatedAt orders Status by updated_at.
	StatusOrderFieldUpdatedAt = &StatusOrderField{
		Value: func(s *Status) (ent.Value, error) {
			return s.UpdatedAt, nil
		},
		column: status.FieldUpdatedAt,
		toTerm: status.ByUpdatedAt,
		toCursor: func(s *Status) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.UpdatedAt,
			}
		},
	}
)
View Source
var (
	// StatusNamespaceOrderFieldID orders StatusNamespace by id.
	StatusNamespaceOrderFieldID = &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.ID, nil
		},
		column: statusnamespace.FieldID,
		toTerm: statusnamespace.ByID,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{
				ID:    sn.ID,
				Value: sn.ID,
			}
		},
	}
	// StatusNamespaceOrderFieldCreatedAt orders StatusNamespace by created_at.
	StatusNamespaceOrderFieldCreatedAt = &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.CreatedAt, nil
		},
		column: statusnamespace.FieldCreatedAt,
		toTerm: statusnamespace.ByCreatedAt,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{
				ID:    sn.ID,
				Value: sn.CreatedAt,
			}
		},
	}
	// StatusNamespaceOrderFieldUpdatedAt orders StatusNamespace by updated_at.
	StatusNamespaceOrderFieldUpdatedAt = &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.UpdatedAt, nil
		},
		column: statusnamespace.FieldUpdatedAt,
		toTerm: statusnamespace.ByUpdatedAt,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{
				ID:    sn.ID,
				Value: sn.UpdatedAt,
			}
		},
	}
	// StatusNamespaceOrderFieldName orders StatusNamespace by name.
	StatusNamespaceOrderFieldName = &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.Name, nil
		},
		column: statusnamespace.FieldName,
		toTerm: statusnamespace.ByName,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{
				ID:    sn.ID,
				Value: sn.Name,
			}
		},
	}
	// StatusNamespaceOrderFieldResourceProviderID orders StatusNamespace by resource_provider_id.
	StatusNamespaceOrderFieldResourceProviderID = &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.ResourceProviderID, nil
		},
		column: statusnamespace.FieldResourceProviderID,
		toTerm: statusnamespace.ByResourceProviderID,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{
				ID:    sn.ID,
				Value: sn.ResourceProviderID,
			}
		},
	}
	// StatusNamespaceOrderFieldPrivate orders StatusNamespace by private.
	StatusNamespaceOrderFieldPrivate = &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.Private, nil
		},
		column: statusnamespace.FieldPrivate,
		toTerm: statusnamespace.ByPrivate,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{
				ID:    sn.ID,
				Value: sn.Private,
			}
		},
	}
)
View Source
var DefaultAnnotationNamespaceOrder = &AnnotationNamespaceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AnnotationNamespaceOrderField{
		Value: func(an *AnnotationNamespace) (ent.Value, error) {
			return an.ID, nil
		},
		column: annotationnamespace.FieldID,
		toTerm: annotationnamespace.ByID,
		toCursor: func(an *AnnotationNamespace) Cursor {
			return Cursor{ID: an.ID}
		},
	},
}

DefaultAnnotationNamespaceOrder is the default ordering of AnnotationNamespace.

View Source
var DefaultAnnotationOrder = &AnnotationOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &AnnotationOrderField{
		Value: func(a *Annotation) (ent.Value, error) {
			return a.ID, nil
		},
		column: annotation.FieldID,
		toTerm: annotation.ByID,
		toCursor: func(a *Annotation) Cursor {
			return Cursor{ID: a.ID}
		},
	},
}

DefaultAnnotationOrder is the default ordering of Annotation.

View Source
var DefaultMetadataOrder = &MetadataOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MetadataOrderField{
		Value: func(m *Metadata) (ent.Value, error) {
			return m.ID, nil
		},
		column: metadata.FieldID,
		toTerm: metadata.ByID,
		toCursor: func(m *Metadata) Cursor {
			return Cursor{ID: m.ID}
		},
	},
}

DefaultMetadataOrder is the default ordering of Metadata.

View Source
var DefaultStatusNamespaceOrder = &StatusNamespaceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &StatusNamespaceOrderField{
		Value: func(sn *StatusNamespace) (ent.Value, error) {
			return sn.ID, nil
		},
		column: statusnamespace.FieldID,
		toTerm: statusnamespace.ByID,
		toCursor: func(sn *StatusNamespace) Cursor {
			return Cursor{ID: sn.ID}
		},
	},
}

DefaultStatusNamespaceOrder is the default ordering of StatusNamespace.

View Source
var DefaultStatusOrder = &StatusOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &StatusOrderField{
		Value: func(s *Status) (ent.Value, error) {
			return s.ID, nil
		},
		column: status.FieldID,
		toTerm: status.ByID,
		toCursor: func(s *Status) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultStatusOrder is the default ordering of Status.

View Source
var ErrEmptyAnnotationNamespaceWhereInput = errors.New("generated: empty predicate AnnotationNamespaceWhereInput")

ErrEmptyAnnotationNamespaceWhereInput is returned in case the AnnotationNamespaceWhereInput is empty.

View Source
var ErrEmptyAnnotationWhereInput = errors.New("generated: empty predicate AnnotationWhereInput")

ErrEmptyAnnotationWhereInput is returned in case the AnnotationWhereInput is empty.

View Source
var ErrEmptyMetadataWhereInput = errors.New("generated: empty predicate MetadataWhereInput")

ErrEmptyMetadataWhereInput is returned in case the MetadataWhereInput is empty.

View Source
var ErrEmptyStatusNamespaceWhereInput = errors.New("generated: empty predicate StatusNamespaceWhereInput")

ErrEmptyStatusNamespaceWhereInput is returned in case the StatusNamespaceWhereInput is empty.

View Source
var ErrEmptyStatusWhereInput = errors.New("generated: empty predicate StatusWhereInput")

ErrEmptyStatusWhereInput is returned in case the StatusWhereInput is empty.

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

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(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.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 Annotation

type Annotation struct {

	// ID of the ent.
	// ID for the annotation.
	ID gidx.PrefixedID `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"`
	// ID of the metadata of this annotation
	MetadataID gidx.PrefixedID `json:"metadata_id,omitempty"`
	// ID of the AnnotationNamespace of this annotation.
	AnnotationNamespaceID gidx.PrefixedID `json:"annotation_namespace_id,omitempty"`
	// JSON formatted data of this annotation.
	Data json.RawMessage `json:"data,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AnnotationQuery when eager-loading is set.
	Edges AnnotationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Annotation is the model entity for the Annotation schema.

func (Annotation) IsEntity

func (a Annotation) IsEntity()

IsEntity implement fedruntime.Entity

func (*Annotation) IsNode

func (n *Annotation) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Annotation) Metadata

func (a *Annotation) Metadata(ctx context.Context) (*Metadata, error)

func (*Annotation) Namespace

func (a *Annotation) Namespace(ctx context.Context) (*AnnotationNamespace, error)

func (*Annotation) QueryMetadata

func (a *Annotation) QueryMetadata() *MetadataQuery

QueryMetadata queries the "metadata" edge of the Annotation entity.

func (*Annotation) QueryNamespace

func (a *Annotation) QueryNamespace() *AnnotationNamespaceQuery

QueryNamespace queries the "namespace" edge of the Annotation entity.

func (*Annotation) String

func (a *Annotation) String() string

String implements the fmt.Stringer.

func (*Annotation) ToEdge

func (a *Annotation) ToEdge(order *AnnotationOrder) *AnnotationEdge

ToEdge converts Annotation into AnnotationEdge.

func (*Annotation) Unwrap

func (a *Annotation) Unwrap() *Annotation

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

func (a *Annotation) Update() *AnnotationUpdateOne

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

func (*Annotation) Value

func (a *Annotation) Value(name string) (ent.Value, error)

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

type AnnotationClient

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

AnnotationClient is a client for the Annotation schema.

func NewAnnotationClient

func NewAnnotationClient(c config) *AnnotationClient

NewAnnotationClient returns a client for the Annotation from the given config.

func (*AnnotationClient) Create

func (c *AnnotationClient) Create() *AnnotationCreate

Create returns a builder for creating a Annotation entity.

func (*AnnotationClient) CreateBulk

func (c *AnnotationClient) CreateBulk(builders ...*AnnotationCreate) *AnnotationCreateBulk

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

func (*AnnotationClient) Delete

func (c *AnnotationClient) Delete() *AnnotationDelete

Delete returns a delete builder for Annotation.

func (*AnnotationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AnnotationClient) DeleteOneID

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

func (*AnnotationClient) Get

Get returns a Annotation entity by its id.

func (*AnnotationClient) GetX

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

func (*AnnotationClient) Hooks

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

Hooks returns the client hooks.

func (*AnnotationClient) Intercept

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

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

func (*AnnotationClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AnnotationClient) MapCreateBulk added in v0.0.2

func (c *AnnotationClient) MapCreateBulk(slice any, setFunc func(*AnnotationCreate, int)) *AnnotationCreateBulk

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

func (c *AnnotationClient) Query() *AnnotationQuery

Query returns a query builder for Annotation.

func (*AnnotationClient) QueryMetadata

func (c *AnnotationClient) QueryMetadata(a *Annotation) *MetadataQuery

QueryMetadata queries the metadata edge of a Annotation.

func (*AnnotationClient) QueryNamespace

func (c *AnnotationClient) QueryNamespace(a *Annotation) *AnnotationNamespaceQuery

QueryNamespace queries the namespace edge of a Annotation.

func (*AnnotationClient) Update

func (c *AnnotationClient) Update() *AnnotationUpdate

Update returns an update builder for Annotation.

func (*AnnotationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AnnotationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*AnnotationClient) Use

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

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

type AnnotationConnection

type AnnotationConnection struct {
	Edges      []*AnnotationEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

AnnotationConnection is the connection containing edges to Annotation.

type AnnotationCreate

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

AnnotationCreate is the builder for creating a Annotation entity.

func (*AnnotationCreate) Exec

func (ac *AnnotationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AnnotationCreate) ExecX

func (ac *AnnotationCreate) ExecX(ctx context.Context)

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

func (*AnnotationCreate) Mutation

func (ac *AnnotationCreate) Mutation() *AnnotationMutation

Mutation returns the AnnotationMutation object of the builder.

func (*AnnotationCreate) Save

func (ac *AnnotationCreate) Save(ctx context.Context) (*Annotation, error)

Save creates the Annotation in the database.

func (*AnnotationCreate) SaveX

func (ac *AnnotationCreate) SaveX(ctx context.Context) *Annotation

SaveX calls Save and panics if Save returns an error.

func (*AnnotationCreate) SetAnnotationNamespaceID

func (ac *AnnotationCreate) SetAnnotationNamespaceID(gi gidx.PrefixedID) *AnnotationCreate

SetAnnotationNamespaceID sets the "annotation_namespace_id" field.

func (*AnnotationCreate) SetCreatedAt

func (ac *AnnotationCreate) SetCreatedAt(t time.Time) *AnnotationCreate

SetCreatedAt sets the "created_at" field.

func (*AnnotationCreate) SetData

SetData sets the "data" field.

func (*AnnotationCreate) SetID

SetID sets the "id" field.

func (*AnnotationCreate) SetMetadata

func (ac *AnnotationCreate) SetMetadata(m *Metadata) *AnnotationCreate

SetMetadata sets the "metadata" edge to the Metadata entity.

func (*AnnotationCreate) SetMetadataID

func (ac *AnnotationCreate) SetMetadataID(gi gidx.PrefixedID) *AnnotationCreate

SetMetadataID sets the "metadata_id" field.

func (*AnnotationCreate) SetNamespace

SetNamespace sets the "namespace" edge to the AnnotationNamespace entity.

func (*AnnotationCreate) SetNamespaceID

func (ac *AnnotationCreate) SetNamespaceID(id gidx.PrefixedID) *AnnotationCreate

SetNamespaceID sets the "namespace" edge to the AnnotationNamespace entity by ID.

func (*AnnotationCreate) SetNillableCreatedAt

func (ac *AnnotationCreate) SetNillableCreatedAt(t *time.Time) *AnnotationCreate

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

func (*AnnotationCreate) SetNillableID

func (ac *AnnotationCreate) SetNillableID(gi *gidx.PrefixedID) *AnnotationCreate

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

func (*AnnotationCreate) SetNillableUpdatedAt

func (ac *AnnotationCreate) SetNillableUpdatedAt(t *time.Time) *AnnotationCreate

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

func (*AnnotationCreate) SetUpdatedAt

func (ac *AnnotationCreate) SetUpdatedAt(t time.Time) *AnnotationCreate

SetUpdatedAt sets the "updated_at" field.

type AnnotationCreateBulk

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

AnnotationCreateBulk is the builder for creating many Annotation entities in bulk.

func (*AnnotationCreateBulk) Exec

func (acb *AnnotationCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AnnotationCreateBulk) ExecX

func (acb *AnnotationCreateBulk) ExecX(ctx context.Context)

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

func (*AnnotationCreateBulk) Save

func (acb *AnnotationCreateBulk) Save(ctx context.Context) ([]*Annotation, error)

Save creates the Annotation entities in the database.

func (*AnnotationCreateBulk) SaveX

func (acb *AnnotationCreateBulk) SaveX(ctx context.Context) []*Annotation

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

type AnnotationDelete

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

AnnotationDelete is the builder for deleting a Annotation entity.

func (*AnnotationDelete) Exec

func (ad *AnnotationDelete) Exec(ctx context.Context) (int, error)

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

func (*AnnotationDelete) ExecX

func (ad *AnnotationDelete) ExecX(ctx context.Context) int

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

func (*AnnotationDelete) Where

Where appends a list predicates to the AnnotationDelete builder.

type AnnotationDeleteOne

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

AnnotationDeleteOne is the builder for deleting a single Annotation entity.

func (*AnnotationDeleteOne) Exec

func (ado *AnnotationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AnnotationDeleteOne) ExecX

func (ado *AnnotationDeleteOne) ExecX(ctx context.Context)

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

func (*AnnotationDeleteOne) Where

Where appends a list predicates to the AnnotationDelete builder.

type AnnotationEdge

type AnnotationEdge struct {
	Node   *Annotation `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

AnnotationEdge is the edge representation of Annotation.

type AnnotationEdges

type AnnotationEdges struct {
	// Namespace holds the value of the namespace edge.
	Namespace *AnnotationNamespace `json:"namespace,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata *Metadata `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

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

func (AnnotationEdges) MetadataOrErr

func (e AnnotationEdges) MetadataOrErr() (*Metadata, error)

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

func (AnnotationEdges) NamespaceOrErr

func (e AnnotationEdges) NamespaceOrErr() (*AnnotationNamespace, error)

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

type AnnotationGroupBy

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

AnnotationGroupBy is the group-by builder for Annotation entities.

func (*AnnotationGroupBy) Aggregate

func (agb *AnnotationGroupBy) Aggregate(fns ...AggregateFunc) *AnnotationGroupBy

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

func (*AnnotationGroupBy) Bool

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

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

func (*AnnotationGroupBy) BoolX

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

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

func (*AnnotationGroupBy) Bools

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

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

func (*AnnotationGroupBy) BoolsX

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

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

func (*AnnotationGroupBy) Float64

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

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

func (*AnnotationGroupBy) Float64X

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

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

func (*AnnotationGroupBy) Float64s

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

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

func (*AnnotationGroupBy) Float64sX

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

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

func (*AnnotationGroupBy) Int

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

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

func (*AnnotationGroupBy) IntX

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

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

func (*AnnotationGroupBy) Ints

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

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

func (*AnnotationGroupBy) IntsX

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

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

func (*AnnotationGroupBy) Scan

func (agb *AnnotationGroupBy) Scan(ctx context.Context, v any) error

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

func (*AnnotationGroupBy) ScanX

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

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

func (*AnnotationGroupBy) String

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

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

func (*AnnotationGroupBy) StringX

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

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

func (*AnnotationGroupBy) Strings

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

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

func (*AnnotationGroupBy) StringsX

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

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

type AnnotationMutation

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

AnnotationMutation represents an operation that mutates the Annotation nodes in the graph.

func (*AnnotationMutation) AddField

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

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

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

func (*AnnotationMutation) AddedField

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

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

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

func (*AnnotationMutation) AddedIDs

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

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

func (*AnnotationMutation) AnnotationNamespaceID

func (m *AnnotationMutation) AnnotationNamespaceID() (r gidx.PrefixedID, exists bool)

AnnotationNamespaceID returns the value of the "annotation_namespace_id" field in the mutation.

func (*AnnotationMutation) AppendData

func (m *AnnotationMutation) AppendData(jm json.RawMessage)

AppendData adds jm to the "data" field.

func (*AnnotationMutation) AppendedData

func (m *AnnotationMutation) AppendedData() (json.RawMessage, bool)

AppendedData returns the list of values that were appended to the "data" field in this mutation.

func (*AnnotationMutation) ClearEdge

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

func (m *AnnotationMutation) 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 (*AnnotationMutation) ClearMetadata

func (m *AnnotationMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the Metadata entity.

func (*AnnotationMutation) ClearNamespace

func (m *AnnotationMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the AnnotationNamespace entity.

func (*AnnotationMutation) ClearedEdges

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

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

func (*AnnotationMutation) ClearedFields

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

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

func (AnnotationMutation) Client

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

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

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

func (*AnnotationMutation) Data

func (m *AnnotationMutation) Data() (r json.RawMessage, exists bool)

Data returns the value of the "data" field in the mutation.

func (*AnnotationMutation) EdgeCleared

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

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

func (*AnnotationMutation) Field

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

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

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

func (*AnnotationMutation) Fields

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

func (m *AnnotationMutation) ID() (id gidx.PrefixedID, 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 (*AnnotationMutation) 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 (*AnnotationMutation) MetadataCleared

func (m *AnnotationMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the Metadata entity was cleared.

func (*AnnotationMutation) MetadataID

func (m *AnnotationMutation) MetadataID() (r gidx.PrefixedID, exists bool)

MetadataID returns the value of the "metadata_id" field in the mutation.

func (*AnnotationMutation) MetadataIDs

func (m *AnnotationMutation) MetadataIDs() (ids []gidx.PrefixedID)

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

func (*AnnotationMutation) NamespaceCleared

func (m *AnnotationMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the AnnotationNamespace entity was cleared.

func (*AnnotationMutation) NamespaceID

func (m *AnnotationMutation) NamespaceID() (id gidx.PrefixedID, exists bool)

NamespaceID returns the "namespace" edge ID in the mutation.

func (*AnnotationMutation) NamespaceIDs

func (m *AnnotationMutation) NamespaceIDs() (ids []gidx.PrefixedID)

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

func (*AnnotationMutation) OldAnnotationNamespaceID

func (m *AnnotationMutation) OldAnnotationNamespaceID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*AnnotationMutation) OldCreatedAt

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

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

func (*AnnotationMutation) OldData

func (m *AnnotationMutation) OldData(ctx context.Context) (v json.RawMessage, err error)

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

func (*AnnotationMutation) OldField

func (m *AnnotationMutation) 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 (*AnnotationMutation) OldMetadataID

func (m *AnnotationMutation) OldMetadataID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*AnnotationMutation) OldUpdatedAt

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

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

func (*AnnotationMutation) Op

func (m *AnnotationMutation) Op() Op

Op returns the operation name.

func (*AnnotationMutation) RemovedEdges

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

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

func (*AnnotationMutation) RemovedIDs

func (m *AnnotationMutation) 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 (*AnnotationMutation) ResetAnnotationNamespaceID

func (m *AnnotationMutation) ResetAnnotationNamespaceID()

ResetAnnotationNamespaceID resets all changes to the "annotation_namespace_id" field.

func (*AnnotationMutation) ResetCreatedAt

func (m *AnnotationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AnnotationMutation) ResetData

func (m *AnnotationMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*AnnotationMutation) ResetEdge

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

func (m *AnnotationMutation) 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 (*AnnotationMutation) ResetMetadata

func (m *AnnotationMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*AnnotationMutation) ResetMetadataID

func (m *AnnotationMutation) ResetMetadataID()

ResetMetadataID resets all changes to the "metadata_id" field.

func (*AnnotationMutation) ResetNamespace

func (m *AnnotationMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" edge.

func (*AnnotationMutation) ResetUpdatedAt

func (m *AnnotationMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AnnotationMutation) SetAnnotationNamespaceID

func (m *AnnotationMutation) SetAnnotationNamespaceID(gi gidx.PrefixedID)

SetAnnotationNamespaceID sets the "annotation_namespace_id" field.

func (*AnnotationMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AnnotationMutation) SetData

func (m *AnnotationMutation) SetData(jm json.RawMessage)

SetData sets the "data" field.

func (*AnnotationMutation) SetField

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

func (m *AnnotationMutation) SetID(id gidx.PrefixedID)

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

func (*AnnotationMutation) SetMetadataID

func (m *AnnotationMutation) SetMetadataID(gi gidx.PrefixedID)

SetMetadataID sets the "metadata_id" field.

func (*AnnotationMutation) SetNamespaceID

func (m *AnnotationMutation) SetNamespaceID(id gidx.PrefixedID)

SetNamespaceID sets the "namespace" edge to the AnnotationNamespace entity by id.

func (*AnnotationMutation) SetOp

func (m *AnnotationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AnnotationMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (AnnotationMutation) Tx

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

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

func (*AnnotationMutation) Type

func (m *AnnotationMutation) Type() string

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

func (*AnnotationMutation) UpdatedAt

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

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

func (*AnnotationMutation) Where

func (m *AnnotationMutation) Where(ps ...predicate.Annotation)

Where appends a list predicates to the AnnotationMutation builder.

func (*AnnotationMutation) WhereP

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

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

type AnnotationNamespace

type AnnotationNamespace struct {

	// ID of the ent.
	// The ID for the annotation namespace.
	ID gidx.PrefixedID `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"`
	// The name of the annotation namespace.
	Name string `json:"name,omitempty"`
	// The ID for the owner for this annotation namespace.
	OwnerID gidx.PrefixedID `json:"owner_id,omitempty"`
	// Flag for if this namespace is private.
	Private bool `json:"private,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AnnotationNamespaceQuery when eager-loading is set.
	Edges AnnotationNamespaceEdges `json:"edges"`
	// contains filtered or unexported fields
}

Representation of an annotation namespace. Annotation namespaces are used group annotation data that is provided by the same source and uses the same schema.

func (*AnnotationNamespace) Annotations

func (an *AnnotationNamespace) Annotations(ctx context.Context) (result []*Annotation, err error)

func (AnnotationNamespace) IsEntity

func (an AnnotationNamespace) IsEntity()

IsEntity implement fedruntime.Entity

func (*AnnotationNamespace) IsNode

func (n *AnnotationNamespace) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*AnnotationNamespace) NamedAnnotations

func (an *AnnotationNamespace) NamedAnnotations(name string) ([]*Annotation, error)

NamedAnnotations returns the Annotations named value or an error if the edge was not loaded in eager-loading with this name.

func (*AnnotationNamespace) QueryAnnotations

func (an *AnnotationNamespace) QueryAnnotations() *AnnotationQuery

QueryAnnotations queries the "annotations" edge of the AnnotationNamespace entity.

func (*AnnotationNamespace) String

func (an *AnnotationNamespace) String() string

String implements the fmt.Stringer.

func (*AnnotationNamespace) ToEdge

ToEdge converts AnnotationNamespace into AnnotationNamespaceEdge.

func (*AnnotationNamespace) Unwrap

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

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

func (*AnnotationNamespace) Value

func (an *AnnotationNamespace) Value(name string) (ent.Value, error)

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

type AnnotationNamespaceClient

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

AnnotationNamespaceClient is a client for the AnnotationNamespace schema.

func NewAnnotationNamespaceClient

func NewAnnotationNamespaceClient(c config) *AnnotationNamespaceClient

NewAnnotationNamespaceClient returns a client for the AnnotationNamespace from the given config.

func (*AnnotationNamespaceClient) Create

Create returns a builder for creating a AnnotationNamespace entity.

func (*AnnotationNamespaceClient) CreateBulk

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

func (*AnnotationNamespaceClient) Delete

Delete returns a delete builder for AnnotationNamespace.

func (*AnnotationNamespaceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AnnotationNamespaceClient) DeleteOneID

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

func (*AnnotationNamespaceClient) Get

Get returns a AnnotationNamespace entity by its id.

func (*AnnotationNamespaceClient) GetX

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

func (*AnnotationNamespaceClient) Hooks

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

Hooks returns the client hooks.

func (*AnnotationNamespaceClient) Intercept

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

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

func (*AnnotationNamespaceClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AnnotationNamespaceClient) MapCreateBulk added in v0.0.2

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

Query returns a query builder for AnnotationNamespace.

func (*AnnotationNamespaceClient) QueryAnnotations

QueryAnnotations queries the annotations edge of a AnnotationNamespace.

func (*AnnotationNamespaceClient) Update

Update returns an update builder for AnnotationNamespace.

func (*AnnotationNamespaceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AnnotationNamespaceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*AnnotationNamespaceClient) Use

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

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

type AnnotationNamespaceConnection

type AnnotationNamespaceConnection struct {
	Edges      []*AnnotationNamespaceEdge `json:"edges"`
	PageInfo   PageInfo                   `json:"pageInfo"`
	TotalCount int                        `json:"totalCount"`
}

AnnotationNamespaceConnection is the connection containing edges to AnnotationNamespace.

type AnnotationNamespaceCreate

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

AnnotationNamespaceCreate is the builder for creating a AnnotationNamespace entity.

func (*AnnotationNamespaceCreate) AddAnnotationIDs

func (anc *AnnotationNamespaceCreate) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceCreate

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.

func (*AnnotationNamespaceCreate) AddAnnotations

AddAnnotations adds the "annotations" edges to the Annotation entity.

func (*AnnotationNamespaceCreate) Exec

Exec executes the query.

func (*AnnotationNamespaceCreate) ExecX

func (anc *AnnotationNamespaceCreate) ExecX(ctx context.Context)

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

func (*AnnotationNamespaceCreate) Mutation

Mutation returns the AnnotationNamespaceMutation object of the builder.

func (*AnnotationNamespaceCreate) Save

Save creates the AnnotationNamespace in the database.

func (*AnnotationNamespaceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AnnotationNamespaceCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*AnnotationNamespaceCreate) SetID

SetID sets the "id" field.

func (*AnnotationNamespaceCreate) SetInput

SetInput applies the change-set in the CreateAnnotationNamespaceInput on the AnnotationNamespaceCreate builder.

func (*AnnotationNamespaceCreate) SetName

SetName sets the "name" field.

func (*AnnotationNamespaceCreate) SetNillableCreatedAt

func (anc *AnnotationNamespaceCreate) SetNillableCreatedAt(t *time.Time) *AnnotationNamespaceCreate

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

func (*AnnotationNamespaceCreate) SetNillableID

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

func (*AnnotationNamespaceCreate) SetNillablePrivate

func (anc *AnnotationNamespaceCreate) SetNillablePrivate(b *bool) *AnnotationNamespaceCreate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*AnnotationNamespaceCreate) SetNillableUpdatedAt

func (anc *AnnotationNamespaceCreate) SetNillableUpdatedAt(t *time.Time) *AnnotationNamespaceCreate

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

func (*AnnotationNamespaceCreate) SetOwnerID

SetOwnerID sets the "owner_id" field.

func (*AnnotationNamespaceCreate) SetPrivate

SetPrivate sets the "private" field.

func (*AnnotationNamespaceCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type AnnotationNamespaceCreateBulk

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

AnnotationNamespaceCreateBulk is the builder for creating many AnnotationNamespace entities in bulk.

func (*AnnotationNamespaceCreateBulk) Exec

Exec executes the query.

func (*AnnotationNamespaceCreateBulk) ExecX

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

func (*AnnotationNamespaceCreateBulk) Save

Save creates the AnnotationNamespace entities in the database.

func (*AnnotationNamespaceCreateBulk) SaveX

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

type AnnotationNamespaceDelete

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

AnnotationNamespaceDelete is the builder for deleting a AnnotationNamespace entity.

func (*AnnotationNamespaceDelete) Exec

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

func (*AnnotationNamespaceDelete) ExecX

func (and *AnnotationNamespaceDelete) ExecX(ctx context.Context) int

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

func (*AnnotationNamespaceDelete) Where

Where appends a list predicates to the AnnotationNamespaceDelete builder.

type AnnotationNamespaceDeleteOne

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

AnnotationNamespaceDeleteOne is the builder for deleting a single AnnotationNamespace entity.

func (*AnnotationNamespaceDeleteOne) Exec

Exec executes the deletion query.

func (*AnnotationNamespaceDeleteOne) ExecX

func (ando *AnnotationNamespaceDeleteOne) ExecX(ctx context.Context)

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

func (*AnnotationNamespaceDeleteOne) Where

Where appends a list predicates to the AnnotationNamespaceDelete builder.

type AnnotationNamespaceEdge

type AnnotationNamespaceEdge struct {
	Node   *AnnotationNamespace `json:"node"`
	Cursor Cursor               `json:"cursor"`
}

AnnotationNamespaceEdge is the edge representation of AnnotationNamespace.

type AnnotationNamespaceEdges

type AnnotationNamespaceEdges struct {
	// Annotations holds the value of the annotations edge.
	Annotations []*Annotation `json:"annotations,omitempty"`
	// contains filtered or unexported fields
}

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

func (AnnotationNamespaceEdges) AnnotationsOrErr

func (e AnnotationNamespaceEdges) AnnotationsOrErr() ([]*Annotation, error)

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

type AnnotationNamespaceGroupBy

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

AnnotationNamespaceGroupBy is the group-by builder for AnnotationNamespace entities.

func (*AnnotationNamespaceGroupBy) Aggregate

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

func (*AnnotationNamespaceGroupBy) Bool

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

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

func (*AnnotationNamespaceGroupBy) BoolX

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

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

func (*AnnotationNamespaceGroupBy) Bools

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

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

func (*AnnotationNamespaceGroupBy) BoolsX

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

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

func (*AnnotationNamespaceGroupBy) Float64

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

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

func (*AnnotationNamespaceGroupBy) Float64X

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

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

func (*AnnotationNamespaceGroupBy) Float64s

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

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

func (*AnnotationNamespaceGroupBy) Float64sX

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

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

func (*AnnotationNamespaceGroupBy) Int

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

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

func (*AnnotationNamespaceGroupBy) IntX

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

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

func (*AnnotationNamespaceGroupBy) Ints

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

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

func (*AnnotationNamespaceGroupBy) IntsX

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

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

func (*AnnotationNamespaceGroupBy) Scan

func (angb *AnnotationNamespaceGroupBy) Scan(ctx context.Context, v any) error

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

func (*AnnotationNamespaceGroupBy) ScanX

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

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

func (*AnnotationNamespaceGroupBy) String

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

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

func (*AnnotationNamespaceGroupBy) StringX

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

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

func (*AnnotationNamespaceGroupBy) Strings

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

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

func (*AnnotationNamespaceGroupBy) StringsX

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

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

type AnnotationNamespaceMutation

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

AnnotationNamespaceMutation represents an operation that mutates the AnnotationNamespace nodes in the graph.

func (*AnnotationNamespaceMutation) AddAnnotationIDs

func (m *AnnotationNamespaceMutation) AddAnnotationIDs(ids ...gidx.PrefixedID)

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by ids.

func (*AnnotationNamespaceMutation) AddField

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

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

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

func (*AnnotationNamespaceMutation) AddedField

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

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

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

func (*AnnotationNamespaceMutation) AddedIDs

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

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

func (*AnnotationNamespaceMutation) AnnotationsCleared

func (m *AnnotationNamespaceMutation) AnnotationsCleared() bool

AnnotationsCleared reports if the "annotations" edge to the Annotation entity was cleared.

func (*AnnotationNamespaceMutation) AnnotationsIDs

func (m *AnnotationNamespaceMutation) AnnotationsIDs() (ids []gidx.PrefixedID)

AnnotationsIDs returns the "annotations" edge IDs in the mutation.

func (*AnnotationNamespaceMutation) ClearAnnotations

func (m *AnnotationNamespaceMutation) ClearAnnotations()

ClearAnnotations clears the "annotations" edge to the Annotation entity.

func (*AnnotationNamespaceMutation) ClearEdge

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

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

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

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

func (*AnnotationNamespaceMutation) ClearedFields

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

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

func (AnnotationNamespaceMutation) Client

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

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

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

func (*AnnotationNamespaceMutation) EdgeCleared

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

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

func (*AnnotationNamespaceMutation) Field

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

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

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

func (*AnnotationNamespaceMutation) Fields

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

func (m *AnnotationNamespaceMutation) ID() (id gidx.PrefixedID, 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 (*AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) Name

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

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

func (*AnnotationNamespaceMutation) OldCreatedAt

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

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

func (*AnnotationNamespaceMutation) OldField

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

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

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

func (*AnnotationNamespaceMutation) OldOwnerID

func (m *AnnotationNamespaceMutation) OldOwnerID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*AnnotationNamespaceMutation) OldPrivate

func (m *AnnotationNamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)

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

func (*AnnotationNamespaceMutation) OldUpdatedAt

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

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

func (*AnnotationNamespaceMutation) Op

Op returns the operation name.

func (*AnnotationNamespaceMutation) OwnerID

func (m *AnnotationNamespaceMutation) OwnerID() (r gidx.PrefixedID, exists bool)

OwnerID returns the value of the "owner_id" field in the mutation.

func (*AnnotationNamespaceMutation) Private

func (m *AnnotationNamespaceMutation) Private() (r bool, exists bool)

Private returns the value of the "private" field in the mutation.

func (*AnnotationNamespaceMutation) RemoveAnnotationIDs

func (m *AnnotationNamespaceMutation) RemoveAnnotationIDs(ids ...gidx.PrefixedID)

RemoveAnnotationIDs removes the "annotations" edge to the Annotation entity by IDs.

func (*AnnotationNamespaceMutation) RemovedAnnotationsIDs

func (m *AnnotationNamespaceMutation) RemovedAnnotationsIDs() (ids []gidx.PrefixedID)

RemovedAnnotations returns the removed IDs of the "annotations" edge to the Annotation entity.

func (*AnnotationNamespaceMutation) RemovedEdges

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

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

func (*AnnotationNamespaceMutation) RemovedIDs

func (m *AnnotationNamespaceMutation) 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 (*AnnotationNamespaceMutation) ResetAnnotations

func (m *AnnotationNamespaceMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" edge.

func (*AnnotationNamespaceMutation) ResetCreatedAt

func (m *AnnotationNamespaceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AnnotationNamespaceMutation) ResetEdge

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

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

func (m *AnnotationNamespaceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AnnotationNamespaceMutation) ResetOwnerID

func (m *AnnotationNamespaceMutation) ResetOwnerID()

ResetOwnerID resets all changes to the "owner_id" field.

func (*AnnotationNamespaceMutation) ResetPrivate

func (m *AnnotationNamespaceMutation) ResetPrivate()

ResetPrivate resets all changes to the "private" field.

func (*AnnotationNamespaceMutation) ResetUpdatedAt

func (m *AnnotationNamespaceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AnnotationNamespaceMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AnnotationNamespaceMutation) SetField

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

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

func (*AnnotationNamespaceMutation) SetName

func (m *AnnotationNamespaceMutation) SetName(s string)

SetName sets the "name" field.

func (*AnnotationNamespaceMutation) SetOp

func (m *AnnotationNamespaceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AnnotationNamespaceMutation) SetOwnerID

func (m *AnnotationNamespaceMutation) SetOwnerID(gi gidx.PrefixedID)

SetOwnerID sets the "owner_id" field.

func (*AnnotationNamespaceMutation) SetPrivate

func (m *AnnotationNamespaceMutation) SetPrivate(b bool)

SetPrivate sets the "private" field.

func (*AnnotationNamespaceMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (AnnotationNamespaceMutation) Tx

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

func (*AnnotationNamespaceMutation) Type

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

func (*AnnotationNamespaceMutation) UpdatedAt

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

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

func (*AnnotationNamespaceMutation) Where

Where appends a list predicates to the AnnotationNamespaceMutation builder.

func (*AnnotationNamespaceMutation) WhereP

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

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

type AnnotationNamespaceOrder

type AnnotationNamespaceOrder struct {
	Direction OrderDirection                 `json:"direction"`
	Field     *AnnotationNamespaceOrderField `json:"field"`
}

AnnotationNamespaceOrder defines the ordering of AnnotationNamespace.

type AnnotationNamespaceOrderField

type AnnotationNamespaceOrderField struct {
	// Value extracts the ordering value from the given AnnotationNamespace.
	Value func(*AnnotationNamespace) (ent.Value, error)
	// contains filtered or unexported fields
}

AnnotationNamespaceOrderField defines the ordering field of AnnotationNamespace.

func (AnnotationNamespaceOrderField) MarshalGQL

func (f AnnotationNamespaceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AnnotationNamespaceOrderField) String

String implement fmt.Stringer interface.

func (*AnnotationNamespaceOrderField) UnmarshalGQL

func (f *AnnotationNamespaceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AnnotationNamespacePaginateOption

type AnnotationNamespacePaginateOption func(*annotationnamespacePager) error

AnnotationNamespacePaginateOption enables pagination customization.

func WithAnnotationNamespaceFilter

func WithAnnotationNamespaceFilter(filter func(*AnnotationNamespaceQuery) (*AnnotationNamespaceQuery, error)) AnnotationNamespacePaginateOption

WithAnnotationNamespaceFilter configures pagination filter.

func WithAnnotationNamespaceOrder

func WithAnnotationNamespaceOrder(order *AnnotationNamespaceOrder) AnnotationNamespacePaginateOption

WithAnnotationNamespaceOrder configures pagination ordering.

type AnnotationNamespaceQuery

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

AnnotationNamespaceQuery is the builder for querying AnnotationNamespace entities.

func (*AnnotationNamespaceQuery) Aggregate

Aggregate returns a AnnotationNamespaceSelect configured with the given aggregations.

func (*AnnotationNamespaceQuery) All

All executes the query and returns a list of AnnotationNamespaces.

func (*AnnotationNamespaceQuery) AllX

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

func (*AnnotationNamespaceQuery) Clone

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

func (*AnnotationNamespaceQuery) CollectFields

func (an *AnnotationNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*AnnotationNamespaceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AnnotationNamespaceQuery) Count

func (anq *AnnotationNamespaceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AnnotationNamespaceQuery) CountX

func (anq *AnnotationNamespaceQuery) CountX(ctx context.Context) int

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

func (*AnnotationNamespaceQuery) Exist

func (anq *AnnotationNamespaceQuery) Exist(ctx context.Context) (bool, error)

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

func (*AnnotationNamespaceQuery) ExistX

func (anq *AnnotationNamespaceQuery) ExistX(ctx context.Context) bool

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

func (*AnnotationNamespaceQuery) First

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

func (*AnnotationNamespaceQuery) FirstID

func (anq *AnnotationNamespaceQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*AnnotationNamespaceQuery) FirstIDX

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

func (*AnnotationNamespaceQuery) FirstX

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

func (*AnnotationNamespaceQuery) GroupBy

func (anq *AnnotationNamespaceQuery) GroupBy(field string, fields ...string) *AnnotationNamespaceGroupBy

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.AnnotationNamespace.Query().
	GroupBy(annotationnamespace.FieldCreatedAt).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*AnnotationNamespaceQuery) IDs

func (anq *AnnotationNamespaceQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

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

func (*AnnotationNamespaceQuery) IDsX

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

func (*AnnotationNamespaceQuery) Limit

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

func (*AnnotationNamespaceQuery) Offset

Offset to start from.

func (*AnnotationNamespaceQuery) Only

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

func (*AnnotationNamespaceQuery) OnlyID

func (anq *AnnotationNamespaceQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*AnnotationNamespaceQuery) OnlyIDX

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

func (*AnnotationNamespaceQuery) OnlyX

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

func (*AnnotationNamespaceQuery) Order

Order specifies how the records should be ordered.

func (*AnnotationNamespaceQuery) Paginate

func (an *AnnotationNamespaceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AnnotationNamespacePaginateOption,
) (*AnnotationNamespaceConnection, error)

Paginate executes the query and returns a relay based cursor connection to AnnotationNamespace.

func (*AnnotationNamespaceQuery) QueryAnnotations

func (anq *AnnotationNamespaceQuery) QueryAnnotations() *AnnotationQuery

QueryAnnotations chains the current query on the "annotations" edge.

func (*AnnotationNamespaceQuery) Select

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

Example:

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

client.AnnotationNamespace.Query().
	Select(annotationnamespace.FieldCreatedAt).
	Scan(ctx, &v)

func (*AnnotationNamespaceQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*AnnotationNamespaceQuery) Where

Where adds a new predicate for the AnnotationNamespaceQuery builder.

func (*AnnotationNamespaceQuery) WithAnnotations

func (anq *AnnotationNamespaceQuery) WithAnnotations(opts ...func(*AnnotationQuery)) *AnnotationNamespaceQuery

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

func (*AnnotationNamespaceQuery) WithNamedAnnotations

func (anq *AnnotationNamespaceQuery) WithNamedAnnotations(name string, opts ...func(*AnnotationQuery)) *AnnotationNamespaceQuery

WithNamedAnnotations tells the query-builder to eager-load the nodes that are connected to the "annotations" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type AnnotationNamespaceSelect

type AnnotationNamespaceSelect struct {
	*AnnotationNamespaceQuery
	// contains filtered or unexported fields
}

AnnotationNamespaceSelect is the builder for selecting fields of AnnotationNamespace entities.

func (*AnnotationNamespaceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*AnnotationNamespaceSelect) Bool

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

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

func (*AnnotationNamespaceSelect) BoolX

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

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

func (*AnnotationNamespaceSelect) Bools

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

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

func (*AnnotationNamespaceSelect) BoolsX

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

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

func (*AnnotationNamespaceSelect) Float64

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

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

func (*AnnotationNamespaceSelect) Float64X

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

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

func (*AnnotationNamespaceSelect) Float64s

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

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

func (*AnnotationNamespaceSelect) Float64sX

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

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

func (*AnnotationNamespaceSelect) Int

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

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

func (*AnnotationNamespaceSelect) IntX

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

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

func (*AnnotationNamespaceSelect) Ints

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

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

func (*AnnotationNamespaceSelect) IntsX

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

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

func (*AnnotationNamespaceSelect) Scan

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

func (*AnnotationNamespaceSelect) ScanX

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

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

func (*AnnotationNamespaceSelect) String

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

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

func (*AnnotationNamespaceSelect) StringX

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

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

func (*AnnotationNamespaceSelect) Strings

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

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

func (*AnnotationNamespaceSelect) StringsX

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

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

type AnnotationNamespaceUpdate

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

AnnotationNamespaceUpdate is the builder for updating AnnotationNamespace entities.

func (*AnnotationNamespaceUpdate) AddAnnotationIDs

func (anu *AnnotationNamespaceUpdate) AddAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdate

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.

func (*AnnotationNamespaceUpdate) AddAnnotations

AddAnnotations adds the "annotations" edges to the Annotation entity.

func (*AnnotationNamespaceUpdate) ClearAnnotations

func (anu *AnnotationNamespaceUpdate) ClearAnnotations() *AnnotationNamespaceUpdate

ClearAnnotations clears all "annotations" edges to the Annotation entity.

func (*AnnotationNamespaceUpdate) Exec

Exec executes the query.

func (*AnnotationNamespaceUpdate) ExecX

func (anu *AnnotationNamespaceUpdate) ExecX(ctx context.Context)

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

func (*AnnotationNamespaceUpdate) Mutation

Mutation returns the AnnotationNamespaceMutation object of the builder.

func (*AnnotationNamespaceUpdate) RemoveAnnotationIDs

func (anu *AnnotationNamespaceUpdate) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdate

RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.

func (*AnnotationNamespaceUpdate) RemoveAnnotations

func (anu *AnnotationNamespaceUpdate) RemoveAnnotations(a ...*Annotation) *AnnotationNamespaceUpdate

RemoveAnnotations removes "annotations" edges to Annotation entities.

func (*AnnotationNamespaceUpdate) Save

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

func (*AnnotationNamespaceUpdate) SaveX

func (anu *AnnotationNamespaceUpdate) SaveX(ctx context.Context) int

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

func (*AnnotationNamespaceUpdate) SetInput

SetInput applies the change-set in the UpdateAnnotationNamespaceInput on the AnnotationNamespaceUpdate builder.

func (*AnnotationNamespaceUpdate) SetName

SetName sets the "name" field.

func (*AnnotationNamespaceUpdate) SetNillablePrivate

func (anu *AnnotationNamespaceUpdate) SetNillablePrivate(b *bool) *AnnotationNamespaceUpdate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*AnnotationNamespaceUpdate) SetPrivate

SetPrivate sets the "private" field.

func (*AnnotationNamespaceUpdate) Where

Where appends a list predicates to the AnnotationNamespaceUpdate builder.

type AnnotationNamespaceUpdateOne

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

AnnotationNamespaceUpdateOne is the builder for updating a single AnnotationNamespace entity.

func (*AnnotationNamespaceUpdateOne) AddAnnotationIDs

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.

func (*AnnotationNamespaceUpdateOne) AddAnnotations

AddAnnotations adds the "annotations" edges to the Annotation entity.

func (*AnnotationNamespaceUpdateOne) ClearAnnotations

ClearAnnotations clears all "annotations" edges to the Annotation entity.

func (*AnnotationNamespaceUpdateOne) Exec

Exec executes the query on the entity.

func (*AnnotationNamespaceUpdateOne) ExecX

func (anuo *AnnotationNamespaceUpdateOne) ExecX(ctx context.Context)

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

func (*AnnotationNamespaceUpdateOne) Mutation

Mutation returns the AnnotationNamespaceMutation object of the builder.

func (*AnnotationNamespaceUpdateOne) RemoveAnnotationIDs

func (anuo *AnnotationNamespaceUpdateOne) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *AnnotationNamespaceUpdateOne

RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.

func (*AnnotationNamespaceUpdateOne) RemoveAnnotations

RemoveAnnotations removes "annotations" edges to Annotation entities.

func (*AnnotationNamespaceUpdateOne) Save

Save executes the query and returns the updated AnnotationNamespace entity.

func (*AnnotationNamespaceUpdateOne) SaveX

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

func (*AnnotationNamespaceUpdateOne) Select

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

func (*AnnotationNamespaceUpdateOne) SetInput

SetInput applies the change-set in the UpdateAnnotationNamespaceInput on the AnnotationNamespaceUpdateOne builder.

func (*AnnotationNamespaceUpdateOne) SetName

SetName sets the "name" field.

func (*AnnotationNamespaceUpdateOne) SetNillablePrivate

func (anuo *AnnotationNamespaceUpdateOne) SetNillablePrivate(b *bool) *AnnotationNamespaceUpdateOne

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*AnnotationNamespaceUpdateOne) SetPrivate

SetPrivate sets the "private" field.

func (*AnnotationNamespaceUpdateOne) Where

Where appends a list predicates to the AnnotationNamespaceUpdate builder.

type AnnotationNamespaceWhereInput

type AnnotationNamespaceWhereInput struct {
	Predicates []predicate.AnnotationNamespace  `json:"-"`
	Not        *AnnotationNamespaceWhereInput   `json:"not,omitempty"`
	Or         []*AnnotationNamespaceWhereInput `json:"or,omitempty"`
	And        []*AnnotationNamespaceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *gidx.PrefixedID  `json:"id,omitempty"`
	IDNEQ   *gidx.PrefixedID  `json:"idNEQ,omitempty"`
	IDIn    []gidx.PrefixedID `json:"idIn,omitempty"`
	IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"`
	IDGT    *gidx.PrefixedID  `json:"idGT,omitempty"`
	IDGTE   *gidx.PrefixedID  `json:"idGTE,omitempty"`
	IDLT    *gidx.PrefixedID  `json:"idLT,omitempty"`
	IDLTE   *gidx.PrefixedID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "annotations" edge predicates.
	HasAnnotations     *bool                   `json:"hasAnnotations,omitempty"`
	HasAnnotationsWith []*AnnotationWhereInput `json:"hasAnnotationsWith,omitempty"`
}

AnnotationNamespaceWhereInput represents a where input for filtering AnnotationNamespace queries.

func (*AnnotationNamespaceWhereInput) AddPredicates

func (i *AnnotationNamespaceWhereInput) AddPredicates(predicates ...predicate.AnnotationNamespace)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AnnotationNamespaceWhereInput) Filter

Filter applies the AnnotationNamespaceWhereInput filter on the AnnotationNamespaceQuery builder.

func (*AnnotationNamespaceWhereInput) P

P returns a predicate for filtering annotationnamespaces. An error is returned if the input is empty or invalid.

type AnnotationNamespaces

type AnnotationNamespaces []*AnnotationNamespace

AnnotationNamespaces is a parsable slice of AnnotationNamespace.

type AnnotationOrder

type AnnotationOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *AnnotationOrderField `json:"field"`
}

AnnotationOrder defines the ordering of Annotation.

type AnnotationOrderField

type AnnotationOrderField struct {
	// Value extracts the ordering value from the given Annotation.
	Value func(*Annotation) (ent.Value, error)
	// contains filtered or unexported fields
}

AnnotationOrderField defines the ordering field of Annotation.

func (AnnotationOrderField) MarshalGQL

func (f AnnotationOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (AnnotationOrderField) String

func (f AnnotationOrderField) String() string

String implement fmt.Stringer interface.

func (*AnnotationOrderField) UnmarshalGQL

func (f *AnnotationOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type AnnotationPaginateOption

type AnnotationPaginateOption func(*annotationPager) error

AnnotationPaginateOption enables pagination customization.

func WithAnnotationFilter

func WithAnnotationFilter(filter func(*AnnotationQuery) (*AnnotationQuery, error)) AnnotationPaginateOption

WithAnnotationFilter configures pagination filter.

func WithAnnotationOrder

func WithAnnotationOrder(order *AnnotationOrder) AnnotationPaginateOption

WithAnnotationOrder configures pagination ordering.

type AnnotationQuery

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

AnnotationQuery is the builder for querying Annotation entities.

func (*AnnotationQuery) Aggregate

func (aq *AnnotationQuery) Aggregate(fns ...AggregateFunc) *AnnotationSelect

Aggregate returns a AnnotationSelect configured with the given aggregations.

func (*AnnotationQuery) All

func (aq *AnnotationQuery) All(ctx context.Context) ([]*Annotation, error)

All executes the query and returns a list of Annotations.

func (*AnnotationQuery) AllX

func (aq *AnnotationQuery) AllX(ctx context.Context) []*Annotation

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

func (*AnnotationQuery) Clone

func (aq *AnnotationQuery) Clone() *AnnotationQuery

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

func (*AnnotationQuery) CollectFields

func (a *AnnotationQuery) CollectFields(ctx context.Context, satisfies ...string) (*AnnotationQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*AnnotationQuery) Count

func (aq *AnnotationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AnnotationQuery) CountX

func (aq *AnnotationQuery) CountX(ctx context.Context) int

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

func (*AnnotationQuery) Exist

func (aq *AnnotationQuery) Exist(ctx context.Context) (bool, error)

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

func (*AnnotationQuery) ExistX

func (aq *AnnotationQuery) ExistX(ctx context.Context) bool

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

func (*AnnotationQuery) First

func (aq *AnnotationQuery) First(ctx context.Context) (*Annotation, error)

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

func (*AnnotationQuery) FirstID

func (aq *AnnotationQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*AnnotationQuery) FirstIDX

func (aq *AnnotationQuery) FirstIDX(ctx context.Context) gidx.PrefixedID

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

func (*AnnotationQuery) FirstX

func (aq *AnnotationQuery) FirstX(ctx context.Context) *Annotation

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

func (*AnnotationQuery) GroupBy

func (aq *AnnotationQuery) GroupBy(field string, fields ...string) *AnnotationGroupBy

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.Annotation.Query().
	GroupBy(annotation.FieldCreatedAt).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*AnnotationQuery) IDs

func (aq *AnnotationQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

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

func (*AnnotationQuery) IDsX

func (aq *AnnotationQuery) IDsX(ctx context.Context) []gidx.PrefixedID

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

func (*AnnotationQuery) Limit

func (aq *AnnotationQuery) Limit(limit int) *AnnotationQuery

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

func (*AnnotationQuery) Offset

func (aq *AnnotationQuery) Offset(offset int) *AnnotationQuery

Offset to start from.

func (*AnnotationQuery) Only

func (aq *AnnotationQuery) Only(ctx context.Context) (*Annotation, error)

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

func (*AnnotationQuery) OnlyID

func (aq *AnnotationQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*AnnotationQuery) OnlyIDX

func (aq *AnnotationQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID

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

func (*AnnotationQuery) OnlyX

func (aq *AnnotationQuery) OnlyX(ctx context.Context) *Annotation

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

func (*AnnotationQuery) Order

Order specifies how the records should be ordered.

func (*AnnotationQuery) Paginate

func (a *AnnotationQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...AnnotationPaginateOption,
) (*AnnotationConnection, error)

Paginate executes the query and returns a relay based cursor connection to Annotation.

func (*AnnotationQuery) QueryMetadata

func (aq *AnnotationQuery) QueryMetadata() *MetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*AnnotationQuery) QueryNamespace

func (aq *AnnotationQuery) QueryNamespace() *AnnotationNamespaceQuery

QueryNamespace chains the current query on the "namespace" edge.

func (*AnnotationQuery) Select

func (aq *AnnotationQuery) Select(fields ...string) *AnnotationSelect

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

func (*AnnotationQuery) Unique

func (aq *AnnotationQuery) Unique(unique bool) *AnnotationQuery

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

Where adds a new predicate for the AnnotationQuery builder.

func (*AnnotationQuery) WithMetadata

func (aq *AnnotationQuery) WithMetadata(opts ...func(*MetadataQuery)) *AnnotationQuery

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

func (*AnnotationQuery) WithNamespace

func (aq *AnnotationQuery) WithNamespace(opts ...func(*AnnotationNamespaceQuery)) *AnnotationQuery

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

type AnnotationSelect

type AnnotationSelect struct {
	*AnnotationQuery
	// contains filtered or unexported fields
}

AnnotationSelect is the builder for selecting fields of Annotation entities.

func (*AnnotationSelect) Aggregate

func (as *AnnotationSelect) Aggregate(fns ...AggregateFunc) *AnnotationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AnnotationSelect) Bool

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

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

func (*AnnotationSelect) BoolX

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

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

func (*AnnotationSelect) Bools

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

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

func (*AnnotationSelect) BoolsX

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

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

func (*AnnotationSelect) Float64

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

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

func (*AnnotationSelect) Float64X

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

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

func (*AnnotationSelect) Float64s

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

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

func (*AnnotationSelect) Float64sX

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

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

func (*AnnotationSelect) Int

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

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

func (*AnnotationSelect) IntX

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

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

func (*AnnotationSelect) Ints

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

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

func (*AnnotationSelect) IntsX

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

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

func (*AnnotationSelect) Scan

func (as *AnnotationSelect) Scan(ctx context.Context, v any) error

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

func (*AnnotationSelect) ScanX

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

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

func (*AnnotationSelect) String

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

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

func (*AnnotationSelect) StringX

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

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

func (*AnnotationSelect) Strings

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

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

func (*AnnotationSelect) StringsX

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

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

type AnnotationUpdate

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

AnnotationUpdate is the builder for updating Annotation entities.

func (*AnnotationUpdate) AppendData

func (au *AnnotationUpdate) AppendData(jm json.RawMessage) *AnnotationUpdate

AppendData appends jm to the "data" field.

func (*AnnotationUpdate) Exec

func (au *AnnotationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AnnotationUpdate) ExecX

func (au *AnnotationUpdate) ExecX(ctx context.Context)

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

func (*AnnotationUpdate) Mutation

func (au *AnnotationUpdate) Mutation() *AnnotationMutation

Mutation returns the AnnotationMutation object of the builder.

func (*AnnotationUpdate) Save

func (au *AnnotationUpdate) Save(ctx context.Context) (int, error)

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

func (*AnnotationUpdate) SaveX

func (au *AnnotationUpdate) SaveX(ctx context.Context) int

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

func (*AnnotationUpdate) SetData

SetData sets the "data" field.

func (*AnnotationUpdate) Where

Where appends a list predicates to the AnnotationUpdate builder.

type AnnotationUpdateOne

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

AnnotationUpdateOne is the builder for updating a single Annotation entity.

func (*AnnotationUpdateOne) AppendData

AppendData appends jm to the "data" field.

func (*AnnotationUpdateOne) Exec

func (auo *AnnotationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AnnotationUpdateOne) ExecX

func (auo *AnnotationUpdateOne) ExecX(ctx context.Context)

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

func (*AnnotationUpdateOne) Mutation

func (auo *AnnotationUpdateOne) Mutation() *AnnotationMutation

Mutation returns the AnnotationMutation object of the builder.

func (*AnnotationUpdateOne) Save

func (auo *AnnotationUpdateOne) Save(ctx context.Context) (*Annotation, error)

Save executes the query and returns the updated Annotation entity.

func (*AnnotationUpdateOne) SaveX

func (auo *AnnotationUpdateOne) SaveX(ctx context.Context) *Annotation

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

func (*AnnotationUpdateOne) Select

func (auo *AnnotationUpdateOne) Select(field string, fields ...string) *AnnotationUpdateOne

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

func (*AnnotationUpdateOne) SetData

SetData sets the "data" field.

func (*AnnotationUpdateOne) Where

Where appends a list predicates to the AnnotationUpdate builder.

type AnnotationWhereInput

type AnnotationWhereInput struct {
	Predicates []predicate.Annotation  `json:"-"`
	Not        *AnnotationWhereInput   `json:"not,omitempty"`
	Or         []*AnnotationWhereInput `json:"or,omitempty"`
	And        []*AnnotationWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *gidx.PrefixedID  `json:"id,omitempty"`
	IDNEQ   *gidx.PrefixedID  `json:"idNEQ,omitempty"`
	IDIn    []gidx.PrefixedID `json:"idIn,omitempty"`
	IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"`
	IDGT    *gidx.PrefixedID  `json:"idGT,omitempty"`
	IDGTE   *gidx.PrefixedID  `json:"idGTE,omitempty"`
	IDLT    *gidx.PrefixedID  `json:"idLT,omitempty"`
	IDLTE   *gidx.PrefixedID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "namespace" edge predicates.
	HasNamespace     *bool                            `json:"hasNamespace,omitempty"`
	HasNamespaceWith []*AnnotationNamespaceWhereInput `json:"hasNamespaceWith,omitempty"`

	// "metadata" edge predicates.
	HasMetadata     *bool                 `json:"hasMetadata,omitempty"`
	HasMetadataWith []*MetadataWhereInput `json:"hasMetadataWith,omitempty"`
}

AnnotationWhereInput represents a where input for filtering Annotation queries.

func (*AnnotationWhereInput) AddPredicates

func (i *AnnotationWhereInput) AddPredicates(predicates ...predicate.Annotation)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*AnnotationWhereInput) Filter

Filter applies the AnnotationWhereInput filter on the AnnotationQuery builder.

func (*AnnotationWhereInput) P

P returns a predicate for filtering annotations. An error is returned if the input is empty or invalid.

type Annotations

type Annotations []*Annotation

Annotations is a parsable slice of Annotation.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Annotation is the client for interacting with the Annotation builders.
	Annotation *AnnotationClient
	// AnnotationNamespace is the client for interacting with the AnnotationNamespace builders.
	AnnotationNamespace *AnnotationNamespaceClient
	// Metadata is the client for interacting with the Metadata builders.
	Metadata *MetadataClient
	// Status is the client for interacting with the Status builders.
	Status *StatusClient
	// StatusNamespace is the client for interacting with the StatusNamespace builders.
	StatusNamespace *StatusNamespaceClient
	// 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().
	Annotation.
	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) Noder

func (c *Client) Noder(ctx context.Context, id gidx.PrefixedID, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []gidx.PrefixedID, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

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

OpenTx opens a transaction and returns a transactional context along with the created transaction.

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 CreateAnnotationNamespaceInput

type CreateAnnotationNamespaceInput struct {
	Name    string
	OwnerID gidx.PrefixedID
	Private *bool
}

CreateAnnotationNamespaceInput represents a mutation input for creating annotationnamespaces.

func (*CreateAnnotationNamespaceInput) Mutate

Mutate applies the CreateAnnotationNamespaceInput on the AnnotationNamespaceMutation builder.

type CreateStatusInput

type CreateStatusInput struct {
	Source      string
	Data        json.RawMessage
	NamespaceID gidx.PrefixedID
	MetadataID  gidx.PrefixedID
}

CreateStatusInput represents a mutation input for creating statusslice.

func (*CreateStatusInput) Mutate

func (i *CreateStatusInput) Mutate(m *StatusMutation)

Mutate applies the CreateStatusInput on the StatusMutation builder.

type CreateStatusNamespaceInput

type CreateStatusNamespaceInput struct {
	Name               string
	ResourceProviderID gidx.PrefixedID
	Private            *bool
}

CreateStatusNamespaceInput represents a mutation input for creating statusnamespaces.

func (*CreateStatusNamespaceInput) Mutate

Mutate applies the CreateStatusNamespaceInput on the StatusNamespaceMutation builder.

type Cursor

type Cursor = entgql.Cursor[gidx.PrefixedID]

Common entgql types.

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 Metadata

type Metadata struct {

	// ID of the ent.
	// ID for the metadata.
	ID gidx.PrefixedID `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"`
	// ID of the node for this metadata
	NodeID gidx.PrefixedID `json:"node_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MetadataQuery when eager-loading is set.
	Edges MetadataEdges `json:"edges"`
	// contains filtered or unexported fields
}

Metadata is the model entity for the Metadata schema.

func (*Metadata) Annotations

func (m *Metadata) Annotations(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *AnnotationOrder, where *AnnotationWhereInput,
) (*AnnotationConnection, error)

func (Metadata) IsEntity

func (m Metadata) IsEntity()

IsEntity implement fedruntime.Entity

func (*Metadata) IsNode

func (n *Metadata) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Metadata) NamedAnnotations

func (m *Metadata) NamedAnnotations(name string) ([]*Annotation, error)

NamedAnnotations returns the Annotations named value or an error if the edge was not loaded in eager-loading with this name.

func (*Metadata) NamedStatuses

func (m *Metadata) NamedStatuses(name string) ([]*Status, error)

NamedStatuses returns the Statuses named value or an error if the edge was not loaded in eager-loading with this name.

func (*Metadata) QueryAnnotations

func (m *Metadata) QueryAnnotations() *AnnotationQuery

QueryAnnotations queries the "annotations" edge of the Metadata entity.

func (*Metadata) QueryStatuses

func (m *Metadata) QueryStatuses() *StatusQuery

QueryStatuses queries the "statuses" edge of the Metadata entity.

func (*Metadata) Statuses

func (m *Metadata) Statuses(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *StatusOrder, where *StatusWhereInput,
) (*StatusConnection, error)

func (*Metadata) String

func (m *Metadata) String() string

String implements the fmt.Stringer.

func (*Metadata) ToEdge

func (m *Metadata) ToEdge(order *MetadataOrder) *MetadataEdge

ToEdge converts Metadata into MetadataEdge.

func (*Metadata) Unwrap

func (m *Metadata) Unwrap() *Metadata

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

func (m *Metadata) Update() *MetadataUpdateOne

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

func (*Metadata) Value

func (m *Metadata) Value(name string) (ent.Value, error)

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

type MetadataClient

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

MetadataClient is a client for the Metadata schema.

func NewMetadataClient

func NewMetadataClient(c config) *MetadataClient

NewMetadataClient returns a client for the Metadata from the given config.

func (*MetadataClient) Create

func (c *MetadataClient) Create() *MetadataCreate

Create returns a builder for creating a Metadata entity.

func (*MetadataClient) CreateBulk

func (c *MetadataClient) CreateBulk(builders ...*MetadataCreate) *MetadataCreateBulk

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

func (*MetadataClient) Delete

func (c *MetadataClient) Delete() *MetadataDelete

Delete returns a delete builder for Metadata.

func (*MetadataClient) DeleteOne

func (c *MetadataClient) DeleteOne(m *Metadata) *MetadataDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MetadataClient) DeleteOneID

func (c *MetadataClient) DeleteOneID(id gidx.PrefixedID) *MetadataDeleteOne

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

func (*MetadataClient) Get

Get returns a Metadata entity by its id.

func (*MetadataClient) GetX

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

func (*MetadataClient) Hooks

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

Hooks returns the client hooks.

func (*MetadataClient) Intercept

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

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

func (*MetadataClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MetadataClient) MapCreateBulk added in v0.0.2

func (c *MetadataClient) MapCreateBulk(slice any, setFunc func(*MetadataCreate, int)) *MetadataCreateBulk

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

func (c *MetadataClient) Query() *MetadataQuery

Query returns a query builder for Metadata.

func (*MetadataClient) QueryAnnotations

func (c *MetadataClient) QueryAnnotations(m *Metadata) *AnnotationQuery

QueryAnnotations queries the annotations edge of a Metadata.

func (*MetadataClient) QueryStatuses

func (c *MetadataClient) QueryStatuses(m *Metadata) *StatusQuery

QueryStatuses queries the statuses edge of a Metadata.

func (*MetadataClient) Update

func (c *MetadataClient) Update() *MetadataUpdate

Update returns an update builder for Metadata.

func (*MetadataClient) UpdateOne

func (c *MetadataClient) UpdateOne(m *Metadata) *MetadataUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MetadataClient) UpdateOneID

func (c *MetadataClient) UpdateOneID(id gidx.PrefixedID) *MetadataUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MetadataClient) Use

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

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

type MetadataConnection

type MetadataConnection struct {
	Edges      []*MetadataEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

MetadataConnection is the connection containing edges to Metadata.

type MetadataCreate

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

MetadataCreate is the builder for creating a Metadata entity.

func (*MetadataCreate) AddAnnotationIDs

func (mc *MetadataCreate) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataCreate

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.

func (*MetadataCreate) AddAnnotations

func (mc *MetadataCreate) AddAnnotations(a ...*Annotation) *MetadataCreate

AddAnnotations adds the "annotations" edges to the Annotation entity.

func (*MetadataCreate) AddStatusIDs

func (mc *MetadataCreate) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataCreate

AddStatusIDs adds the "statuses" edge to the Status entity by IDs.

func (*MetadataCreate) AddStatuses

func (mc *MetadataCreate) AddStatuses(s ...*Status) *MetadataCreate

AddStatuses adds the "statuses" edges to the Status entity.

func (*MetadataCreate) Exec

func (mc *MetadataCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MetadataCreate) ExecX

func (mc *MetadataCreate) ExecX(ctx context.Context)

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

func (*MetadataCreate) Mutation

func (mc *MetadataCreate) Mutation() *MetadataMutation

Mutation returns the MetadataMutation object of the builder.

func (*MetadataCreate) Save

func (mc *MetadataCreate) Save(ctx context.Context) (*Metadata, error)

Save creates the Metadata in the database.

func (*MetadataCreate) SaveX

func (mc *MetadataCreate) SaveX(ctx context.Context) *Metadata

SaveX calls Save and panics if Save returns an error.

func (*MetadataCreate) SetCreatedAt

func (mc *MetadataCreate) SetCreatedAt(t time.Time) *MetadataCreate

SetCreatedAt sets the "created_at" field.

func (*MetadataCreate) SetID

SetID sets the "id" field.

func (*MetadataCreate) SetNillableCreatedAt

func (mc *MetadataCreate) SetNillableCreatedAt(t *time.Time) *MetadataCreate

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

func (*MetadataCreate) SetNillableID

func (mc *MetadataCreate) SetNillableID(gi *gidx.PrefixedID) *MetadataCreate

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

func (*MetadataCreate) SetNillableUpdatedAt

func (mc *MetadataCreate) SetNillableUpdatedAt(t *time.Time) *MetadataCreate

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

func (*MetadataCreate) SetNodeID

func (mc *MetadataCreate) SetNodeID(gi gidx.PrefixedID) *MetadataCreate

SetNodeID sets the "node_id" field.

func (*MetadataCreate) SetUpdatedAt

func (mc *MetadataCreate) SetUpdatedAt(t time.Time) *MetadataCreate

SetUpdatedAt sets the "updated_at" field.

type MetadataCreateBulk

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

MetadataCreateBulk is the builder for creating many Metadata entities in bulk.

func (*MetadataCreateBulk) Exec

func (mcb *MetadataCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MetadataCreateBulk) ExecX

func (mcb *MetadataCreateBulk) ExecX(ctx context.Context)

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

func (*MetadataCreateBulk) Save

func (mcb *MetadataCreateBulk) Save(ctx context.Context) ([]*Metadata, error)

Save creates the Metadata entities in the database.

func (*MetadataCreateBulk) SaveX

func (mcb *MetadataCreateBulk) SaveX(ctx context.Context) []*Metadata

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

type MetadataDelete

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

MetadataDelete is the builder for deleting a Metadata entity.

func (*MetadataDelete) Exec

func (md *MetadataDelete) Exec(ctx context.Context) (int, error)

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

func (*MetadataDelete) ExecX

func (md *MetadataDelete) ExecX(ctx context.Context) int

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

func (*MetadataDelete) Where

func (md *MetadataDelete) Where(ps ...predicate.Metadata) *MetadataDelete

Where appends a list predicates to the MetadataDelete builder.

type MetadataDeleteOne

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

MetadataDeleteOne is the builder for deleting a single Metadata entity.

func (*MetadataDeleteOne) Exec

func (mdo *MetadataDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MetadataDeleteOne) ExecX

func (mdo *MetadataDeleteOne) ExecX(ctx context.Context)

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

func (*MetadataDeleteOne) Where

Where appends a list predicates to the MetadataDelete builder.

type MetadataEdge

type MetadataEdge struct {
	Node   *Metadata `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

MetadataEdge is the edge representation of Metadata.

type MetadataEdges

type MetadataEdges struct {
	// Annotations holds the value of the annotations edge.
	Annotations []*Annotation `json:"annotations,omitempty"`
	// Statuses holds the value of the statuses edge.
	Statuses []*Status `json:"statuses,omitempty"`
	// contains filtered or unexported fields
}

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

func (MetadataEdges) AnnotationsOrErr

func (e MetadataEdges) AnnotationsOrErr() ([]*Annotation, error)

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

func (MetadataEdges) StatusesOrErr

func (e MetadataEdges) StatusesOrErr() ([]*Status, error)

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

type MetadataGroupBy

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

MetadataGroupBy is the group-by builder for Metadata entities.

func (*MetadataGroupBy) Aggregate

func (mgb *MetadataGroupBy) Aggregate(fns ...AggregateFunc) *MetadataGroupBy

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

func (*MetadataGroupBy) Bool

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

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

func (*MetadataGroupBy) BoolX

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

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

func (*MetadataGroupBy) Bools

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

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

func (*MetadataGroupBy) BoolsX

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

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

func (*MetadataGroupBy) Float64

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

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

func (*MetadataGroupBy) Float64X

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

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

func (*MetadataGroupBy) Float64s

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

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

func (*MetadataGroupBy) Float64sX

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

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

func (*MetadataGroupBy) Int

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

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

func (*MetadataGroupBy) IntX

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

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

func (*MetadataGroupBy) Ints

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

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

func (*MetadataGroupBy) IntsX

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

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

func (*MetadataGroupBy) Scan

func (mgb *MetadataGroupBy) Scan(ctx context.Context, v any) error

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

func (*MetadataGroupBy) ScanX

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

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

func (*MetadataGroupBy) String

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

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

func (*MetadataGroupBy) StringX

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

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

func (*MetadataGroupBy) Strings

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

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

func (*MetadataGroupBy) StringsX

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

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

type MetadataMutation

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

MetadataMutation represents an operation that mutates the Metadata nodes in the graph.

func (*MetadataMutation) AddAnnotationIDs

func (m *MetadataMutation) AddAnnotationIDs(ids ...gidx.PrefixedID)

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by ids.

func (*MetadataMutation) AddField

func (m *MetadataMutation) 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 (*MetadataMutation) AddStatusIDs

func (m *MetadataMutation) AddStatusIDs(ids ...gidx.PrefixedID)

AddStatusIDs adds the "statuses" edge to the Status entity by ids.

func (*MetadataMutation) AddedEdges

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

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

func (*MetadataMutation) AddedField

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

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

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

func (*MetadataMutation) AddedIDs

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

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

func (*MetadataMutation) AnnotationsCleared

func (m *MetadataMutation) AnnotationsCleared() bool

AnnotationsCleared reports if the "annotations" edge to the Annotation entity was cleared.

func (*MetadataMutation) AnnotationsIDs

func (m *MetadataMutation) AnnotationsIDs() (ids []gidx.PrefixedID)

AnnotationsIDs returns the "annotations" edge IDs in the mutation.

func (*MetadataMutation) ClearAnnotations

func (m *MetadataMutation) ClearAnnotations()

ClearAnnotations clears the "annotations" edge to the Annotation entity.

func (*MetadataMutation) ClearEdge

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

func (m *MetadataMutation) 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 (*MetadataMutation) ClearStatuses

func (m *MetadataMutation) ClearStatuses()

ClearStatuses clears the "statuses" edge to the Status entity.

func (*MetadataMutation) ClearedEdges

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

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

func (*MetadataMutation) ClearedFields

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

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

func (MetadataMutation) Client

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

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

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

func (*MetadataMutation) EdgeCleared

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

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

func (*MetadataMutation) Field

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

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

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

func (*MetadataMutation) Fields

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

func (m *MetadataMutation) ID() (id gidx.PrefixedID, 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 (*MetadataMutation) 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 (*MetadataMutation) NodeID

func (m *MetadataMutation) NodeID() (r gidx.PrefixedID, exists bool)

NodeID returns the value of the "node_id" field in the mutation.

func (*MetadataMutation) OldCreatedAt

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

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

func (*MetadataMutation) OldField

func (m *MetadataMutation) 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 (*MetadataMutation) OldNodeID

func (m *MetadataMutation) OldNodeID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*MetadataMutation) OldUpdatedAt

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

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

func (*MetadataMutation) Op

func (m *MetadataMutation) Op() Op

Op returns the operation name.

func (*MetadataMutation) RemoveAnnotationIDs

func (m *MetadataMutation) RemoveAnnotationIDs(ids ...gidx.PrefixedID)

RemoveAnnotationIDs removes the "annotations" edge to the Annotation entity by IDs.

func (*MetadataMutation) RemoveStatusIDs

func (m *MetadataMutation) RemoveStatusIDs(ids ...gidx.PrefixedID)

RemoveStatusIDs removes the "statuses" edge to the Status entity by IDs.

func (*MetadataMutation) RemovedAnnotationsIDs

func (m *MetadataMutation) RemovedAnnotationsIDs() (ids []gidx.PrefixedID)

RemovedAnnotations returns the removed IDs of the "annotations" edge to the Annotation entity.

func (*MetadataMutation) RemovedEdges

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

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

func (*MetadataMutation) RemovedIDs

func (m *MetadataMutation) 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 (*MetadataMutation) RemovedStatusesIDs

func (m *MetadataMutation) RemovedStatusesIDs() (ids []gidx.PrefixedID)

RemovedStatuses returns the removed IDs of the "statuses" edge to the Status entity.

func (*MetadataMutation) ResetAnnotations

func (m *MetadataMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" edge.

func (*MetadataMutation) ResetCreatedAt

func (m *MetadataMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MetadataMutation) ResetEdge

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

func (m *MetadataMutation) 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 (*MetadataMutation) ResetNodeID

func (m *MetadataMutation) ResetNodeID()

ResetNodeID resets all changes to the "node_id" field.

func (*MetadataMutation) ResetStatuses

func (m *MetadataMutation) ResetStatuses()

ResetStatuses resets all changes to the "statuses" edge.

func (*MetadataMutation) ResetUpdatedAt

func (m *MetadataMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MetadataMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*MetadataMutation) SetField

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

func (m *MetadataMutation) SetID(id gidx.PrefixedID)

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

func (*MetadataMutation) SetNodeID

func (m *MetadataMutation) SetNodeID(gi gidx.PrefixedID)

SetNodeID sets the "node_id" field.

func (*MetadataMutation) SetOp

func (m *MetadataMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MetadataMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*MetadataMutation) StatusesCleared

func (m *MetadataMutation) StatusesCleared() bool

StatusesCleared reports if the "statuses" edge to the Status entity was cleared.

func (*MetadataMutation) StatusesIDs

func (m *MetadataMutation) StatusesIDs() (ids []gidx.PrefixedID)

StatusesIDs returns the "statuses" edge IDs in the mutation.

func (MetadataMutation) Tx

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

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

func (*MetadataMutation) Type

func (m *MetadataMutation) Type() string

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

func (*MetadataMutation) UpdatedAt

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

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

func (*MetadataMutation) Where

func (m *MetadataMutation) Where(ps ...predicate.Metadata)

Where appends a list predicates to the MetadataMutation builder.

func (*MetadataMutation) WhereP

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

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

type MetadataOrder

type MetadataOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *MetadataOrderField `json:"field"`
}

MetadataOrder defines the ordering of Metadata.

type MetadataOrderField

type MetadataOrderField struct {
	// Value extracts the ordering value from the given Metadata.
	Value func(*Metadata) (ent.Value, error)
	// contains filtered or unexported fields
}

MetadataOrderField defines the ordering field of Metadata.

func (MetadataOrderField) MarshalGQL

func (f MetadataOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MetadataOrderField) String

func (f MetadataOrderField) String() string

String implement fmt.Stringer interface.

func (*MetadataOrderField) UnmarshalGQL

func (f *MetadataOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MetadataPaginateOption

type MetadataPaginateOption func(*metadataPager) error

MetadataPaginateOption enables pagination customization.

func WithMetadataFilter

func WithMetadataFilter(filter func(*MetadataQuery) (*MetadataQuery, error)) MetadataPaginateOption

WithMetadataFilter configures pagination filter.

func WithMetadataOrder

func WithMetadataOrder(order *MetadataOrder) MetadataPaginateOption

WithMetadataOrder configures pagination ordering.

type MetadataQuery

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

MetadataQuery is the builder for querying Metadata entities.

func (*MetadataQuery) Aggregate

func (mq *MetadataQuery) Aggregate(fns ...AggregateFunc) *MetadataSelect

Aggregate returns a MetadataSelect configured with the given aggregations.

func (*MetadataQuery) All

func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error)

All executes the query and returns a list of MetadataSlice.

func (*MetadataQuery) AllX

func (mq *MetadataQuery) AllX(ctx context.Context) []*Metadata

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

func (*MetadataQuery) Clone

func (mq *MetadataQuery) Clone() *MetadataQuery

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

func (*MetadataQuery) CollectFields

func (m *MetadataQuery) CollectFields(ctx context.Context, satisfies ...string) (*MetadataQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MetadataQuery) Count

func (mq *MetadataQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MetadataQuery) CountX

func (mq *MetadataQuery) CountX(ctx context.Context) int

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

func (*MetadataQuery) Exist

func (mq *MetadataQuery) Exist(ctx context.Context) (bool, error)

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

func (*MetadataQuery) ExistX

func (mq *MetadataQuery) ExistX(ctx context.Context) bool

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

func (*MetadataQuery) First

func (mq *MetadataQuery) First(ctx context.Context) (*Metadata, error)

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

func (*MetadataQuery) FirstID

func (mq *MetadataQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*MetadataQuery) FirstIDX

func (mq *MetadataQuery) FirstIDX(ctx context.Context) gidx.PrefixedID

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

func (*MetadataQuery) FirstX

func (mq *MetadataQuery) FirstX(ctx context.Context) *Metadata

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

func (*MetadataQuery) GroupBy

func (mq *MetadataQuery) GroupBy(field string, fields ...string) *MetadataGroupBy

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.Metadata.Query().
	GroupBy(metadata.FieldCreatedAt).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*MetadataQuery) IDs

func (mq *MetadataQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

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

func (*MetadataQuery) IDsX

func (mq *MetadataQuery) IDsX(ctx context.Context) []gidx.PrefixedID

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

func (*MetadataQuery) Limit

func (mq *MetadataQuery) Limit(limit int) *MetadataQuery

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

func (*MetadataQuery) Offset

func (mq *MetadataQuery) Offset(offset int) *MetadataQuery

Offset to start from.

func (*MetadataQuery) Only

func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error)

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

func (*MetadataQuery) OnlyID

func (mq *MetadataQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*MetadataQuery) OnlyIDX

func (mq *MetadataQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID

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

func (*MetadataQuery) OnlyX

func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata

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

func (*MetadataQuery) Order

Order specifies how the records should be ordered.

func (*MetadataQuery) Paginate

func (m *MetadataQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MetadataPaginateOption,
) (*MetadataConnection, error)

Paginate executes the query and returns a relay based cursor connection to Metadata.

func (*MetadataQuery) QueryAnnotations

func (mq *MetadataQuery) QueryAnnotations() *AnnotationQuery

QueryAnnotations chains the current query on the "annotations" edge.

func (*MetadataQuery) QueryStatuses

func (mq *MetadataQuery) QueryStatuses() *StatusQuery

QueryStatuses chains the current query on the "statuses" edge.

func (*MetadataQuery) Select

func (mq *MetadataQuery) Select(fields ...string) *MetadataSelect

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

func (*MetadataQuery) Unique

func (mq *MetadataQuery) Unique(unique bool) *MetadataQuery

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

func (mq *MetadataQuery) Where(ps ...predicate.Metadata) *MetadataQuery

Where adds a new predicate for the MetadataQuery builder.

func (*MetadataQuery) WithAnnotations

func (mq *MetadataQuery) WithAnnotations(opts ...func(*AnnotationQuery)) *MetadataQuery

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

func (*MetadataQuery) WithNamedAnnotations

func (mq *MetadataQuery) WithNamedAnnotations(name string, opts ...func(*AnnotationQuery)) *MetadataQuery

WithNamedAnnotations tells the query-builder to eager-load the nodes that are connected to the "annotations" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*MetadataQuery) WithNamedStatuses

func (mq *MetadataQuery) WithNamedStatuses(name string, opts ...func(*StatusQuery)) *MetadataQuery

WithNamedStatuses tells the query-builder to eager-load the nodes that are connected to the "statuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*MetadataQuery) WithStatuses

func (mq *MetadataQuery) WithStatuses(opts ...func(*StatusQuery)) *MetadataQuery

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

type MetadataSelect

type MetadataSelect struct {
	*MetadataQuery
	// contains filtered or unexported fields
}

MetadataSelect is the builder for selecting fields of Metadata entities.

func (*MetadataSelect) Aggregate

func (ms *MetadataSelect) Aggregate(fns ...AggregateFunc) *MetadataSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MetadataSelect) Bool

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

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

func (*MetadataSelect) BoolX

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

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

func (*MetadataSelect) Bools

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

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

func (*MetadataSelect) BoolsX

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

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

func (*MetadataSelect) Float64

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

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

func (*MetadataSelect) Float64X

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

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

func (*MetadataSelect) Float64s

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

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

func (*MetadataSelect) Float64sX

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

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

func (*MetadataSelect) Int

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

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

func (*MetadataSelect) IntX

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

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

func (*MetadataSelect) Ints

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

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

func (*MetadataSelect) IntsX

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

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

func (*MetadataSelect) Scan

func (ms *MetadataSelect) Scan(ctx context.Context, v any) error

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

func (*MetadataSelect) ScanX

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

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

func (*MetadataSelect) String

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

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

func (*MetadataSelect) StringX

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

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

func (*MetadataSelect) Strings

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

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

func (*MetadataSelect) StringsX

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

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

type MetadataSlice

type MetadataSlice []*Metadata

MetadataSlice is a parsable slice of Metadata.

type MetadataUpdate

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

MetadataUpdate is the builder for updating Metadata entities.

func (*MetadataUpdate) AddAnnotationIDs

func (mu *MetadataUpdate) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdate

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.

func (*MetadataUpdate) AddAnnotations

func (mu *MetadataUpdate) AddAnnotations(a ...*Annotation) *MetadataUpdate

AddAnnotations adds the "annotations" edges to the Annotation entity.

func (*MetadataUpdate) AddStatusIDs

func (mu *MetadataUpdate) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdate

AddStatusIDs adds the "statuses" edge to the Status entity by IDs.

func (*MetadataUpdate) AddStatuses

func (mu *MetadataUpdate) AddStatuses(s ...*Status) *MetadataUpdate

AddStatuses adds the "statuses" edges to the Status entity.

func (*MetadataUpdate) ClearAnnotations

func (mu *MetadataUpdate) ClearAnnotations() *MetadataUpdate

ClearAnnotations clears all "annotations" edges to the Annotation entity.

func (*MetadataUpdate) ClearStatuses

func (mu *MetadataUpdate) ClearStatuses() *MetadataUpdate

ClearStatuses clears all "statuses" edges to the Status entity.

func (*MetadataUpdate) Exec

func (mu *MetadataUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MetadataUpdate) ExecX

func (mu *MetadataUpdate) ExecX(ctx context.Context)

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

func (*MetadataUpdate) Mutation

func (mu *MetadataUpdate) Mutation() *MetadataMutation

Mutation returns the MetadataMutation object of the builder.

func (*MetadataUpdate) RemoveAnnotationIDs

func (mu *MetadataUpdate) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdate

RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.

func (*MetadataUpdate) RemoveAnnotations

func (mu *MetadataUpdate) RemoveAnnotations(a ...*Annotation) *MetadataUpdate

RemoveAnnotations removes "annotations" edges to Annotation entities.

func (*MetadataUpdate) RemoveStatusIDs

func (mu *MetadataUpdate) RemoveStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdate

RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.

func (*MetadataUpdate) RemoveStatuses

func (mu *MetadataUpdate) RemoveStatuses(s ...*Status) *MetadataUpdate

RemoveStatuses removes "statuses" edges to Status entities.

func (*MetadataUpdate) Save

func (mu *MetadataUpdate) Save(ctx context.Context) (int, error)

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

func (*MetadataUpdate) SaveX

func (mu *MetadataUpdate) SaveX(ctx context.Context) int

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

func (*MetadataUpdate) Where

func (mu *MetadataUpdate) Where(ps ...predicate.Metadata) *MetadataUpdate

Where appends a list predicates to the MetadataUpdate builder.

type MetadataUpdateOne

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

MetadataUpdateOne is the builder for updating a single Metadata entity.

func (*MetadataUpdateOne) AddAnnotationIDs

func (muo *MetadataUpdateOne) AddAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne

AddAnnotationIDs adds the "annotations" edge to the Annotation entity by IDs.

func (*MetadataUpdateOne) AddAnnotations

func (muo *MetadataUpdateOne) AddAnnotations(a ...*Annotation) *MetadataUpdateOne

AddAnnotations adds the "annotations" edges to the Annotation entity.

func (*MetadataUpdateOne) AddStatusIDs

func (muo *MetadataUpdateOne) AddStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne

AddStatusIDs adds the "statuses" edge to the Status entity by IDs.

func (*MetadataUpdateOne) AddStatuses

func (muo *MetadataUpdateOne) AddStatuses(s ...*Status) *MetadataUpdateOne

AddStatuses adds the "statuses" edges to the Status entity.

func (*MetadataUpdateOne) ClearAnnotations

func (muo *MetadataUpdateOne) ClearAnnotations() *MetadataUpdateOne

ClearAnnotations clears all "annotations" edges to the Annotation entity.

func (*MetadataUpdateOne) ClearStatuses

func (muo *MetadataUpdateOne) ClearStatuses() *MetadataUpdateOne

ClearStatuses clears all "statuses" edges to the Status entity.

func (*MetadataUpdateOne) Exec

func (muo *MetadataUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MetadataUpdateOne) ExecX

func (muo *MetadataUpdateOne) ExecX(ctx context.Context)

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

func (*MetadataUpdateOne) Mutation

func (muo *MetadataUpdateOne) Mutation() *MetadataMutation

Mutation returns the MetadataMutation object of the builder.

func (*MetadataUpdateOne) RemoveAnnotationIDs

func (muo *MetadataUpdateOne) RemoveAnnotationIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne

RemoveAnnotationIDs removes the "annotations" edge to Annotation entities by IDs.

func (*MetadataUpdateOne) RemoveAnnotations

func (muo *MetadataUpdateOne) RemoveAnnotations(a ...*Annotation) *MetadataUpdateOne

RemoveAnnotations removes "annotations" edges to Annotation entities.

func (*MetadataUpdateOne) RemoveStatusIDs

func (muo *MetadataUpdateOne) RemoveStatusIDs(ids ...gidx.PrefixedID) *MetadataUpdateOne

RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.

func (*MetadataUpdateOne) RemoveStatuses

func (muo *MetadataUpdateOne) RemoveStatuses(s ...*Status) *MetadataUpdateOne

RemoveStatuses removes "statuses" edges to Status entities.

func (*MetadataUpdateOne) Save

func (muo *MetadataUpdateOne) Save(ctx context.Context) (*Metadata, error)

Save executes the query and returns the updated Metadata entity.

func (*MetadataUpdateOne) SaveX

func (muo *MetadataUpdateOne) SaveX(ctx context.Context) *Metadata

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

func (*MetadataUpdateOne) Select

func (muo *MetadataUpdateOne) Select(field string, fields ...string) *MetadataUpdateOne

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

func (*MetadataUpdateOne) Where

Where appends a list predicates to the MetadataUpdate builder.

type MetadataWhereInput

type MetadataWhereInput struct {
	Predicates []predicate.Metadata  `json:"-"`
	Not        *MetadataWhereInput   `json:"not,omitempty"`
	Or         []*MetadataWhereInput `json:"or,omitempty"`
	And        []*MetadataWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *gidx.PrefixedID  `json:"id,omitempty"`
	IDNEQ   *gidx.PrefixedID  `json:"idNEQ,omitempty"`
	IDIn    []gidx.PrefixedID `json:"idIn,omitempty"`
	IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"`
	IDGT    *gidx.PrefixedID  `json:"idGT,omitempty"`
	IDGTE   *gidx.PrefixedID  `json:"idGTE,omitempty"`
	IDLT    *gidx.PrefixedID  `json:"idLT,omitempty"`
	IDLTE   *gidx.PrefixedID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "annotations" edge predicates.
	HasAnnotations     *bool                   `json:"hasAnnotations,omitempty"`
	HasAnnotationsWith []*AnnotationWhereInput `json:"hasAnnotationsWith,omitempty"`

	// "statuses" edge predicates.
	HasStatuses     *bool               `json:"hasStatuses,omitempty"`
	HasStatusesWith []*StatusWhereInput `json:"hasStatusesWith,omitempty"`
}

MetadataWhereInput represents a where input for filtering Metadata queries.

func (*MetadataWhereInput) AddPredicates

func (i *MetadataWhereInput) AddPredicates(predicates ...predicate.Metadata)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MetadataWhereInput) Filter

Filter applies the MetadataWhereInput filter on the MetadataQuery builder.

func (*MetadataWhereInput) P

P returns a predicate for filtering metadataslice. An error is returned if the input is empty or invalid.

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 NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, gidx.PrefixedID) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

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 EventsPublisher

func EventsPublisher(v events.Connection) Option

EventsPublisher configures the EventsPublisher.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

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 PageInfo

type PageInfo = entgql.PageInfo[gidx.PrefixedID]

Common entgql types.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type 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 Status

type Status struct {

	// ID of the ent.
	ID gidx.PrefixedID `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"`
	// ID of the metadata of this status
	MetadataID gidx.PrefixedID `json:"metadata_id,omitempty"`
	// StatusNamespaceID holds the value of the "status_namespace_id" field.
	StatusNamespaceID gidx.PrefixedID `json:"status_namespace_id,omitempty"`
	// Source holds the value of the "source" field.
	Source string `json:"source,omitempty"`
	// JSON formatted data of this annotation.
	Data json.RawMessage `json:"data,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StatusQuery when eager-loading is set.
	Edges StatusEdges `json:"edges"`
	// contains filtered or unexported fields
}

Status is the model entity for the Status schema.

func (Status) IsEntity

func (s Status) IsEntity()

IsEntity implement fedruntime.Entity

func (*Status) IsNode

func (n *Status) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Status) Metadata

func (s *Status) Metadata(ctx context.Context) (*Metadata, error)

func (*Status) Namespace

func (s *Status) Namespace(ctx context.Context) (*StatusNamespace, error)

func (*Status) QueryMetadata

func (s *Status) QueryMetadata() *MetadataQuery

QueryMetadata queries the "metadata" edge of the Status entity.

func (*Status) QueryNamespace

func (s *Status) QueryNamespace() *StatusNamespaceQuery

QueryNamespace queries the "namespace" edge of the Status entity.

func (*Status) String

func (s *Status) String() string

String implements the fmt.Stringer.

func (*Status) ToEdge

func (s *Status) ToEdge(order *StatusOrder) *StatusEdge

ToEdge converts Status into StatusEdge.

func (*Status) Unwrap

func (s *Status) Unwrap() *Status

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

func (s *Status) Update() *StatusUpdateOne

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

func (*Status) Value

func (s *Status) Value(name string) (ent.Value, error)

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

type StatusClient

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

StatusClient is a client for the Status schema.

func NewStatusClient

func NewStatusClient(c config) *StatusClient

NewStatusClient returns a client for the Status from the given config.

func (*StatusClient) Create

func (c *StatusClient) Create() *StatusCreate

Create returns a builder for creating a Status entity.

func (*StatusClient) CreateBulk

func (c *StatusClient) CreateBulk(builders ...*StatusCreate) *StatusCreateBulk

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

func (*StatusClient) Delete

func (c *StatusClient) Delete() *StatusDelete

Delete returns a delete builder for Status.

func (*StatusClient) DeleteOne

func (c *StatusClient) DeleteOne(s *Status) *StatusDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StatusClient) DeleteOneID

func (c *StatusClient) DeleteOneID(id gidx.PrefixedID) *StatusDeleteOne

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

func (*StatusClient) Get

func (c *StatusClient) Get(ctx context.Context, id gidx.PrefixedID) (*Status, error)

Get returns a Status entity by its id.

func (*StatusClient) GetX

func (c *StatusClient) GetX(ctx context.Context, id gidx.PrefixedID) *Status

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

func (*StatusClient) Hooks

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

Hooks returns the client hooks.

func (*StatusClient) Intercept

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

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

func (*StatusClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StatusClient) MapCreateBulk added in v0.0.2

func (c *StatusClient) MapCreateBulk(slice any, setFunc func(*StatusCreate, int)) *StatusCreateBulk

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

func (c *StatusClient) Query() *StatusQuery

Query returns a query builder for Status.

func (*StatusClient) QueryMetadata

func (c *StatusClient) QueryMetadata(s *Status) *MetadataQuery

QueryMetadata queries the metadata edge of a Status.

func (*StatusClient) QueryNamespace

func (c *StatusClient) QueryNamespace(s *Status) *StatusNamespaceQuery

QueryNamespace queries the namespace edge of a Status.

func (*StatusClient) Update

func (c *StatusClient) Update() *StatusUpdate

Update returns an update builder for Status.

func (*StatusClient) UpdateOne

func (c *StatusClient) UpdateOne(s *Status) *StatusUpdateOne

UpdateOne returns an update builder for the given entity.

func (*StatusClient) UpdateOneID

func (c *StatusClient) UpdateOneID(id gidx.PrefixedID) *StatusUpdateOne

UpdateOneID returns an update builder for the given id.

func (*StatusClient) Use

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

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

type StatusConnection

type StatusConnection struct {
	Edges      []*StatusEdge `json:"edges"`
	PageInfo   PageInfo      `json:"pageInfo"`
	TotalCount int           `json:"totalCount"`
}

StatusConnection is the connection containing edges to Status.

type StatusCreate

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

StatusCreate is the builder for creating a Status entity.

func (*StatusCreate) Exec

func (sc *StatusCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*StatusCreate) ExecX

func (sc *StatusCreate) ExecX(ctx context.Context)

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

func (*StatusCreate) Mutation

func (sc *StatusCreate) Mutation() *StatusMutation

Mutation returns the StatusMutation object of the builder.

func (*StatusCreate) Save

func (sc *StatusCreate) Save(ctx context.Context) (*Status, error)

Save creates the Status in the database.

func (*StatusCreate) SaveX

func (sc *StatusCreate) SaveX(ctx context.Context) *Status

SaveX calls Save and panics if Save returns an error.

func (*StatusCreate) SetCreatedAt

func (sc *StatusCreate) SetCreatedAt(t time.Time) *StatusCreate

SetCreatedAt sets the "created_at" field.

func (*StatusCreate) SetData

func (sc *StatusCreate) SetData(jm json.RawMessage) *StatusCreate

SetData sets the "data" field.

func (*StatusCreate) SetID

func (sc *StatusCreate) SetID(gi gidx.PrefixedID) *StatusCreate

SetID sets the "id" field.

func (*StatusCreate) SetInput

SetInput applies the change-set in the CreateStatusInput on the StatusCreate builder.

func (*StatusCreate) SetMetadata

func (sc *StatusCreate) SetMetadata(m *Metadata) *StatusCreate

SetMetadata sets the "metadata" edge to the Metadata entity.

func (*StatusCreate) SetMetadataID

func (sc *StatusCreate) SetMetadataID(gi gidx.PrefixedID) *StatusCreate

SetMetadataID sets the "metadata_id" field.

func (*StatusCreate) SetNamespace

func (sc *StatusCreate) SetNamespace(s *StatusNamespace) *StatusCreate

SetNamespace sets the "namespace" edge to the StatusNamespace entity.

func (*StatusCreate) SetNamespaceID

func (sc *StatusCreate) SetNamespaceID(id gidx.PrefixedID) *StatusCreate

SetNamespaceID sets the "namespace" edge to the StatusNamespace entity by ID.

func (*StatusCreate) SetNillableCreatedAt

func (sc *StatusCreate) SetNillableCreatedAt(t *time.Time) *StatusCreate

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

func (*StatusCreate) SetNillableID

func (sc *StatusCreate) SetNillableID(gi *gidx.PrefixedID) *StatusCreate

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

func (*StatusCreate) SetNillableUpdatedAt

func (sc *StatusCreate) SetNillableUpdatedAt(t *time.Time) *StatusCreate

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

func (*StatusCreate) SetSource

func (sc *StatusCreate) SetSource(s string) *StatusCreate

SetSource sets the "source" field.

func (*StatusCreate) SetStatusNamespaceID

func (sc *StatusCreate) SetStatusNamespaceID(gi gidx.PrefixedID) *StatusCreate

SetStatusNamespaceID sets the "status_namespace_id" field.

func (*StatusCreate) SetUpdatedAt

func (sc *StatusCreate) SetUpdatedAt(t time.Time) *StatusCreate

SetUpdatedAt sets the "updated_at" field.

type StatusCreateBulk

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

StatusCreateBulk is the builder for creating many Status entities in bulk.

func (*StatusCreateBulk) Exec

func (scb *StatusCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*StatusCreateBulk) ExecX

func (scb *StatusCreateBulk) ExecX(ctx context.Context)

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

func (*StatusCreateBulk) Save

func (scb *StatusCreateBulk) Save(ctx context.Context) ([]*Status, error)

Save creates the Status entities in the database.

func (*StatusCreateBulk) SaveX

func (scb *StatusCreateBulk) SaveX(ctx context.Context) []*Status

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

type StatusDelete

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

StatusDelete is the builder for deleting a Status entity.

func (*StatusDelete) Exec

func (sd *StatusDelete) Exec(ctx context.Context) (int, error)

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

func (*StatusDelete) ExecX

func (sd *StatusDelete) ExecX(ctx context.Context) int

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

func (*StatusDelete) Where

func (sd *StatusDelete) Where(ps ...predicate.Status) *StatusDelete

Where appends a list predicates to the StatusDelete builder.

type StatusDeleteOne

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

StatusDeleteOne is the builder for deleting a single Status entity.

func (*StatusDeleteOne) Exec

func (sdo *StatusDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*StatusDeleteOne) ExecX

func (sdo *StatusDeleteOne) ExecX(ctx context.Context)

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

func (*StatusDeleteOne) Where

func (sdo *StatusDeleteOne) Where(ps ...predicate.Status) *StatusDeleteOne

Where appends a list predicates to the StatusDelete builder.

type StatusEdge

type StatusEdge struct {
	Node   *Status `json:"node"`
	Cursor Cursor  `json:"cursor"`
}

StatusEdge is the edge representation of Status.

type StatusEdges

type StatusEdges struct {
	// Namespace holds the value of the namespace edge.
	Namespace *StatusNamespace `json:"namespace,omitempty"`
	// Metadata holds the value of the metadata edge.
	Metadata *Metadata `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

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

func (StatusEdges) MetadataOrErr

func (e StatusEdges) MetadataOrErr() (*Metadata, error)

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

func (StatusEdges) NamespaceOrErr

func (e StatusEdges) NamespaceOrErr() (*StatusNamespace, error)

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

type StatusGroupBy

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

StatusGroupBy is the group-by builder for Status entities.

func (*StatusGroupBy) Aggregate

func (sgb *StatusGroupBy) Aggregate(fns ...AggregateFunc) *StatusGroupBy

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

func (*StatusGroupBy) Bool

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

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

func (*StatusGroupBy) BoolX

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

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

func (*StatusGroupBy) Bools

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

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

func (*StatusGroupBy) BoolsX

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

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

func (*StatusGroupBy) Float64

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

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

func (*StatusGroupBy) Float64X

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

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

func (*StatusGroupBy) Float64s

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

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

func (*StatusGroupBy) Float64sX

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

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

func (*StatusGroupBy) Int

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

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

func (*StatusGroupBy) IntX

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

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

func (*StatusGroupBy) Ints

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

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

func (*StatusGroupBy) IntsX

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

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

func (*StatusGroupBy) Scan

func (sgb *StatusGroupBy) Scan(ctx context.Context, v any) error

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

func (*StatusGroupBy) ScanX

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

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

func (*StatusGroupBy) String

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

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

func (*StatusGroupBy) StringX

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

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

func (*StatusGroupBy) Strings

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

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

func (*StatusGroupBy) StringsX

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

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

type StatusMutation

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

StatusMutation represents an operation that mutates the Status nodes in the graph.

func (*StatusMutation) AddField

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

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

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

func (*StatusMutation) AddedField

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

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

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

func (*StatusMutation) AddedIDs

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

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

func (*StatusMutation) AppendData

func (m *StatusMutation) AppendData(jm json.RawMessage)

AppendData adds jm to the "data" field.

func (*StatusMutation) AppendedData

func (m *StatusMutation) AppendedData() (json.RawMessage, bool)

AppendedData returns the list of values that were appended to the "data" field in this mutation.

func (*StatusMutation) ClearEdge

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

func (m *StatusMutation) 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 (*StatusMutation) ClearMetadata

func (m *StatusMutation) ClearMetadata()

ClearMetadata clears the "metadata" edge to the Metadata entity.

func (*StatusMutation) ClearNamespace

func (m *StatusMutation) ClearNamespace()

ClearNamespace clears the "namespace" edge to the StatusNamespace entity.

func (*StatusMutation) ClearedEdges

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

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

func (*StatusMutation) ClearedFields

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

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

func (StatusMutation) Client

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

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

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

func (*StatusMutation) Data

func (m *StatusMutation) Data() (r json.RawMessage, exists bool)

Data returns the value of the "data" field in the mutation.

func (*StatusMutation) EdgeCleared

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

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

func (*StatusMutation) Field

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

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

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

func (*StatusMutation) Fields

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

func (m *StatusMutation) ID() (id gidx.PrefixedID, 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 (*StatusMutation) 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 (*StatusMutation) MetadataCleared

func (m *StatusMutation) MetadataCleared() bool

MetadataCleared reports if the "metadata" edge to the Metadata entity was cleared.

func (*StatusMutation) MetadataID

func (m *StatusMutation) MetadataID() (r gidx.PrefixedID, exists bool)

MetadataID returns the value of the "metadata_id" field in the mutation.

func (*StatusMutation) MetadataIDs

func (m *StatusMutation) MetadataIDs() (ids []gidx.PrefixedID)

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

func (*StatusMutation) NamespaceCleared

func (m *StatusMutation) NamespaceCleared() bool

NamespaceCleared reports if the "namespace" edge to the StatusNamespace entity was cleared.

func (*StatusMutation) NamespaceID

func (m *StatusMutation) NamespaceID() (id gidx.PrefixedID, exists bool)

NamespaceID returns the "namespace" edge ID in the mutation.

func (*StatusMutation) NamespaceIDs

func (m *StatusMutation) NamespaceIDs() (ids []gidx.PrefixedID)

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

func (*StatusMutation) OldCreatedAt

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

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

func (*StatusMutation) OldData

func (m *StatusMutation) OldData(ctx context.Context) (v json.RawMessage, err error)

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

func (*StatusMutation) OldField

func (m *StatusMutation) 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 (*StatusMutation) OldMetadataID

func (m *StatusMutation) OldMetadataID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*StatusMutation) OldSource

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

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

func (*StatusMutation) OldStatusNamespaceID

func (m *StatusMutation) OldStatusNamespaceID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*StatusMutation) OldUpdatedAt

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

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

func (*StatusMutation) Op

func (m *StatusMutation) Op() Op

Op returns the operation name.

func (*StatusMutation) RemovedEdges

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

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

func (*StatusMutation) RemovedIDs

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

func (m *StatusMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*StatusMutation) ResetData

func (m *StatusMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*StatusMutation) ResetEdge

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

func (m *StatusMutation) 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 (*StatusMutation) ResetMetadata

func (m *StatusMutation) ResetMetadata()

ResetMetadata resets all changes to the "metadata" edge.

func (*StatusMutation) ResetMetadataID

func (m *StatusMutation) ResetMetadataID()

ResetMetadataID resets all changes to the "metadata_id" field.

func (*StatusMutation) ResetNamespace

func (m *StatusMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" edge.

func (*StatusMutation) ResetSource

func (m *StatusMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*StatusMutation) ResetStatusNamespaceID

func (m *StatusMutation) ResetStatusNamespaceID()

ResetStatusNamespaceID resets all changes to the "status_namespace_id" field.

func (*StatusMutation) ResetUpdatedAt

func (m *StatusMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*StatusMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*StatusMutation) SetData

func (m *StatusMutation) SetData(jm json.RawMessage)

SetData sets the "data" field.

func (*StatusMutation) SetField

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

func (m *StatusMutation) SetID(id gidx.PrefixedID)

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

func (*StatusMutation) SetMetadataID

func (m *StatusMutation) SetMetadataID(gi gidx.PrefixedID)

SetMetadataID sets the "metadata_id" field.

func (*StatusMutation) SetNamespaceID

func (m *StatusMutation) SetNamespaceID(id gidx.PrefixedID)

SetNamespaceID sets the "namespace" edge to the StatusNamespace entity by id.

func (*StatusMutation) SetOp

func (m *StatusMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StatusMutation) SetSource

func (m *StatusMutation) SetSource(s string)

SetSource sets the "source" field.

func (*StatusMutation) SetStatusNamespaceID

func (m *StatusMutation) SetStatusNamespaceID(gi gidx.PrefixedID)

SetStatusNamespaceID sets the "status_namespace_id" field.

func (*StatusMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*StatusMutation) Source

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

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

func (*StatusMutation) StatusNamespaceID

func (m *StatusMutation) StatusNamespaceID() (r gidx.PrefixedID, exists bool)

StatusNamespaceID returns the value of the "status_namespace_id" field in the mutation.

func (StatusMutation) Tx

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

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

func (*StatusMutation) Type

func (m *StatusMutation) Type() string

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

func (*StatusMutation) UpdatedAt

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

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

func (*StatusMutation) Where

func (m *StatusMutation) Where(ps ...predicate.Status)

Where appends a list predicates to the StatusMutation builder.

func (*StatusMutation) WhereP

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

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

type StatusNamespace

type StatusNamespace struct {

	// ID of the ent.
	// The ID for the status namespace.
	ID gidx.PrefixedID `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"`
	// The name of the status namespace.
	Name string `json:"name,omitempty"`
	// The ID of the resource provider for this status namespace.
	ResourceProviderID gidx.PrefixedID `json:"resource_provider_id,omitempty"`
	// Flag for if this namespace is private.
	Private bool `json:"private,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the StatusNamespaceQuery when eager-loading is set.
	Edges StatusNamespaceEdges `json:"edges"`
	// contains filtered or unexported fields
}

Representation of a status namespace. Status namespaces are used group status data that is provided by a resource provider.

func (StatusNamespace) IsEntity

func (sn StatusNamespace) IsEntity()

IsEntity implement fedruntime.Entity

func (*StatusNamespace) IsNode

func (n *StatusNamespace) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*StatusNamespace) NamedStatuses

func (sn *StatusNamespace) NamedStatuses(name string) ([]*Status, error)

NamedStatuses returns the Statuses named value or an error if the edge was not loaded in eager-loading with this name.

func (*StatusNamespace) QueryStatuses

func (sn *StatusNamespace) QueryStatuses() *StatusQuery

QueryStatuses queries the "statuses" edge of the StatusNamespace entity.

func (*StatusNamespace) String

func (sn *StatusNamespace) String() string

String implements the fmt.Stringer.

func (*StatusNamespace) ToEdge

ToEdge converts StatusNamespace into StatusNamespaceEdge.

func (*StatusNamespace) Unwrap

func (sn *StatusNamespace) Unwrap() *StatusNamespace

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

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

func (*StatusNamespace) Value

func (sn *StatusNamespace) Value(name string) (ent.Value, error)

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

type StatusNamespaceClient

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

StatusNamespaceClient is a client for the StatusNamespace schema.

func NewStatusNamespaceClient

func NewStatusNamespaceClient(c config) *StatusNamespaceClient

NewStatusNamespaceClient returns a client for the StatusNamespace from the given config.

func (*StatusNamespaceClient) Create

Create returns a builder for creating a StatusNamespace entity.

func (*StatusNamespaceClient) CreateBulk

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

func (*StatusNamespaceClient) Delete

Delete returns a delete builder for StatusNamespace.

func (*StatusNamespaceClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*StatusNamespaceClient) DeleteOneID

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

func (*StatusNamespaceClient) Get

Get returns a StatusNamespace entity by its id.

func (*StatusNamespaceClient) GetX

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

func (*StatusNamespaceClient) Hooks

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

Hooks returns the client hooks.

func (*StatusNamespaceClient) Intercept

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

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

func (*StatusNamespaceClient) Interceptors

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

Interceptors returns the client interceptors.

func (*StatusNamespaceClient) MapCreateBulk added in v0.0.2

func (c *StatusNamespaceClient) MapCreateBulk(slice any, setFunc func(*StatusNamespaceCreate, int)) *StatusNamespaceCreateBulk

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

Query returns a query builder for StatusNamespace.

func (*StatusNamespaceClient) QueryStatuses

func (c *StatusNamespaceClient) QueryStatuses(sn *StatusNamespace) *StatusQuery

QueryStatuses queries the statuses edge of a StatusNamespace.

func (*StatusNamespaceClient) Update

Update returns an update builder for StatusNamespace.

func (*StatusNamespaceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*StatusNamespaceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*StatusNamespaceClient) Use

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

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

type StatusNamespaceConnection

type StatusNamespaceConnection struct {
	Edges      []*StatusNamespaceEdge `json:"edges"`
	PageInfo   PageInfo               `json:"pageInfo"`
	TotalCount int                    `json:"totalCount"`
}

StatusNamespaceConnection is the connection containing edges to StatusNamespace.

type StatusNamespaceCreate

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

StatusNamespaceCreate is the builder for creating a StatusNamespace entity.

func (*StatusNamespaceCreate) AddStatusIDs

func (snc *StatusNamespaceCreate) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceCreate

AddStatusIDs adds the "statuses" edge to the Status entity by IDs.

func (*StatusNamespaceCreate) AddStatuses

func (snc *StatusNamespaceCreate) AddStatuses(s ...*Status) *StatusNamespaceCreate

AddStatuses adds the "statuses" edges to the Status entity.

func (*StatusNamespaceCreate) Exec

func (snc *StatusNamespaceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*StatusNamespaceCreate) ExecX

func (snc *StatusNamespaceCreate) ExecX(ctx context.Context)

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

func (*StatusNamespaceCreate) Mutation

Mutation returns the StatusNamespaceMutation object of the builder.

func (*StatusNamespaceCreate) Save

Save creates the StatusNamespace in the database.

func (*StatusNamespaceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*StatusNamespaceCreate) SetCreatedAt

func (snc *StatusNamespaceCreate) SetCreatedAt(t time.Time) *StatusNamespaceCreate

SetCreatedAt sets the "created_at" field.

func (*StatusNamespaceCreate) SetID

SetID sets the "id" field.

func (*StatusNamespaceCreate) SetInput

SetInput applies the change-set in the CreateStatusNamespaceInput on the StatusNamespaceCreate builder.

func (*StatusNamespaceCreate) SetName

SetName sets the "name" field.

func (*StatusNamespaceCreate) SetNillableCreatedAt

func (snc *StatusNamespaceCreate) SetNillableCreatedAt(t *time.Time) *StatusNamespaceCreate

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

func (*StatusNamespaceCreate) SetNillableID

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

func (*StatusNamespaceCreate) SetNillablePrivate

func (snc *StatusNamespaceCreate) SetNillablePrivate(b *bool) *StatusNamespaceCreate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*StatusNamespaceCreate) SetNillableUpdatedAt

func (snc *StatusNamespaceCreate) SetNillableUpdatedAt(t *time.Time) *StatusNamespaceCreate

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

func (*StatusNamespaceCreate) SetPrivate

func (snc *StatusNamespaceCreate) SetPrivate(b bool) *StatusNamespaceCreate

SetPrivate sets the "private" field.

func (*StatusNamespaceCreate) SetResourceProviderID

func (snc *StatusNamespaceCreate) SetResourceProviderID(gi gidx.PrefixedID) *StatusNamespaceCreate

SetResourceProviderID sets the "resource_provider_id" field.

func (*StatusNamespaceCreate) SetUpdatedAt

func (snc *StatusNamespaceCreate) SetUpdatedAt(t time.Time) *StatusNamespaceCreate

SetUpdatedAt sets the "updated_at" field.

type StatusNamespaceCreateBulk

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

StatusNamespaceCreateBulk is the builder for creating many StatusNamespace entities in bulk.

func (*StatusNamespaceCreateBulk) Exec

Exec executes the query.

func (*StatusNamespaceCreateBulk) ExecX

func (sncb *StatusNamespaceCreateBulk) ExecX(ctx context.Context)

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

func (*StatusNamespaceCreateBulk) Save

Save creates the StatusNamespace entities in the database.

func (*StatusNamespaceCreateBulk) SaveX

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

type StatusNamespaceDelete

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

StatusNamespaceDelete is the builder for deleting a StatusNamespace entity.

func (*StatusNamespaceDelete) Exec

func (snd *StatusNamespaceDelete) Exec(ctx context.Context) (int, error)

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

func (*StatusNamespaceDelete) ExecX

func (snd *StatusNamespaceDelete) ExecX(ctx context.Context) int

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

func (*StatusNamespaceDelete) Where

Where appends a list predicates to the StatusNamespaceDelete builder.

type StatusNamespaceDeleteOne

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

StatusNamespaceDeleteOne is the builder for deleting a single StatusNamespace entity.

func (*StatusNamespaceDeleteOne) Exec

Exec executes the deletion query.

func (*StatusNamespaceDeleteOne) ExecX

func (sndo *StatusNamespaceDeleteOne) ExecX(ctx context.Context)

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

func (*StatusNamespaceDeleteOne) Where

Where appends a list predicates to the StatusNamespaceDelete builder.

type StatusNamespaceEdge

type StatusNamespaceEdge struct {
	Node   *StatusNamespace `json:"node"`
	Cursor Cursor           `json:"cursor"`
}

StatusNamespaceEdge is the edge representation of StatusNamespace.

type StatusNamespaceEdges

type StatusNamespaceEdges struct {
	// Statuses holds the value of the statuses edge.
	Statuses []*Status `json:"statuses,omitempty"`
	// contains filtered or unexported fields
}

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

func (StatusNamespaceEdges) StatusesOrErr

func (e StatusNamespaceEdges) StatusesOrErr() ([]*Status, error)

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

type StatusNamespaceGroupBy

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

StatusNamespaceGroupBy is the group-by builder for StatusNamespace entities.

func (*StatusNamespaceGroupBy) Aggregate

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

func (*StatusNamespaceGroupBy) Bool

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

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

func (*StatusNamespaceGroupBy) BoolX

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

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

func (*StatusNamespaceGroupBy) Bools

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

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

func (*StatusNamespaceGroupBy) BoolsX

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

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

func (*StatusNamespaceGroupBy) Float64

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

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

func (*StatusNamespaceGroupBy) Float64X

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

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

func (*StatusNamespaceGroupBy) Float64s

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

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

func (*StatusNamespaceGroupBy) Float64sX

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

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

func (*StatusNamespaceGroupBy) Int

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

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

func (*StatusNamespaceGroupBy) IntX

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

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

func (*StatusNamespaceGroupBy) Ints

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

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

func (*StatusNamespaceGroupBy) IntsX

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

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

func (*StatusNamespaceGroupBy) Scan

func (sngb *StatusNamespaceGroupBy) Scan(ctx context.Context, v any) error

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

func (*StatusNamespaceGroupBy) ScanX

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

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

func (*StatusNamespaceGroupBy) String

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

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

func (*StatusNamespaceGroupBy) StringX

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

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

func (*StatusNamespaceGroupBy) Strings

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

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

func (*StatusNamespaceGroupBy) StringsX

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

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

type StatusNamespaceMutation

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

StatusNamespaceMutation represents an operation that mutates the StatusNamespace nodes in the graph.

func (*StatusNamespaceMutation) AddField

func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) AddStatusIDs

func (m *StatusNamespaceMutation) AddStatusIDs(ids ...gidx.PrefixedID)

AddStatusIDs adds the "statuses" edge to the Status entity by ids.

func (*StatusNamespaceMutation) AddedEdges

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

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

func (*StatusNamespaceMutation) AddedField

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

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

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

func (*StatusNamespaceMutation) AddedIDs

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

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

func (*StatusNamespaceMutation) ClearEdge

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

func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) ClearStatuses

func (m *StatusNamespaceMutation) ClearStatuses()

ClearStatuses clears the "statuses" edge to the Status entity.

func (*StatusNamespaceMutation) ClearedEdges

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

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

func (*StatusNamespaceMutation) ClearedFields

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

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

func (StatusNamespaceMutation) Client

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

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

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

func (*StatusNamespaceMutation) EdgeCleared

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

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

func (*StatusNamespaceMutation) Field

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

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

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

func (*StatusNamespaceMutation) Fields

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

func (m *StatusNamespaceMutation) ID() (id gidx.PrefixedID, 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 (*StatusNamespaceMutation) 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 (*StatusNamespaceMutation) Name

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

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

func (*StatusNamespaceMutation) OldCreatedAt

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

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

func (*StatusNamespaceMutation) OldField

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

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

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

func (*StatusNamespaceMutation) OldPrivate

func (m *StatusNamespaceMutation) OldPrivate(ctx context.Context) (v bool, err error)

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

func (*StatusNamespaceMutation) OldResourceProviderID

func (m *StatusNamespaceMutation) OldResourceProviderID(ctx context.Context) (v gidx.PrefixedID, err error)

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

func (*StatusNamespaceMutation) OldUpdatedAt

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

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

func (*StatusNamespaceMutation) Op

func (m *StatusNamespaceMutation) Op() Op

Op returns the operation name.

func (*StatusNamespaceMutation) Private

func (m *StatusNamespaceMutation) Private() (r bool, exists bool)

Private returns the value of the "private" field in the mutation.

func (*StatusNamespaceMutation) RemoveStatusIDs

func (m *StatusNamespaceMutation) RemoveStatusIDs(ids ...gidx.PrefixedID)

RemoveStatusIDs removes the "statuses" edge to the Status entity by IDs.

func (*StatusNamespaceMutation) RemovedEdges

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

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

func (*StatusNamespaceMutation) RemovedIDs

func (m *StatusNamespaceMutation) 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 (*StatusNamespaceMutation) RemovedStatusesIDs

func (m *StatusNamespaceMutation) RemovedStatusesIDs() (ids []gidx.PrefixedID)

RemovedStatuses returns the removed IDs of the "statuses" edge to the Status entity.

func (*StatusNamespaceMutation) ResetCreatedAt

func (m *StatusNamespaceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*StatusNamespaceMutation) ResetEdge

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

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

func (m *StatusNamespaceMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*StatusNamespaceMutation) ResetPrivate

func (m *StatusNamespaceMutation) ResetPrivate()

ResetPrivate resets all changes to the "private" field.

func (*StatusNamespaceMutation) ResetResourceProviderID

func (m *StatusNamespaceMutation) ResetResourceProviderID()

ResetResourceProviderID resets all changes to the "resource_provider_id" field.

func (*StatusNamespaceMutation) ResetStatuses

func (m *StatusNamespaceMutation) ResetStatuses()

ResetStatuses resets all changes to the "statuses" edge.

func (*StatusNamespaceMutation) ResetUpdatedAt

func (m *StatusNamespaceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*StatusNamespaceMutation) ResourceProviderID

func (m *StatusNamespaceMutation) ResourceProviderID() (r gidx.PrefixedID, exists bool)

ResourceProviderID returns the value of the "resource_provider_id" field in the mutation.

func (*StatusNamespaceMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*StatusNamespaceMutation) SetField

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

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

func (*StatusNamespaceMutation) SetName

func (m *StatusNamespaceMutation) SetName(s string)

SetName sets the "name" field.

func (*StatusNamespaceMutation) SetOp

func (m *StatusNamespaceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*StatusNamespaceMutation) SetPrivate

func (m *StatusNamespaceMutation) SetPrivate(b bool)

SetPrivate sets the "private" field.

func (*StatusNamespaceMutation) SetResourceProviderID

func (m *StatusNamespaceMutation) SetResourceProviderID(gi gidx.PrefixedID)

SetResourceProviderID sets the "resource_provider_id" field.

func (*StatusNamespaceMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*StatusNamespaceMutation) StatusesCleared

func (m *StatusNamespaceMutation) StatusesCleared() bool

StatusesCleared reports if the "statuses" edge to the Status entity was cleared.

func (*StatusNamespaceMutation) StatusesIDs

func (m *StatusNamespaceMutation) StatusesIDs() (ids []gidx.PrefixedID)

StatusesIDs returns the "statuses" edge IDs in the mutation.

func (StatusNamespaceMutation) Tx

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

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

func (*StatusNamespaceMutation) Type

func (m *StatusNamespaceMutation) Type() string

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

func (*StatusNamespaceMutation) UpdatedAt

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

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

func (*StatusNamespaceMutation) Where

Where appends a list predicates to the StatusNamespaceMutation builder.

func (*StatusNamespaceMutation) WhereP

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

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

type StatusNamespaceOrder

type StatusNamespaceOrder struct {
	Direction OrderDirection             `json:"direction"`
	Field     *StatusNamespaceOrderField `json:"field"`
}

StatusNamespaceOrder defines the ordering of StatusNamespace.

type StatusNamespaceOrderField

type StatusNamespaceOrderField struct {
	// Value extracts the ordering value from the given StatusNamespace.
	Value func(*StatusNamespace) (ent.Value, error)
	// contains filtered or unexported fields
}

StatusNamespaceOrderField defines the ordering field of StatusNamespace.

func (StatusNamespaceOrderField) MarshalGQL

func (f StatusNamespaceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (StatusNamespaceOrderField) String

func (f StatusNamespaceOrderField) String() string

String implement fmt.Stringer interface.

func (*StatusNamespaceOrderField) UnmarshalGQL

func (f *StatusNamespaceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type StatusNamespacePaginateOption

type StatusNamespacePaginateOption func(*statusnamespacePager) error

StatusNamespacePaginateOption enables pagination customization.

func WithStatusNamespaceFilter

func WithStatusNamespaceFilter(filter func(*StatusNamespaceQuery) (*StatusNamespaceQuery, error)) StatusNamespacePaginateOption

WithStatusNamespaceFilter configures pagination filter.

func WithStatusNamespaceOrder

func WithStatusNamespaceOrder(order *StatusNamespaceOrder) StatusNamespacePaginateOption

WithStatusNamespaceOrder configures pagination ordering.

type StatusNamespaceQuery

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

StatusNamespaceQuery is the builder for querying StatusNamespace entities.

func (*StatusNamespaceQuery) Aggregate

Aggregate returns a StatusNamespaceSelect configured with the given aggregations.

func (*StatusNamespaceQuery) All

All executes the query and returns a list of StatusNamespaces.

func (*StatusNamespaceQuery) AllX

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

func (*StatusNamespaceQuery) Clone

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

func (*StatusNamespaceQuery) CollectFields

func (sn *StatusNamespaceQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusNamespaceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*StatusNamespaceQuery) Count

func (snq *StatusNamespaceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StatusNamespaceQuery) CountX

func (snq *StatusNamespaceQuery) CountX(ctx context.Context) int

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

func (*StatusNamespaceQuery) Exist

func (snq *StatusNamespaceQuery) Exist(ctx context.Context) (bool, error)

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

func (*StatusNamespaceQuery) ExistX

func (snq *StatusNamespaceQuery) ExistX(ctx context.Context) bool

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

func (*StatusNamespaceQuery) First

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

func (*StatusNamespaceQuery) FirstID

func (snq *StatusNamespaceQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*StatusNamespaceQuery) FirstIDX

func (snq *StatusNamespaceQuery) FirstIDX(ctx context.Context) gidx.PrefixedID

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

func (*StatusNamespaceQuery) FirstX

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

func (*StatusNamespaceQuery) GroupBy

func (snq *StatusNamespaceQuery) GroupBy(field string, fields ...string) *StatusNamespaceGroupBy

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.StatusNamespace.Query().
	GroupBy(statusnamespace.FieldCreatedAt).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*StatusNamespaceQuery) IDs

func (snq *StatusNamespaceQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

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

func (*StatusNamespaceQuery) IDsX

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

func (*StatusNamespaceQuery) Limit

func (snq *StatusNamespaceQuery) Limit(limit int) *StatusNamespaceQuery

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

func (*StatusNamespaceQuery) Offset

func (snq *StatusNamespaceQuery) Offset(offset int) *StatusNamespaceQuery

Offset to start from.

func (*StatusNamespaceQuery) Only

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

func (*StatusNamespaceQuery) OnlyID

func (snq *StatusNamespaceQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

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

func (*StatusNamespaceQuery) OnlyIDX

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

func (*StatusNamespaceQuery) OnlyX

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

func (*StatusNamespaceQuery) Order

Order specifies how the records should be ordered.

func (*StatusNamespaceQuery) Paginate

func (sn *StatusNamespaceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...StatusNamespacePaginateOption,
) (*StatusNamespaceConnection, error)

Paginate executes the query and returns a relay based cursor connection to StatusNamespace.

func (*StatusNamespaceQuery) QueryStatuses

func (snq *StatusNamespaceQuery) QueryStatuses() *StatusQuery

QueryStatuses chains the current query on the "statuses" edge.

func (*StatusNamespaceQuery) Select

func (snq *StatusNamespaceQuery) Select(fields ...string) *StatusNamespaceSelect

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

func (*StatusNamespaceQuery) Unique

func (snq *StatusNamespaceQuery) Unique(unique bool) *StatusNamespaceQuery

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

Where adds a new predicate for the StatusNamespaceQuery builder.

func (*StatusNamespaceQuery) WithNamedStatuses

func (snq *StatusNamespaceQuery) WithNamedStatuses(name string, opts ...func(*StatusQuery)) *StatusNamespaceQuery

WithNamedStatuses tells the query-builder to eager-load the nodes that are connected to the "statuses" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*StatusNamespaceQuery) WithStatuses

func (snq *StatusNamespaceQuery) WithStatuses(opts ...func(*StatusQuery)) *StatusNamespaceQuery

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

type StatusNamespaceSelect

type StatusNamespaceSelect struct {
	*StatusNamespaceQuery
	// contains filtered or unexported fields
}

StatusNamespaceSelect is the builder for selecting fields of StatusNamespace entities.

func (*StatusNamespaceSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*StatusNamespaceSelect) Bool

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

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

func (*StatusNamespaceSelect) BoolX

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

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

func (*StatusNamespaceSelect) Bools

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

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

func (*StatusNamespaceSelect) BoolsX

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

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

func (*StatusNamespaceSelect) Float64

func (s *StatusNamespaceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StatusNamespaceSelect) Float64X

func (s *StatusNamespaceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StatusNamespaceSelect) Float64s

func (s *StatusNamespaceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StatusNamespaceSelect) Float64sX

func (s *StatusNamespaceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StatusNamespaceSelect) Int

func (s *StatusNamespaceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StatusNamespaceSelect) IntX

func (s *StatusNamespaceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StatusNamespaceSelect) Ints

func (s *StatusNamespaceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StatusNamespaceSelect) IntsX

func (s *StatusNamespaceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StatusNamespaceSelect) Scan

func (sns *StatusNamespaceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StatusNamespaceSelect) ScanX

func (s *StatusNamespaceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StatusNamespaceSelect) String

func (s *StatusNamespaceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StatusNamespaceSelect) StringX

func (s *StatusNamespaceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StatusNamespaceSelect) Strings

func (s *StatusNamespaceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StatusNamespaceSelect) StringsX

func (s *StatusNamespaceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StatusNamespaceUpdate

type StatusNamespaceUpdate struct {
	// contains filtered or unexported fields
}

StatusNamespaceUpdate is the builder for updating StatusNamespace entities.

func (*StatusNamespaceUpdate) AddStatusIDs

func (snu *StatusNamespaceUpdate) AddStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdate

AddStatusIDs adds the "statuses" edge to the Status entity by IDs.

func (*StatusNamespaceUpdate) AddStatuses

func (snu *StatusNamespaceUpdate) AddStatuses(s ...*Status) *StatusNamespaceUpdate

AddStatuses adds the "statuses" edges to the Status entity.

func (*StatusNamespaceUpdate) ClearStatuses

func (snu *StatusNamespaceUpdate) ClearStatuses() *StatusNamespaceUpdate

ClearStatuses clears all "statuses" edges to the Status entity.

func (*StatusNamespaceUpdate) Exec

func (snu *StatusNamespaceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StatusNamespaceUpdate) ExecX

func (snu *StatusNamespaceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatusNamespaceUpdate) Mutation

Mutation returns the StatusNamespaceMutation object of the builder.

func (*StatusNamespaceUpdate) RemoveStatusIDs

func (snu *StatusNamespaceUpdate) RemoveStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdate

RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.

func (*StatusNamespaceUpdate) RemoveStatuses

func (snu *StatusNamespaceUpdate) RemoveStatuses(s ...*Status) *StatusNamespaceUpdate

RemoveStatuses removes "statuses" edges to Status entities.

func (*StatusNamespaceUpdate) Save

func (snu *StatusNamespaceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*StatusNamespaceUpdate) SaveX

func (snu *StatusNamespaceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StatusNamespaceUpdate) SetInput

SetInput applies the change-set in the UpdateStatusNamespaceInput on the StatusNamespaceUpdate builder.

func (*StatusNamespaceUpdate) SetName

SetName sets the "name" field.

func (*StatusNamespaceUpdate) SetNillablePrivate

func (snu *StatusNamespaceUpdate) SetNillablePrivate(b *bool) *StatusNamespaceUpdate

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*StatusNamespaceUpdate) SetPrivate

func (snu *StatusNamespaceUpdate) SetPrivate(b bool) *StatusNamespaceUpdate

SetPrivate sets the "private" field.

func (*StatusNamespaceUpdate) Where

Where appends a list predicates to the StatusNamespaceUpdate builder.

type StatusNamespaceUpdateOne

type StatusNamespaceUpdateOne struct {
	// contains filtered or unexported fields
}

StatusNamespaceUpdateOne is the builder for updating a single StatusNamespace entity.

func (*StatusNamespaceUpdateOne) AddStatusIDs

AddStatusIDs adds the "statuses" edge to the Status entity by IDs.

func (*StatusNamespaceUpdateOne) AddStatuses

func (snuo *StatusNamespaceUpdateOne) AddStatuses(s ...*Status) *StatusNamespaceUpdateOne

AddStatuses adds the "statuses" edges to the Status entity.

func (*StatusNamespaceUpdateOne) ClearStatuses

func (snuo *StatusNamespaceUpdateOne) ClearStatuses() *StatusNamespaceUpdateOne

ClearStatuses clears all "statuses" edges to the Status entity.

func (*StatusNamespaceUpdateOne) Exec

Exec executes the query on the entity.

func (*StatusNamespaceUpdateOne) ExecX

func (snuo *StatusNamespaceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatusNamespaceUpdateOne) Mutation

Mutation returns the StatusNamespaceMutation object of the builder.

func (*StatusNamespaceUpdateOne) RemoveStatusIDs

func (snuo *StatusNamespaceUpdateOne) RemoveStatusIDs(ids ...gidx.PrefixedID) *StatusNamespaceUpdateOne

RemoveStatusIDs removes the "statuses" edge to Status entities by IDs.

func (*StatusNamespaceUpdateOne) RemoveStatuses

func (snuo *StatusNamespaceUpdateOne) RemoveStatuses(s ...*Status) *StatusNamespaceUpdateOne

RemoveStatuses removes "statuses" edges to Status entities.

func (*StatusNamespaceUpdateOne) Save

Save executes the query and returns the updated StatusNamespace entity.

func (*StatusNamespaceUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*StatusNamespaceUpdateOne) Select

func (snuo *StatusNamespaceUpdateOne) Select(field string, fields ...string) *StatusNamespaceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StatusNamespaceUpdateOne) SetInput

SetInput applies the change-set in the UpdateStatusNamespaceInput on the StatusNamespaceUpdateOne builder.

func (*StatusNamespaceUpdateOne) SetName

SetName sets the "name" field.

func (*StatusNamespaceUpdateOne) SetNillablePrivate

func (snuo *StatusNamespaceUpdateOne) SetNillablePrivate(b *bool) *StatusNamespaceUpdateOne

SetNillablePrivate sets the "private" field if the given value is not nil.

func (*StatusNamespaceUpdateOne) SetPrivate

SetPrivate sets the "private" field.

func (*StatusNamespaceUpdateOne) Where

Where appends a list predicates to the StatusNamespaceUpdate builder.

type StatusNamespaceWhereInput

type StatusNamespaceWhereInput struct {
	Predicates []predicate.StatusNamespace  `json:"-"`
	Not        *StatusNamespaceWhereInput   `json:"not,omitempty"`
	Or         []*StatusNamespaceWhereInput `json:"or,omitempty"`
	And        []*StatusNamespaceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *gidx.PrefixedID  `json:"id,omitempty"`
	IDNEQ   *gidx.PrefixedID  `json:"idNEQ,omitempty"`
	IDIn    []gidx.PrefixedID `json:"idIn,omitempty"`
	IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"`
	IDGT    *gidx.PrefixedID  `json:"idGT,omitempty"`
	IDGTE   *gidx.PrefixedID  `json:"idGTE,omitempty"`
	IDLT    *gidx.PrefixedID  `json:"idLT,omitempty"`
	IDLTE   *gidx.PrefixedID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`
}

StatusNamespaceWhereInput represents a where input for filtering StatusNamespace queries.

func (*StatusNamespaceWhereInput) AddPredicates

func (i *StatusNamespaceWhereInput) AddPredicates(predicates ...predicate.StatusNamespace)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*StatusNamespaceWhereInput) Filter

Filter applies the StatusNamespaceWhereInput filter on the StatusNamespaceQuery builder.

func (*StatusNamespaceWhereInput) P

P returns a predicate for filtering statusnamespaces. An error is returned if the input is empty or invalid.

type StatusNamespaces

type StatusNamespaces []*StatusNamespace

StatusNamespaces is a parsable slice of StatusNamespace.

type StatusOrder

type StatusOrder struct {
	Direction OrderDirection    `json:"direction"`
	Field     *StatusOrderField `json:"field"`
}

StatusOrder defines the ordering of Status.

type StatusOrderField

type StatusOrderField struct {
	// Value extracts the ordering value from the given Status.
	Value func(*Status) (ent.Value, error)
	// contains filtered or unexported fields
}

StatusOrderField defines the ordering field of Status.

func (StatusOrderField) MarshalGQL

func (f StatusOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (StatusOrderField) String

func (f StatusOrderField) String() string

String implement fmt.Stringer interface.

func (*StatusOrderField) UnmarshalGQL

func (f *StatusOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type StatusPaginateOption

type StatusPaginateOption func(*statusPager) error

StatusPaginateOption enables pagination customization.

func WithStatusFilter

func WithStatusFilter(filter func(*StatusQuery) (*StatusQuery, error)) StatusPaginateOption

WithStatusFilter configures pagination filter.

func WithStatusOrder

func WithStatusOrder(order *StatusOrder) StatusPaginateOption

WithStatusOrder configures pagination ordering.

type StatusQuery

type StatusQuery struct {
	// contains filtered or unexported fields
}

StatusQuery is the builder for querying Status entities.

func (*StatusQuery) Aggregate

func (sq *StatusQuery) Aggregate(fns ...AggregateFunc) *StatusSelect

Aggregate returns a StatusSelect configured with the given aggregations.

func (*StatusQuery) All

func (sq *StatusQuery) All(ctx context.Context) ([]*Status, error)

All executes the query and returns a list of StatusSlice.

func (*StatusQuery) AllX

func (sq *StatusQuery) AllX(ctx context.Context) []*Status

AllX is like All, but panics if an error occurs.

func (*StatusQuery) Clone

func (sq *StatusQuery) Clone() *StatusQuery

Clone returns a duplicate of the StatusQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*StatusQuery) CollectFields

func (s *StatusQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*StatusQuery) Count

func (sq *StatusQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*StatusQuery) CountX

func (sq *StatusQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*StatusQuery) Exist

func (sq *StatusQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*StatusQuery) ExistX

func (sq *StatusQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*StatusQuery) First

func (sq *StatusQuery) First(ctx context.Context) (*Status, error)

First returns the first Status entity from the query. Returns a *NotFoundError when no Status was found.

func (*StatusQuery) FirstID

func (sq *StatusQuery) FirstID(ctx context.Context) (id gidx.PrefixedID, err error)

FirstID returns the first Status ID from the query. Returns a *NotFoundError when no Status ID was found.

func (*StatusQuery) FirstIDX

func (sq *StatusQuery) FirstIDX(ctx context.Context) gidx.PrefixedID

FirstIDX is like FirstID, but panics if an error occurs.

func (*StatusQuery) FirstX

func (sq *StatusQuery) FirstX(ctx context.Context) *Status

FirstX is like First, but panics if an error occurs.

func (*StatusQuery) GroupBy

func (sq *StatusQuery) GroupBy(field string, fields ...string) *StatusGroupBy

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.Status.Query().
	GroupBy(status.FieldCreatedAt).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*StatusQuery) IDs

func (sq *StatusQuery) IDs(ctx context.Context) (ids []gidx.PrefixedID, err error)

IDs executes the query and returns a list of Status IDs.

func (*StatusQuery) IDsX

func (sq *StatusQuery) IDsX(ctx context.Context) []gidx.PrefixedID

IDsX is like IDs, but panics if an error occurs.

func (*StatusQuery) Limit

func (sq *StatusQuery) Limit(limit int) *StatusQuery

Limit the number of records to be returned by this query.

func (*StatusQuery) Offset

func (sq *StatusQuery) Offset(offset int) *StatusQuery

Offset to start from.

func (*StatusQuery) Only

func (sq *StatusQuery) Only(ctx context.Context) (*Status, error)

Only returns a single Status entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Status entity is found. Returns a *NotFoundError when no Status entities are found.

func (*StatusQuery) OnlyID

func (sq *StatusQuery) OnlyID(ctx context.Context) (id gidx.PrefixedID, err error)

OnlyID is like Only, but returns the only Status ID in the query. Returns a *NotSingularError when more than one Status ID is found. Returns a *NotFoundError when no entities are found.

func (*StatusQuery) OnlyIDX

func (sq *StatusQuery) OnlyIDX(ctx context.Context) gidx.PrefixedID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*StatusQuery) OnlyX

func (sq *StatusQuery) OnlyX(ctx context.Context) *Status

OnlyX is like Only, but panics if an error occurs.

func (*StatusQuery) Order

func (sq *StatusQuery) Order(o ...status.OrderOption) *StatusQuery

Order specifies how the records should be ordered.

func (*StatusQuery) Paginate

func (s *StatusQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...StatusPaginateOption,
) (*StatusConnection, error)

Paginate executes the query and returns a relay based cursor connection to Status.

func (*StatusQuery) QueryMetadata

func (sq *StatusQuery) QueryMetadata() *MetadataQuery

QueryMetadata chains the current query on the "metadata" edge.

func (*StatusQuery) QueryNamespace

func (sq *StatusQuery) QueryNamespace() *StatusNamespaceQuery

QueryNamespace chains the current query on the "namespace" edge.

func (*StatusQuery) Select

func (sq *StatusQuery) Select(fields ...string) *StatusSelect

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.Status.Query().
	Select(status.FieldCreatedAt).
	Scan(ctx, &v)

func (*StatusQuery) Unique

func (sq *StatusQuery) Unique(unique bool) *StatusQuery

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 (*StatusQuery) Where

func (sq *StatusQuery) Where(ps ...predicate.Status) *StatusQuery

Where adds a new predicate for the StatusQuery builder.

func (*StatusQuery) WithMetadata

func (sq *StatusQuery) WithMetadata(opts ...func(*MetadataQuery)) *StatusQuery

WithMetadata tells the query-builder to eager-load the nodes that are connected to the "metadata" edge. The optional arguments are used to configure the query builder of the edge.

func (*StatusQuery) WithNamespace

func (sq *StatusQuery) WithNamespace(opts ...func(*StatusNamespaceQuery)) *StatusQuery

WithNamespace tells the query-builder to eager-load the nodes that are connected to the "namespace" edge. The optional arguments are used to configure the query builder of the edge.

type StatusSelect

type StatusSelect struct {
	*StatusQuery
	// contains filtered or unexported fields
}

StatusSelect is the builder for selecting fields of Status entities.

func (*StatusSelect) Aggregate

func (ss *StatusSelect) Aggregate(fns ...AggregateFunc) *StatusSelect

Aggregate adds the given aggregation functions to the selector query.

func (*StatusSelect) Bool

func (s *StatusSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*StatusSelect) BoolX

func (s *StatusSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*StatusSelect) Bools

func (s *StatusSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*StatusSelect) BoolsX

func (s *StatusSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*StatusSelect) Float64

func (s *StatusSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*StatusSelect) Float64X

func (s *StatusSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*StatusSelect) Float64s

func (s *StatusSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*StatusSelect) Float64sX

func (s *StatusSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*StatusSelect) Int

func (s *StatusSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*StatusSelect) IntX

func (s *StatusSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*StatusSelect) Ints

func (s *StatusSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*StatusSelect) IntsX

func (s *StatusSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*StatusSelect) Scan

func (ss *StatusSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*StatusSelect) ScanX

func (s *StatusSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*StatusSelect) String

func (s *StatusSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*StatusSelect) StringX

func (s *StatusSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*StatusSelect) Strings

func (s *StatusSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*StatusSelect) StringsX

func (s *StatusSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type StatusSlice

type StatusSlice []*Status

StatusSlice is a parsable slice of Status.

type StatusUpdate

type StatusUpdate struct {
	// contains filtered or unexported fields
}

StatusUpdate is the builder for updating Status entities.

func (*StatusUpdate) AppendData

func (su *StatusUpdate) AppendData(jm json.RawMessage) *StatusUpdate

AppendData appends jm to the "data" field.

func (*StatusUpdate) Exec

func (su *StatusUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*StatusUpdate) ExecX

func (su *StatusUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatusUpdate) Mutation

func (su *StatusUpdate) Mutation() *StatusMutation

Mutation returns the StatusMutation object of the builder.

func (*StatusUpdate) Save

func (su *StatusUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*StatusUpdate) SaveX

func (su *StatusUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*StatusUpdate) SetData

func (su *StatusUpdate) SetData(jm json.RawMessage) *StatusUpdate

SetData sets the "data" field.

func (*StatusUpdate) SetInput

SetInput applies the change-set in the UpdateStatusInput on the StatusUpdate builder.

func (*StatusUpdate) Where

func (su *StatusUpdate) Where(ps ...predicate.Status) *StatusUpdate

Where appends a list predicates to the StatusUpdate builder.

type StatusUpdateOne

type StatusUpdateOne struct {
	// contains filtered or unexported fields
}

StatusUpdateOne is the builder for updating a single Status entity.

func (*StatusUpdateOne) AppendData

func (suo *StatusUpdateOne) AppendData(jm json.RawMessage) *StatusUpdateOne

AppendData appends jm to the "data" field.

func (*StatusUpdateOne) Exec

func (suo *StatusUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*StatusUpdateOne) ExecX

func (suo *StatusUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*StatusUpdateOne) Mutation

func (suo *StatusUpdateOne) Mutation() *StatusMutation

Mutation returns the StatusMutation object of the builder.

func (*StatusUpdateOne) Save

func (suo *StatusUpdateOne) Save(ctx context.Context) (*Status, error)

Save executes the query and returns the updated Status entity.

func (*StatusUpdateOne) SaveX

func (suo *StatusUpdateOne) SaveX(ctx context.Context) *Status

SaveX is like Save, but panics if an error occurs.

func (*StatusUpdateOne) Select

func (suo *StatusUpdateOne) Select(field string, fields ...string) *StatusUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*StatusUpdateOne) SetData

func (suo *StatusUpdateOne) SetData(jm json.RawMessage) *StatusUpdateOne

SetData sets the "data" field.

func (*StatusUpdateOne) SetInput

SetInput applies the change-set in the UpdateStatusInput on the StatusUpdateOne builder.

func (*StatusUpdateOne) Where

func (suo *StatusUpdateOne) Where(ps ...predicate.Status) *StatusUpdateOne

Where appends a list predicates to the StatusUpdate builder.

type StatusWhereInput

type StatusWhereInput struct {
	Predicates []predicate.Status  `json:"-"`
	Not        *StatusWhereInput   `json:"not,omitempty"`
	Or         []*StatusWhereInput `json:"or,omitempty"`
	And        []*StatusWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *gidx.PrefixedID  `json:"id,omitempty"`
	IDNEQ   *gidx.PrefixedID  `json:"idNEQ,omitempty"`
	IDIn    []gidx.PrefixedID `json:"idIn,omitempty"`
	IDNotIn []gidx.PrefixedID `json:"idNotIn,omitempty"`
	IDGT    *gidx.PrefixedID  `json:"idGT,omitempty"`
	IDGTE   *gidx.PrefixedID  `json:"idGTE,omitempty"`
	IDLT    *gidx.PrefixedID  `json:"idLT,omitempty"`
	IDLTE   *gidx.PrefixedID  `json:"idLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt      *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ   *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn    []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT    *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE   *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT    *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE   *time.Time  `json:"updatedAtLTE,omitempty"`

	// "source" field predicates.
	Source             *string  `json:"source,omitempty"`
	SourceNEQ          *string  `json:"sourceNEQ,omitempty"`
	SourceIn           []string `json:"sourceIn,omitempty"`
	SourceNotIn        []string `json:"sourceNotIn,omitempty"`
	SourceGT           *string  `json:"sourceGT,omitempty"`
	SourceGTE          *string  `json:"sourceGTE,omitempty"`
	SourceLT           *string  `json:"sourceLT,omitempty"`
	SourceLTE          *string  `json:"sourceLTE,omitempty"`
	SourceContains     *string  `json:"sourceContains,omitempty"`
	SourceHasPrefix    *string  `json:"sourceHasPrefix,omitempty"`
	SourceHasSuffix    *string  `json:"sourceHasSuffix,omitempty"`
	SourceEqualFold    *string  `json:"sourceEqualFold,omitempty"`
	SourceContainsFold *string  `json:"sourceContainsFold,omitempty"`

	// "namespace" edge predicates.
	HasNamespace     *bool                        `json:"hasNamespace,omitempty"`
	HasNamespaceWith []*StatusNamespaceWhereInput `json:"hasNamespaceWith,omitempty"`

	// "metadata" edge predicates.
	HasMetadata     *bool                 `json:"hasMetadata,omitempty"`
	HasMetadataWith []*MetadataWhereInput `json:"hasMetadataWith,omitempty"`
}

StatusWhereInput represents a where input for filtering Status queries.

func (*StatusWhereInput) AddPredicates

func (i *StatusWhereInput) AddPredicates(predicates ...predicate.Status)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*StatusWhereInput) Filter

func (i *StatusWhereInput) Filter(q *StatusQuery) (*StatusQuery, error)

Filter applies the StatusWhereInput filter on the StatusQuery builder.

func (*StatusWhereInput) P

P returns a predicate for filtering statusslice. An error is returned if the input is empty or invalid.

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 {

	// Annotation is the client for interacting with the Annotation builders.
	Annotation *AnnotationClient
	// AnnotationNamespace is the client for interacting with the AnnotationNamespace builders.
	AnnotationNamespace *AnnotationNamespaceClient
	// Metadata is the client for interacting with the Metadata builders.
	Metadata *MetadataClient
	// Status is the client for interacting with the Status builders.
	Status *StatusClient
	// StatusNamespace is the client for interacting with the StatusNamespace builders.
	StatusNamespace *StatusNamespaceClient
	// 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 UpdateAnnotationNamespaceInput

type UpdateAnnotationNamespaceInput struct {
	Name    *string
	Private *bool
}

UpdateAnnotationNamespaceInput represents a mutation input for updating annotationnamespaces.

func (*UpdateAnnotationNamespaceInput) Mutate

Mutate applies the UpdateAnnotationNamespaceInput on the AnnotationNamespaceMutation builder.

type UpdateStatusInput

type UpdateStatusInput struct {
	Data       json.RawMessage
	AppendData json.RawMessage
}

UpdateStatusInput represents a mutation input for updating statusslice.

func (*UpdateStatusInput) Mutate

func (i *UpdateStatusInput) Mutate(m *StatusMutation)

Mutate applies the UpdateStatusInput on the StatusMutation builder.

type UpdateStatusNamespaceInput

type UpdateStatusNamespaceInput struct {
	Name    *string
	Private *bool
}

UpdateStatusNamespaceInput represents a mutation input for updating statusnamespaces.

func (*UpdateStatusNamespaceInput) Mutate

Mutate applies the UpdateStatusNamespaceInput on the StatusNamespaceMutation builder.

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