generated

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 19 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.
	TypeActionLogEntry    = "ActionLogEntry"
	TypeActionLogSettings = "ActionLogSettings"
)

Variables

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.

Types

type ActionLogEntries

type ActionLogEntries []*ActionLogEntry

ActionLogEntries is a parsable slice of ActionLogEntry.

type ActionLogEntry

type ActionLogEntry struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// ActionGroup holds the value of the "action_group" field.
	ActionGroup string `json:"action_group,omitempty"`
	// ActorID holds the value of the "actor_id" field.
	ActorID *int `json:"actor_id,omitempty"`
	// ActorName holds the value of the "actor_name" field.
	ActorName string `json:"actor_name,omitempty"`
	// IP holds the value of the "ip" field.
	IP string `json:"ip,omitempty"`
	// ObjectKind holds the value of the "object_kind" field.
	ObjectKind string `json:"object_kind,omitempty"`
	// ObjectID holds the value of the "object_id" field.
	ObjectID string `json:"object_id,omitempty"`
	// ObjectLabel holds the value of the "object_label" field.
	ObjectLabel string `json:"object_label,omitempty"`
	// ObjectType holds the value of the "object_type" field.
	ObjectType string `json:"object_type,omitempty"`
	// ObjectURL holds the value of the "object_url" field.
	ObjectURL string `json:"object_url,omitempty"`
	// Changes holds the value of the "changes" field.
	Changes string `json:"changes,omitempty"`
	// contains filtered or unexported fields
}

ActionLogEntry is the model entity for the ActionLogEntry schema.

func (*ActionLogEntry) String

func (_m *ActionLogEntry) String() string

String implements the fmt.Stringer.

func (*ActionLogEntry) Unwrap

func (_m *ActionLogEntry) Unwrap() *ActionLogEntry

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

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

func (*ActionLogEntry) Value

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

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

type ActionLogEntryClient

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

ActionLogEntryClient is a client for the ActionLogEntry schema.

func NewActionLogEntryClient

func NewActionLogEntryClient(c config) *ActionLogEntryClient

NewActionLogEntryClient returns a client for the ActionLogEntry from the given config.

func (*ActionLogEntryClient) Create

Create returns a builder for creating a ActionLogEntry entity.

func (*ActionLogEntryClient) CreateBulk

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

func (*ActionLogEntryClient) Delete

Delete returns a delete builder for ActionLogEntry.

func (*ActionLogEntryClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ActionLogEntryClient) DeleteOneID

func (c *ActionLogEntryClient) DeleteOneID(id int) *ActionLogEntryDeleteOne

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

func (*ActionLogEntryClient) Get

Get returns a ActionLogEntry entity by its id.

func (*ActionLogEntryClient) GetX

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

func (*ActionLogEntryClient) Hooks

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

Hooks returns the client hooks.

func (*ActionLogEntryClient) Intercept

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

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

func (*ActionLogEntryClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ActionLogEntryClient) MapCreateBulk

func (c *ActionLogEntryClient) MapCreateBulk(slice any, setFunc func(*ActionLogEntryCreate, int)) *ActionLogEntryCreateBulk

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

Query returns a query builder for ActionLogEntry.

func (*ActionLogEntryClient) Update

Update returns an update builder for ActionLogEntry.

func (*ActionLogEntryClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ActionLogEntryClient) UpdateOneID

func (c *ActionLogEntryClient) UpdateOneID(id int) *ActionLogEntryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ActionLogEntryClient) Use

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

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

type ActionLogEntryCreate

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

ActionLogEntryCreate is the builder for creating a ActionLogEntry entity.

func (*ActionLogEntryCreate) Exec

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

Exec executes the query.

func (*ActionLogEntryCreate) ExecX

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

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

func (*ActionLogEntryCreate) Mutation

Mutation returns the ActionLogEntryMutation object of the builder.

func (*ActionLogEntryCreate) Save

Save creates the ActionLogEntry in the database.

func (*ActionLogEntryCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ActionLogEntryCreate) SetActionGroup

func (_c *ActionLogEntryCreate) SetActionGroup(v string) *ActionLogEntryCreate

SetActionGroup sets the "action_group" field.

func (*ActionLogEntryCreate) SetActorID

func (_c *ActionLogEntryCreate) SetActorID(v int) *ActionLogEntryCreate

SetActorID sets the "actor_id" field.

func (*ActionLogEntryCreate) SetActorName

func (_c *ActionLogEntryCreate) SetActorName(v string) *ActionLogEntryCreate

SetActorName sets the "actor_name" field.

func (*ActionLogEntryCreate) SetChanges

SetChanges sets the "changes" field.

func (*ActionLogEntryCreate) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ActionLogEntryCreate) SetID

SetID sets the "id" field.

func (*ActionLogEntryCreate) SetIP

SetIP sets the "ip" field.

func (*ActionLogEntryCreate) SetNillableActorID

func (_c *ActionLogEntryCreate) SetNillableActorID(v *int) *ActionLogEntryCreate

SetNillableActorID sets the "actor_id" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableActorName

func (_c *ActionLogEntryCreate) SetNillableActorName(v *string) *ActionLogEntryCreate

SetNillableActorName sets the "actor_name" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableChanges

func (_c *ActionLogEntryCreate) SetNillableChanges(v *string) *ActionLogEntryCreate

SetNillableChanges sets the "changes" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableIP

func (_c *ActionLogEntryCreate) SetNillableIP(v *string) *ActionLogEntryCreate

SetNillableIP sets the "ip" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableObjectID

func (_c *ActionLogEntryCreate) SetNillableObjectID(v *string) *ActionLogEntryCreate

SetNillableObjectID sets the "object_id" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableObjectKind

func (_c *ActionLogEntryCreate) SetNillableObjectKind(v *string) *ActionLogEntryCreate

SetNillableObjectKind sets the "object_kind" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableObjectLabel

func (_c *ActionLogEntryCreate) SetNillableObjectLabel(v *string) *ActionLogEntryCreate

SetNillableObjectLabel sets the "object_label" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableObjectType

func (_c *ActionLogEntryCreate) SetNillableObjectType(v *string) *ActionLogEntryCreate

SetNillableObjectType sets the "object_type" field if the given value is not nil.

func (*ActionLogEntryCreate) SetNillableObjectURL

func (_c *ActionLogEntryCreate) SetNillableObjectURL(v *string) *ActionLogEntryCreate

SetNillableObjectURL sets the "object_url" field if the given value is not nil.

func (*ActionLogEntryCreate) SetObjectID

func (_c *ActionLogEntryCreate) SetObjectID(v string) *ActionLogEntryCreate

SetObjectID sets the "object_id" field.

func (*ActionLogEntryCreate) SetObjectKind

func (_c *ActionLogEntryCreate) SetObjectKind(v string) *ActionLogEntryCreate

SetObjectKind sets the "object_kind" field.

func (*ActionLogEntryCreate) SetObjectLabel

func (_c *ActionLogEntryCreate) SetObjectLabel(v string) *ActionLogEntryCreate

SetObjectLabel sets the "object_label" field.

func (*ActionLogEntryCreate) SetObjectType

func (_c *ActionLogEntryCreate) SetObjectType(v string) *ActionLogEntryCreate

SetObjectType sets the "object_type" field.

func (*ActionLogEntryCreate) SetObjectURL

func (_c *ActionLogEntryCreate) SetObjectURL(v string) *ActionLogEntryCreate

SetObjectURL sets the "object_url" field.

func (*ActionLogEntryCreate) SetType

SetType sets the "type" field.

type ActionLogEntryCreateBulk

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

ActionLogEntryCreateBulk is the builder for creating many ActionLogEntry entities in bulk.

func (*ActionLogEntryCreateBulk) Exec

Exec executes the query.

func (*ActionLogEntryCreateBulk) ExecX

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

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

func (*ActionLogEntryCreateBulk) Save

Save creates the ActionLogEntry entities in the database.

func (*ActionLogEntryCreateBulk) SaveX

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

type ActionLogEntryDelete

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

ActionLogEntryDelete is the builder for deleting a ActionLogEntry entity.

func (*ActionLogEntryDelete) Exec

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

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

func (*ActionLogEntryDelete) ExecX

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

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

func (*ActionLogEntryDelete) Where

Where appends a list predicates to the ActionLogEntryDelete builder.

type ActionLogEntryDeleteOne

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

ActionLogEntryDeleteOne is the builder for deleting a single ActionLogEntry entity.

func (*ActionLogEntryDeleteOne) Exec

Exec executes the deletion query.

func (*ActionLogEntryDeleteOne) ExecX

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

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

func (*ActionLogEntryDeleteOne) Where

Where appends a list predicates to the ActionLogEntryDelete builder.

type ActionLogEntryGroupBy

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

ActionLogEntryGroupBy is the group-by builder for ActionLogEntry entities.

func (*ActionLogEntryGroupBy) Aggregate

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

func (*ActionLogEntryGroupBy) Bool

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

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

func (*ActionLogEntryGroupBy) BoolX

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

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

func (*ActionLogEntryGroupBy) Bools

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

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

func (*ActionLogEntryGroupBy) BoolsX

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

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

func (*ActionLogEntryGroupBy) Float64

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

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

func (*ActionLogEntryGroupBy) Float64X

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

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

func (*ActionLogEntryGroupBy) Float64s

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

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

func (*ActionLogEntryGroupBy) Float64sX

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

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

func (*ActionLogEntryGroupBy) Int

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

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

func (*ActionLogEntryGroupBy) IntX

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

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

func (*ActionLogEntryGroupBy) Ints

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

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

func (*ActionLogEntryGroupBy) IntsX

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

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

func (*ActionLogEntryGroupBy) Scan

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

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

func (*ActionLogEntryGroupBy) ScanX

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

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

func (*ActionLogEntryGroupBy) String

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

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

func (*ActionLogEntryGroupBy) StringX

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

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

func (*ActionLogEntryGroupBy) Strings

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

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

func (*ActionLogEntryGroupBy) StringsX

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

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

type ActionLogEntryMutation

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

ActionLogEntryMutation represents an operation that mutates the ActionLogEntry nodes in the graph.

func (*ActionLogEntryMutation) ActionGroup

func (m *ActionLogEntryMutation) ActionGroup() (r string, exists bool)

ActionGroup returns the value of the "action_group" field in the mutation.

func (*ActionLogEntryMutation) ActorID

func (m *ActionLogEntryMutation) ActorID() (r int, exists bool)

ActorID returns the value of the "actor_id" field in the mutation.

func (*ActionLogEntryMutation) ActorIDCleared

func (m *ActionLogEntryMutation) ActorIDCleared() bool

ActorIDCleared returns if the "actor_id" field was cleared in this mutation.

func (*ActionLogEntryMutation) ActorName

func (m *ActionLogEntryMutation) ActorName() (r string, exists bool)

ActorName returns the value of the "actor_name" field in the mutation.

func (*ActionLogEntryMutation) AddActorID

func (m *ActionLogEntryMutation) AddActorID(i int)

AddActorID adds i to the "actor_id" field.

func (*ActionLogEntryMutation) AddField

func (m *ActionLogEntryMutation) 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 (*ActionLogEntryMutation) AddedActorID

func (m *ActionLogEntryMutation) AddedActorID() (r int, exists bool)

AddedActorID returns the value that was added to the "actor_id" field in this mutation.

func (*ActionLogEntryMutation) AddedEdges

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

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

func (*ActionLogEntryMutation) AddedField

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

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

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

func (*ActionLogEntryMutation) AddedIDs

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

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

func (*ActionLogEntryMutation) Changes

func (m *ActionLogEntryMutation) Changes() (r string, exists bool)

Changes returns the value of the "changes" field in the mutation.

func (*ActionLogEntryMutation) ClearActorID

func (m *ActionLogEntryMutation) ClearActorID()

ClearActorID clears the value of the "actor_id" field.

func (*ActionLogEntryMutation) ClearEdge

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

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

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

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

func (*ActionLogEntryMutation) ClearedFields

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

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

func (ActionLogEntryMutation) Client

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

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

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

func (*ActionLogEntryMutation) EdgeCleared

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

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

func (*ActionLogEntryMutation) Field

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

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

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

func (*ActionLogEntryMutation) Fields

func (m *ActionLogEntryMutation) 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 (*ActionLogEntryMutation) GetType

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

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

func (*ActionLogEntryMutation) ID

func (m *ActionLogEntryMutation) ID() (id int, exists bool)

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

func (*ActionLogEntryMutation) IDs

func (m *ActionLogEntryMutation) IDs(ctx context.Context) ([]int, error)

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

func (*ActionLogEntryMutation) IP

func (m *ActionLogEntryMutation) IP() (r string, exists bool)

IP returns the value of the "ip" field in the mutation.

func (*ActionLogEntryMutation) ObjectID

func (m *ActionLogEntryMutation) ObjectID() (r string, exists bool)

ObjectID returns the value of the "object_id" field in the mutation.

func (*ActionLogEntryMutation) ObjectKind

func (m *ActionLogEntryMutation) ObjectKind() (r string, exists bool)

ObjectKind returns the value of the "object_kind" field in the mutation.

func (*ActionLogEntryMutation) ObjectLabel

func (m *ActionLogEntryMutation) ObjectLabel() (r string, exists bool)

ObjectLabel returns the value of the "object_label" field in the mutation.

func (*ActionLogEntryMutation) ObjectType

func (m *ActionLogEntryMutation) ObjectType() (r string, exists bool)

ObjectType returns the value of the "object_type" field in the mutation.

func (*ActionLogEntryMutation) ObjectURL

func (m *ActionLogEntryMutation) ObjectURL() (r string, exists bool)

ObjectURL returns the value of the "object_url" field in the mutation.

func (*ActionLogEntryMutation) OldActionGroup

func (m *ActionLogEntryMutation) OldActionGroup(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldActorID

func (m *ActionLogEntryMutation) OldActorID(ctx context.Context) (v *int, err error)

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

func (*ActionLogEntryMutation) OldActorName

func (m *ActionLogEntryMutation) OldActorName(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldChanges

func (m *ActionLogEntryMutation) OldChanges(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldCreatedAt

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

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

func (*ActionLogEntryMutation) OldField

func (m *ActionLogEntryMutation) 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 (*ActionLogEntryMutation) OldIP

func (m *ActionLogEntryMutation) OldIP(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldObjectID

func (m *ActionLogEntryMutation) OldObjectID(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldObjectKind

func (m *ActionLogEntryMutation) OldObjectKind(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldObjectLabel

func (m *ActionLogEntryMutation) OldObjectLabel(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldObjectType

func (m *ActionLogEntryMutation) OldObjectType(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldObjectURL

func (m *ActionLogEntryMutation) OldObjectURL(ctx context.Context) (v string, err error)

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

func (*ActionLogEntryMutation) OldType

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

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

func (*ActionLogEntryMutation) Op

func (m *ActionLogEntryMutation) Op() Op

Op returns the operation name.

func (*ActionLogEntryMutation) RemovedEdges

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

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

func (*ActionLogEntryMutation) RemovedIDs

func (m *ActionLogEntryMutation) 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 (*ActionLogEntryMutation) ResetActionGroup

func (m *ActionLogEntryMutation) ResetActionGroup()

ResetActionGroup resets all changes to the "action_group" field.

func (*ActionLogEntryMutation) ResetActorID

func (m *ActionLogEntryMutation) ResetActorID()

ResetActorID resets all changes to the "actor_id" field.

func (*ActionLogEntryMutation) ResetActorName

func (m *ActionLogEntryMutation) ResetActorName()

ResetActorName resets all changes to the "actor_name" field.

func (*ActionLogEntryMutation) ResetChanges

func (m *ActionLogEntryMutation) ResetChanges()

ResetChanges resets all changes to the "changes" field.

func (*ActionLogEntryMutation) ResetCreatedAt

func (m *ActionLogEntryMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ActionLogEntryMutation) ResetEdge

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

func (m *ActionLogEntryMutation) 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 (*ActionLogEntryMutation) ResetIP

func (m *ActionLogEntryMutation) ResetIP()

ResetIP resets all changes to the "ip" field.

func (*ActionLogEntryMutation) ResetObjectID

func (m *ActionLogEntryMutation) ResetObjectID()

ResetObjectID resets all changes to the "object_id" field.

func (*ActionLogEntryMutation) ResetObjectKind

func (m *ActionLogEntryMutation) ResetObjectKind()

ResetObjectKind resets all changes to the "object_kind" field.

func (*ActionLogEntryMutation) ResetObjectLabel

func (m *ActionLogEntryMutation) ResetObjectLabel()

ResetObjectLabel resets all changes to the "object_label" field.

func (*ActionLogEntryMutation) ResetObjectType

func (m *ActionLogEntryMutation) ResetObjectType()

ResetObjectType resets all changes to the "object_type" field.

func (*ActionLogEntryMutation) ResetObjectURL

func (m *ActionLogEntryMutation) ResetObjectURL()

ResetObjectURL resets all changes to the "object_url" field.

func (*ActionLogEntryMutation) ResetType

func (m *ActionLogEntryMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*ActionLogEntryMutation) SetActionGroup

func (m *ActionLogEntryMutation) SetActionGroup(s string)

SetActionGroup sets the "action_group" field.

func (*ActionLogEntryMutation) SetActorID

func (m *ActionLogEntryMutation) SetActorID(i int)

SetActorID sets the "actor_id" field.

func (*ActionLogEntryMutation) SetActorName

func (m *ActionLogEntryMutation) SetActorName(s string)

SetActorName sets the "actor_name" field.

func (*ActionLogEntryMutation) SetChanges

func (m *ActionLogEntryMutation) SetChanges(s string)

SetChanges sets the "changes" field.

func (*ActionLogEntryMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ActionLogEntryMutation) SetField

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

func (m *ActionLogEntryMutation) SetID(id int)

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

func (*ActionLogEntryMutation) SetIP

func (m *ActionLogEntryMutation) SetIP(s string)

SetIP sets the "ip" field.

func (*ActionLogEntryMutation) SetObjectID

func (m *ActionLogEntryMutation) SetObjectID(s string)

SetObjectID sets the "object_id" field.

func (*ActionLogEntryMutation) SetObjectKind

func (m *ActionLogEntryMutation) SetObjectKind(s string)

SetObjectKind sets the "object_kind" field.

func (*ActionLogEntryMutation) SetObjectLabel

func (m *ActionLogEntryMutation) SetObjectLabel(s string)

SetObjectLabel sets the "object_label" field.

func (*ActionLogEntryMutation) SetObjectType

func (m *ActionLogEntryMutation) SetObjectType(s string)

SetObjectType sets the "object_type" field.

func (*ActionLogEntryMutation) SetObjectURL

func (m *ActionLogEntryMutation) SetObjectURL(s string)

SetObjectURL sets the "object_url" field.

func (*ActionLogEntryMutation) SetOp

func (m *ActionLogEntryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ActionLogEntryMutation) SetType

func (m *ActionLogEntryMutation) SetType(s string)

SetType sets the "type" field.

func (ActionLogEntryMutation) Tx

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

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

func (*ActionLogEntryMutation) Type

func (m *ActionLogEntryMutation) Type() string

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

func (*ActionLogEntryMutation) Where

Where appends a list predicates to the ActionLogEntryMutation builder.

func (*ActionLogEntryMutation) WhereP

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

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

type ActionLogEntryQuery

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

ActionLogEntryQuery is the builder for querying ActionLogEntry entities.

func (*ActionLogEntryQuery) Aggregate

Aggregate returns a ActionLogEntrySelect configured with the given aggregations.

func (*ActionLogEntryQuery) All

All executes the query and returns a list of ActionLogEntries.

func (*ActionLogEntryQuery) AllX

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

func (*ActionLogEntryQuery) Clone

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

func (*ActionLogEntryQuery) Count

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

Count returns the count of the given query.

func (*ActionLogEntryQuery) CountX

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

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

func (*ActionLogEntryQuery) Exist

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

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

func (*ActionLogEntryQuery) ExistX

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

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

func (*ActionLogEntryQuery) First

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

func (*ActionLogEntryQuery) FirstID

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

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

func (*ActionLogEntryQuery) FirstIDX

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

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

func (*ActionLogEntryQuery) FirstX

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

func (*ActionLogEntryQuery) GroupBy

func (_q *ActionLogEntryQuery) GroupBy(field string, fields ...string) *ActionLogEntryGroupBy

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

func (*ActionLogEntryQuery) IDs

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

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

func (*ActionLogEntryQuery) IDsX

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

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

func (*ActionLogEntryQuery) Limit

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

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

func (*ActionLogEntryQuery) Offset

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

Offset to start from.

func (*ActionLogEntryQuery) Only

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

func (*ActionLogEntryQuery) OnlyID

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

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

func (*ActionLogEntryQuery) OnlyIDX

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

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

func (*ActionLogEntryQuery) OnlyX

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

func (*ActionLogEntryQuery) Order

Order specifies how the records should be ordered.

func (*ActionLogEntryQuery) Select

func (_q *ActionLogEntryQuery) Select(fields ...string) *ActionLogEntrySelect

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

func (*ActionLogEntryQuery) Unique

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

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

Where adds a new predicate for the ActionLogEntryQuery builder.

type ActionLogEntrySelect

type ActionLogEntrySelect struct {
	*ActionLogEntryQuery
	// contains filtered or unexported fields
}

ActionLogEntrySelect is the builder for selecting fields of ActionLogEntry entities.

func (*ActionLogEntrySelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ActionLogEntrySelect) Bool

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

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

func (*ActionLogEntrySelect) BoolX

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

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

func (*ActionLogEntrySelect) Bools

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

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

func (*ActionLogEntrySelect) BoolsX

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

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

func (*ActionLogEntrySelect) Float64

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

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

func (*ActionLogEntrySelect) Float64X

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

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

func (*ActionLogEntrySelect) Float64s

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

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

func (*ActionLogEntrySelect) Float64sX

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

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

func (*ActionLogEntrySelect) Int

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

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

func (*ActionLogEntrySelect) IntX

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

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

func (*ActionLogEntrySelect) Ints

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

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

func (*ActionLogEntrySelect) IntsX

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

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

func (*ActionLogEntrySelect) Scan

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

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

func (*ActionLogEntrySelect) ScanX

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

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

func (*ActionLogEntrySelect) String

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

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

func (*ActionLogEntrySelect) StringX

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

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

func (*ActionLogEntrySelect) Strings

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

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

func (*ActionLogEntrySelect) StringsX

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

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

type ActionLogEntryUpdate

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

ActionLogEntryUpdate is the builder for updating ActionLogEntry entities.

func (*ActionLogEntryUpdate) AddActorID

func (_u *ActionLogEntryUpdate) AddActorID(v int) *ActionLogEntryUpdate

AddActorID adds value to the "actor_id" field.

func (*ActionLogEntryUpdate) ClearActorID

func (_u *ActionLogEntryUpdate) ClearActorID() *ActionLogEntryUpdate

ClearActorID clears the value of the "actor_id" field.

func (*ActionLogEntryUpdate) Exec

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

Exec executes the query.

func (*ActionLogEntryUpdate) ExecX

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

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

func (*ActionLogEntryUpdate) Mutation

Mutation returns the ActionLogEntryMutation object of the builder.

func (*ActionLogEntryUpdate) Save

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

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

func (*ActionLogEntryUpdate) SaveX

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

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

func (*ActionLogEntryUpdate) SetActionGroup

func (_u *ActionLogEntryUpdate) SetActionGroup(v string) *ActionLogEntryUpdate

SetActionGroup sets the "action_group" field.

func (*ActionLogEntryUpdate) SetActorID

func (_u *ActionLogEntryUpdate) SetActorID(v int) *ActionLogEntryUpdate

SetActorID sets the "actor_id" field.

func (*ActionLogEntryUpdate) SetActorName

func (_u *ActionLogEntryUpdate) SetActorName(v string) *ActionLogEntryUpdate

SetActorName sets the "actor_name" field.

func (*ActionLogEntryUpdate) SetChanges

SetChanges sets the "changes" field.

func (*ActionLogEntryUpdate) SetCreatedAt

func (_u *ActionLogEntryUpdate) SetCreatedAt(v time.Time) *ActionLogEntryUpdate

SetCreatedAt sets the "created_at" field.

func (*ActionLogEntryUpdate) SetIP

SetIP sets the "ip" field.

func (*ActionLogEntryUpdate) SetNillableActionGroup

func (_u *ActionLogEntryUpdate) SetNillableActionGroup(v *string) *ActionLogEntryUpdate

SetNillableActionGroup sets the "action_group" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableActorID

func (_u *ActionLogEntryUpdate) SetNillableActorID(v *int) *ActionLogEntryUpdate

SetNillableActorID sets the "actor_id" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableActorName

func (_u *ActionLogEntryUpdate) SetNillableActorName(v *string) *ActionLogEntryUpdate

SetNillableActorName sets the "actor_name" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableChanges

func (_u *ActionLogEntryUpdate) SetNillableChanges(v *string) *ActionLogEntryUpdate

SetNillableChanges sets the "changes" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableCreatedAt

func (_u *ActionLogEntryUpdate) SetNillableCreatedAt(v *time.Time) *ActionLogEntryUpdate

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

func (*ActionLogEntryUpdate) SetNillableIP

func (_u *ActionLogEntryUpdate) SetNillableIP(v *string) *ActionLogEntryUpdate

SetNillableIP sets the "ip" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableObjectID

func (_u *ActionLogEntryUpdate) SetNillableObjectID(v *string) *ActionLogEntryUpdate

SetNillableObjectID sets the "object_id" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableObjectKind

func (_u *ActionLogEntryUpdate) SetNillableObjectKind(v *string) *ActionLogEntryUpdate

SetNillableObjectKind sets the "object_kind" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableObjectLabel

func (_u *ActionLogEntryUpdate) SetNillableObjectLabel(v *string) *ActionLogEntryUpdate

SetNillableObjectLabel sets the "object_label" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableObjectType

func (_u *ActionLogEntryUpdate) SetNillableObjectType(v *string) *ActionLogEntryUpdate

SetNillableObjectType sets the "object_type" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableObjectURL

func (_u *ActionLogEntryUpdate) SetNillableObjectURL(v *string) *ActionLogEntryUpdate

SetNillableObjectURL sets the "object_url" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetNillableType

func (_u *ActionLogEntryUpdate) SetNillableType(v *string) *ActionLogEntryUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*ActionLogEntryUpdate) SetObjectID

func (_u *ActionLogEntryUpdate) SetObjectID(v string) *ActionLogEntryUpdate

SetObjectID sets the "object_id" field.

func (*ActionLogEntryUpdate) SetObjectKind

func (_u *ActionLogEntryUpdate) SetObjectKind(v string) *ActionLogEntryUpdate

SetObjectKind sets the "object_kind" field.

func (*ActionLogEntryUpdate) SetObjectLabel

func (_u *ActionLogEntryUpdate) SetObjectLabel(v string) *ActionLogEntryUpdate

SetObjectLabel sets the "object_label" field.

func (*ActionLogEntryUpdate) SetObjectType

func (_u *ActionLogEntryUpdate) SetObjectType(v string) *ActionLogEntryUpdate

SetObjectType sets the "object_type" field.

func (*ActionLogEntryUpdate) SetObjectURL

func (_u *ActionLogEntryUpdate) SetObjectURL(v string) *ActionLogEntryUpdate

SetObjectURL sets the "object_url" field.

func (*ActionLogEntryUpdate) SetType

SetType sets the "type" field.

func (*ActionLogEntryUpdate) Where

Where appends a list predicates to the ActionLogEntryUpdate builder.

type ActionLogEntryUpdateOne

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

ActionLogEntryUpdateOne is the builder for updating a single ActionLogEntry entity.

func (*ActionLogEntryUpdateOne) AddActorID

AddActorID adds value to the "actor_id" field.

func (*ActionLogEntryUpdateOne) ClearActorID

ClearActorID clears the value of the "actor_id" field.

func (*ActionLogEntryUpdateOne) Exec

Exec executes the query on the entity.

func (*ActionLogEntryUpdateOne) ExecX

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

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

func (*ActionLogEntryUpdateOne) Mutation

Mutation returns the ActionLogEntryMutation object of the builder.

func (*ActionLogEntryUpdateOne) Save

Save executes the query and returns the updated ActionLogEntry entity.

func (*ActionLogEntryUpdateOne) SaveX

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

func (*ActionLogEntryUpdateOne) Select

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

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

func (*ActionLogEntryUpdateOne) SetActionGroup

SetActionGroup sets the "action_group" field.

func (*ActionLogEntryUpdateOne) SetActorID

SetActorID sets the "actor_id" field.

func (*ActionLogEntryUpdateOne) SetActorName

SetActorName sets the "actor_name" field.

func (*ActionLogEntryUpdateOne) SetChanges

SetChanges sets the "changes" field.

func (*ActionLogEntryUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*ActionLogEntryUpdateOne) SetIP

SetIP sets the "ip" field.

func (*ActionLogEntryUpdateOne) SetNillableActionGroup

func (_u *ActionLogEntryUpdateOne) SetNillableActionGroup(v *string) *ActionLogEntryUpdateOne

SetNillableActionGroup sets the "action_group" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableActorID

func (_u *ActionLogEntryUpdateOne) SetNillableActorID(v *int) *ActionLogEntryUpdateOne

SetNillableActorID sets the "actor_id" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableActorName

func (_u *ActionLogEntryUpdateOne) SetNillableActorName(v *string) *ActionLogEntryUpdateOne

SetNillableActorName sets the "actor_name" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableChanges

func (_u *ActionLogEntryUpdateOne) SetNillableChanges(v *string) *ActionLogEntryUpdateOne

SetNillableChanges sets the "changes" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableCreatedAt

func (_u *ActionLogEntryUpdateOne) SetNillableCreatedAt(v *time.Time) *ActionLogEntryUpdateOne

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

func (*ActionLogEntryUpdateOne) SetNillableIP

SetNillableIP sets the "ip" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableObjectID

func (_u *ActionLogEntryUpdateOne) SetNillableObjectID(v *string) *ActionLogEntryUpdateOne

SetNillableObjectID sets the "object_id" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableObjectKind

func (_u *ActionLogEntryUpdateOne) SetNillableObjectKind(v *string) *ActionLogEntryUpdateOne

SetNillableObjectKind sets the "object_kind" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableObjectLabel

func (_u *ActionLogEntryUpdateOne) SetNillableObjectLabel(v *string) *ActionLogEntryUpdateOne

SetNillableObjectLabel sets the "object_label" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableObjectType

func (_u *ActionLogEntryUpdateOne) SetNillableObjectType(v *string) *ActionLogEntryUpdateOne

SetNillableObjectType sets the "object_type" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableObjectURL

func (_u *ActionLogEntryUpdateOne) SetNillableObjectURL(v *string) *ActionLogEntryUpdateOne

SetNillableObjectURL sets the "object_url" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetNillableType

func (_u *ActionLogEntryUpdateOne) SetNillableType(v *string) *ActionLogEntryUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*ActionLogEntryUpdateOne) SetObjectID

SetObjectID sets the "object_id" field.

func (*ActionLogEntryUpdateOne) SetObjectKind

SetObjectKind sets the "object_kind" field.

func (*ActionLogEntryUpdateOne) SetObjectLabel

SetObjectLabel sets the "object_label" field.

func (*ActionLogEntryUpdateOne) SetObjectType

SetObjectType sets the "object_type" field.

func (*ActionLogEntryUpdateOne) SetObjectURL

SetObjectURL sets the "object_url" field.

func (*ActionLogEntryUpdateOne) SetType

SetType sets the "type" field.

func (*ActionLogEntryUpdateOne) Where

Where appends a list predicates to the ActionLogEntryUpdate builder.

type ActionLogSettings

type ActionLogSettings struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// KeepDays holds the value of the "keep_days" field.
	KeepDays int `json:"keep_days,omitempty"`
	// LogIP holds the value of the "log_ip" field.
	LogIP bool `json:"log_ip,omitempty"`
	// GroupsOff holds the value of the "groups_off" field.
	GroupsOff string `json:"groups_off,omitempty"`
	// contains filtered or unexported fields
}

ActionLogSettings is the model entity for the ActionLogSettings schema.

func (*ActionLogSettings) String

func (_m *ActionLogSettings) String() string

String implements the fmt.Stringer.

func (*ActionLogSettings) Unwrap

func (_m *ActionLogSettings) Unwrap() *ActionLogSettings

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

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

func (*ActionLogSettings) Value

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

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

type ActionLogSettingsClient

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

ActionLogSettingsClient is a client for the ActionLogSettings schema.

func NewActionLogSettingsClient

func NewActionLogSettingsClient(c config) *ActionLogSettingsClient

NewActionLogSettingsClient returns a client for the ActionLogSettings from the given config.

func (*ActionLogSettingsClient) Create

Create returns a builder for creating a ActionLogSettings entity.

func (*ActionLogSettingsClient) CreateBulk

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

func (*ActionLogSettingsClient) Delete

Delete returns a delete builder for ActionLogSettings.

func (*ActionLogSettingsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ActionLogSettingsClient) DeleteOneID

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

func (*ActionLogSettingsClient) Get

Get returns a ActionLogSettings entity by its id.

func (*ActionLogSettingsClient) GetX

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

func (*ActionLogSettingsClient) Hooks

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

Hooks returns the client hooks.

func (*ActionLogSettingsClient) Intercept

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

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

func (*ActionLogSettingsClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ActionLogSettingsClient) MapCreateBulk

func (c *ActionLogSettingsClient) MapCreateBulk(slice any, setFunc func(*ActionLogSettingsCreate, int)) *ActionLogSettingsCreateBulk

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

Query returns a query builder for ActionLogSettings.

func (*ActionLogSettingsClient) Update

Update returns an update builder for ActionLogSettings.

func (*ActionLogSettingsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ActionLogSettingsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ActionLogSettingsClient) Use

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

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

type ActionLogSettingsCreate

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

ActionLogSettingsCreate is the builder for creating a ActionLogSettings entity.

func (*ActionLogSettingsCreate) Exec

Exec executes the query.

func (*ActionLogSettingsCreate) ExecX

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

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

func (*ActionLogSettingsCreate) Mutation

Mutation returns the ActionLogSettingsMutation object of the builder.

func (*ActionLogSettingsCreate) Save

Save creates the ActionLogSettings in the database.

func (*ActionLogSettingsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ActionLogSettingsCreate) SetGroupsOff

SetGroupsOff sets the "groups_off" field.

func (*ActionLogSettingsCreate) SetID

SetID sets the "id" field.

func (*ActionLogSettingsCreate) SetKeepDays

SetKeepDays sets the "keep_days" field.

func (*ActionLogSettingsCreate) SetLogIP

SetLogIP sets the "log_ip" field.

func (*ActionLogSettingsCreate) SetNillableGroupsOff

func (_c *ActionLogSettingsCreate) SetNillableGroupsOff(v *string) *ActionLogSettingsCreate

SetNillableGroupsOff sets the "groups_off" field if the given value is not nil.

func (*ActionLogSettingsCreate) SetNillableKeepDays

func (_c *ActionLogSettingsCreate) SetNillableKeepDays(v *int) *ActionLogSettingsCreate

SetNillableKeepDays sets the "keep_days" field if the given value is not nil.

func (*ActionLogSettingsCreate) SetNillableLogIP

func (_c *ActionLogSettingsCreate) SetNillableLogIP(v *bool) *ActionLogSettingsCreate

SetNillableLogIP sets the "log_ip" field if the given value is not nil.

type ActionLogSettingsCreateBulk

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

ActionLogSettingsCreateBulk is the builder for creating many ActionLogSettings entities in bulk.

func (*ActionLogSettingsCreateBulk) Exec

Exec executes the query.

func (*ActionLogSettingsCreateBulk) ExecX

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

func (*ActionLogSettingsCreateBulk) Save

Save creates the ActionLogSettings entities in the database.

func (*ActionLogSettingsCreateBulk) SaveX

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

type ActionLogSettingsDelete

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

ActionLogSettingsDelete is the builder for deleting a ActionLogSettings entity.

func (*ActionLogSettingsDelete) Exec

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

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

func (*ActionLogSettingsDelete) ExecX

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

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

func (*ActionLogSettingsDelete) Where

Where appends a list predicates to the ActionLogSettingsDelete builder.

type ActionLogSettingsDeleteOne

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

ActionLogSettingsDeleteOne is the builder for deleting a single ActionLogSettings entity.

func (*ActionLogSettingsDeleteOne) Exec

Exec executes the deletion query.

func (*ActionLogSettingsDeleteOne) ExecX

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

func (*ActionLogSettingsDeleteOne) Where

Where appends a list predicates to the ActionLogSettingsDelete builder.

type ActionLogSettingsGroupBy

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

ActionLogSettingsGroupBy is the group-by builder for ActionLogSettings entities.

func (*ActionLogSettingsGroupBy) Aggregate

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

func (*ActionLogSettingsGroupBy) Bool

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

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

func (*ActionLogSettingsGroupBy) BoolX

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

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

func (*ActionLogSettingsGroupBy) Bools

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

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

func (*ActionLogSettingsGroupBy) BoolsX

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

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

func (*ActionLogSettingsGroupBy) Float64

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

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

func (*ActionLogSettingsGroupBy) Float64X

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

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

func (*ActionLogSettingsGroupBy) Float64s

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

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

func (*ActionLogSettingsGroupBy) Float64sX

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

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

func (*ActionLogSettingsGroupBy) Int

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

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

func (*ActionLogSettingsGroupBy) IntX

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

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

func (*ActionLogSettingsGroupBy) Ints

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

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

func (*ActionLogSettingsGroupBy) IntsX

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

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

func (*ActionLogSettingsGroupBy) Scan

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

func (*ActionLogSettingsGroupBy) ScanX

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

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

func (*ActionLogSettingsGroupBy) String

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

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

func (*ActionLogSettingsGroupBy) StringX

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

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

func (*ActionLogSettingsGroupBy) Strings

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

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

func (*ActionLogSettingsGroupBy) StringsX

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

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

type ActionLogSettingsMutation

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

ActionLogSettingsMutation represents an operation that mutates the ActionLogSettings nodes in the graph.

func (*ActionLogSettingsMutation) AddField

func (m *ActionLogSettingsMutation) 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 (*ActionLogSettingsMutation) AddKeepDays

func (m *ActionLogSettingsMutation) AddKeepDays(i int)

AddKeepDays adds i to the "keep_days" field.

func (*ActionLogSettingsMutation) AddedEdges

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

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

func (*ActionLogSettingsMutation) AddedField

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

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

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

func (*ActionLogSettingsMutation) AddedIDs

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

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

func (*ActionLogSettingsMutation) AddedKeepDays

func (m *ActionLogSettingsMutation) AddedKeepDays() (r int, exists bool)

AddedKeepDays returns the value that was added to the "keep_days" field in this mutation.

func (*ActionLogSettingsMutation) ClearEdge

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

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

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

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

func (*ActionLogSettingsMutation) ClearedFields

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

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

func (ActionLogSettingsMutation) Client

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

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

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

func (*ActionLogSettingsMutation) Field

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

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

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

func (*ActionLogSettingsMutation) Fields

func (m *ActionLogSettingsMutation) 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 (*ActionLogSettingsMutation) GroupsOff

func (m *ActionLogSettingsMutation) GroupsOff() (r string, exists bool)

GroupsOff returns the value of the "groups_off" field in the mutation.

func (*ActionLogSettingsMutation) ID

func (m *ActionLogSettingsMutation) ID() (id int, exists bool)

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

func (*ActionLogSettingsMutation) 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 (*ActionLogSettingsMutation) KeepDays

func (m *ActionLogSettingsMutation) KeepDays() (r int, exists bool)

KeepDays returns the value of the "keep_days" field in the mutation.

func (*ActionLogSettingsMutation) LogIP

func (m *ActionLogSettingsMutation) LogIP() (r bool, exists bool)

LogIP returns the value of the "log_ip" field in the mutation.

func (*ActionLogSettingsMutation) OldField

func (m *ActionLogSettingsMutation) 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 (*ActionLogSettingsMutation) OldGroupsOff

func (m *ActionLogSettingsMutation) OldGroupsOff(ctx context.Context) (v string, err error)

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

func (*ActionLogSettingsMutation) OldKeepDays

func (m *ActionLogSettingsMutation) OldKeepDays(ctx context.Context) (v int, err error)

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

func (*ActionLogSettingsMutation) OldLogIP

func (m *ActionLogSettingsMutation) OldLogIP(ctx context.Context) (v bool, err error)

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

func (*ActionLogSettingsMutation) Op

func (m *ActionLogSettingsMutation) Op() Op

Op returns the operation name.

func (*ActionLogSettingsMutation) RemovedEdges

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

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

func (*ActionLogSettingsMutation) RemovedIDs

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

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

func (m *ActionLogSettingsMutation) 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 (*ActionLogSettingsMutation) ResetGroupsOff

func (m *ActionLogSettingsMutation) ResetGroupsOff()

ResetGroupsOff resets all changes to the "groups_off" field.

func (*ActionLogSettingsMutation) ResetKeepDays

func (m *ActionLogSettingsMutation) ResetKeepDays()

ResetKeepDays resets all changes to the "keep_days" field.

func (*ActionLogSettingsMutation) ResetLogIP

func (m *ActionLogSettingsMutation) ResetLogIP()

ResetLogIP resets all changes to the "log_ip" field.

func (*ActionLogSettingsMutation) SetField

func (m *ActionLogSettingsMutation) 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 (*ActionLogSettingsMutation) SetGroupsOff

func (m *ActionLogSettingsMutation) SetGroupsOff(s string)

SetGroupsOff sets the "groups_off" field.

func (*ActionLogSettingsMutation) SetID

func (m *ActionLogSettingsMutation) SetID(id int)

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

func (*ActionLogSettingsMutation) SetKeepDays

func (m *ActionLogSettingsMutation) SetKeepDays(i int)

SetKeepDays sets the "keep_days" field.

func (*ActionLogSettingsMutation) SetLogIP

func (m *ActionLogSettingsMutation) SetLogIP(b bool)

SetLogIP sets the "log_ip" field.

func (*ActionLogSettingsMutation) SetOp

func (m *ActionLogSettingsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ActionLogSettingsMutation) Tx

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

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

func (*ActionLogSettingsMutation) Type

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

func (*ActionLogSettingsMutation) Where

Where appends a list predicates to the ActionLogSettingsMutation builder.

func (*ActionLogSettingsMutation) WhereP

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

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

type ActionLogSettingsQuery

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

ActionLogSettingsQuery is the builder for querying ActionLogSettings entities.

func (*ActionLogSettingsQuery) Aggregate

Aggregate returns a ActionLogSettingsSelect configured with the given aggregations.

func (*ActionLogSettingsQuery) All

All executes the query and returns a list of ActionLogSettingsSlice.

func (*ActionLogSettingsQuery) AllX

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

func (*ActionLogSettingsQuery) Clone

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

func (*ActionLogSettingsQuery) Count

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

Count returns the count of the given query.

func (*ActionLogSettingsQuery) CountX

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

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

func (*ActionLogSettingsQuery) Exist

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

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

func (*ActionLogSettingsQuery) ExistX

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

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

func (*ActionLogSettingsQuery) First

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

func (*ActionLogSettingsQuery) FirstID

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

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

func (*ActionLogSettingsQuery) FirstIDX

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

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

func (*ActionLogSettingsQuery) FirstX

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

func (*ActionLogSettingsQuery) GroupBy

func (_q *ActionLogSettingsQuery) GroupBy(field string, fields ...string) *ActionLogSettingsGroupBy

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 {
	KeepDays int `json:"keep_days,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ActionLogSettings.Query().
	GroupBy(actionlogsettings.FieldKeepDays).
	Aggregate(generated.Count()).
	Scan(ctx, &v)

func (*ActionLogSettingsQuery) IDs

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

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

func (*ActionLogSettingsQuery) IDsX

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

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

func (*ActionLogSettingsQuery) Limit

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

func (*ActionLogSettingsQuery) Offset

Offset to start from.

func (*ActionLogSettingsQuery) Only

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

func (*ActionLogSettingsQuery) OnlyID

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

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

func (*ActionLogSettingsQuery) OnlyIDX

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

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

func (*ActionLogSettingsQuery) OnlyX

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

func (*ActionLogSettingsQuery) Order

Order specifies how the records should be ordered.

func (*ActionLogSettingsQuery) Select

func (_q *ActionLogSettingsQuery) Select(fields ...string) *ActionLogSettingsSelect

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 {
	KeepDays int `json:"keep_days,omitempty"`
}

client.ActionLogSettings.Query().
	Select(actionlogsettings.FieldKeepDays).
	Scan(ctx, &v)

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

Where adds a new predicate for the ActionLogSettingsQuery builder.

type ActionLogSettingsSelect

type ActionLogSettingsSelect struct {
	*ActionLogSettingsQuery
	// contains filtered or unexported fields
}

ActionLogSettingsSelect is the builder for selecting fields of ActionLogSettings entities.

func (*ActionLogSettingsSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ActionLogSettingsSelect) Bool

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

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

func (*ActionLogSettingsSelect) BoolX

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

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

func (*ActionLogSettingsSelect) Bools

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

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

func (*ActionLogSettingsSelect) BoolsX

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

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

func (*ActionLogSettingsSelect) Float64

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

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

func (*ActionLogSettingsSelect) Float64X

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

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

func (*ActionLogSettingsSelect) Float64s

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

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

func (*ActionLogSettingsSelect) Float64sX

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

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

func (*ActionLogSettingsSelect) Int

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

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

func (*ActionLogSettingsSelect) IntX

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

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

func (*ActionLogSettingsSelect) Ints

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

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

func (*ActionLogSettingsSelect) IntsX

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

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

func (*ActionLogSettingsSelect) Scan

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

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

func (*ActionLogSettingsSelect) ScanX

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

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

func (*ActionLogSettingsSelect) String

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

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

func (*ActionLogSettingsSelect) StringX

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

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

func (*ActionLogSettingsSelect) Strings

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

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

func (*ActionLogSettingsSelect) StringsX

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

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

type ActionLogSettingsSlice

type ActionLogSettingsSlice []*ActionLogSettings

ActionLogSettingsSlice is a parsable slice of ActionLogSettings.

type ActionLogSettingsUpdate

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

ActionLogSettingsUpdate is the builder for updating ActionLogSettings entities.

func (*ActionLogSettingsUpdate) AddKeepDays

AddKeepDays adds value to the "keep_days" field.

func (*ActionLogSettingsUpdate) Exec

Exec executes the query.

func (*ActionLogSettingsUpdate) ExecX

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

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

func (*ActionLogSettingsUpdate) Mutation

Mutation returns the ActionLogSettingsMutation object of the builder.

func (*ActionLogSettingsUpdate) Save

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

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

func (*ActionLogSettingsUpdate) SaveX

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

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

func (*ActionLogSettingsUpdate) SetGroupsOff

SetGroupsOff sets the "groups_off" field.

func (*ActionLogSettingsUpdate) SetKeepDays

SetKeepDays sets the "keep_days" field.

func (*ActionLogSettingsUpdate) SetLogIP

SetLogIP sets the "log_ip" field.

func (*ActionLogSettingsUpdate) SetNillableGroupsOff

func (_u *ActionLogSettingsUpdate) SetNillableGroupsOff(v *string) *ActionLogSettingsUpdate

SetNillableGroupsOff sets the "groups_off" field if the given value is not nil.

func (*ActionLogSettingsUpdate) SetNillableKeepDays

func (_u *ActionLogSettingsUpdate) SetNillableKeepDays(v *int) *ActionLogSettingsUpdate

SetNillableKeepDays sets the "keep_days" field if the given value is not nil.

func (*ActionLogSettingsUpdate) SetNillableLogIP

func (_u *ActionLogSettingsUpdate) SetNillableLogIP(v *bool) *ActionLogSettingsUpdate

SetNillableLogIP sets the "log_ip" field if the given value is not nil.

func (*ActionLogSettingsUpdate) Where

Where appends a list predicates to the ActionLogSettingsUpdate builder.

type ActionLogSettingsUpdateOne

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

ActionLogSettingsUpdateOne is the builder for updating a single ActionLogSettings entity.

func (*ActionLogSettingsUpdateOne) AddKeepDays

AddKeepDays adds value to the "keep_days" field.

func (*ActionLogSettingsUpdateOne) Exec

Exec executes the query on the entity.

func (*ActionLogSettingsUpdateOne) ExecX

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

func (*ActionLogSettingsUpdateOne) Mutation

Mutation returns the ActionLogSettingsMutation object of the builder.

func (*ActionLogSettingsUpdateOne) Save

Save executes the query and returns the updated ActionLogSettings entity.

func (*ActionLogSettingsUpdateOne) SaveX

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

func (*ActionLogSettingsUpdateOne) 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 (*ActionLogSettingsUpdateOne) SetGroupsOff

SetGroupsOff sets the "groups_off" field.

func (*ActionLogSettingsUpdateOne) SetKeepDays

SetKeepDays sets the "keep_days" field.

func (*ActionLogSettingsUpdateOne) SetLogIP

SetLogIP sets the "log_ip" field.

func (*ActionLogSettingsUpdateOne) SetNillableGroupsOff

func (_u *ActionLogSettingsUpdateOne) SetNillableGroupsOff(v *string) *ActionLogSettingsUpdateOne

SetNillableGroupsOff sets the "groups_off" field if the given value is not nil.

func (*ActionLogSettingsUpdateOne) SetNillableKeepDays

func (_u *ActionLogSettingsUpdateOne) SetNillableKeepDays(v *int) *ActionLogSettingsUpdateOne

SetNillableKeepDays sets the "keep_days" field if the given value is not nil.

func (*ActionLogSettingsUpdateOne) SetNillableLogIP

SetNillableLogIP sets the "log_ip" field if the given value is not nil.

func (*ActionLogSettingsUpdateOne) Where

Where appends a list predicates to the ActionLogSettingsUpdate builder.

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 Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// ActionLogEntry is the client for interacting with the ActionLogEntry builders.
	ActionLogEntry *ActionLogEntryClient
	// ActionLogSettings is the client for interacting with the ActionLogSettings builders.
	ActionLogSettings *ActionLogSettingsClient
	// 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().
	ActionLogEntry.
	Query().
	Count(ctx)

func (*Client) Intercept

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

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

func (*Client) Mutate

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

Mutate implements the ent.Mutator interface.

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type 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 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 {

	// ActionLogEntry is the client for interacting with the ActionLogEntry builders.
	ActionLogEntry *ActionLogEntryClient
	// ActionLogSettings is the client for interacting with the ActionLogSettings builders.
	ActionLogSettings *ActionLogSettingsClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL