ent

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 23 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.
	TypeEmailLog      = "EmailLog"
	TypeEmailProvider = "EmailProvider"
	TypeSmsLog        = "SmsLog"
	TypeSmsProvider   = "SmsProvider"
)

Variables

View Source
var DefaultEmailLogOrder = Desc(emaillog.FieldID)

DefaultEmailLogOrder is the default ordering of EmailLog.

View Source
var DefaultEmailProviderOrder = Desc(emailprovider.FieldID)

DefaultEmailProviderOrder is the default ordering of EmailProvider.

View Source
var DefaultSmsLogOrder = Desc(smslog.FieldID)

DefaultSmsLogOrder is the default ordering of SmsLog.

View Source
var DefaultSmsProviderOrder = Desc(smsprovider.FieldID)

DefaultSmsProviderOrder is the default ordering of SmsProvider.

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

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

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// EmailLog is the client for interacting with the EmailLog builders.
	EmailLog *EmailLogClient
	// EmailProvider is the client for interacting with the EmailProvider builders.
	EmailProvider *EmailProviderClient
	// SmsLog is the client for interacting with the SmsLog builders.
	SmsLog *SmsLogClient
	// SmsProvider is the client for interacting with the SmsProvider builders.
	SmsProvider *SmsProviderClient
	// 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().
	EmailLog.
	Query().
	Count(ctx)

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 EmailLog

type EmailLog struct {

	// ID of the ent.
	// UUID
	ID uuid.UUID `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The target email address | 目标邮箱地址
	Target string `json:"target,omitempty"`
	// The subject | 发送的标题
	Subject string `json:"subject,omitempty"`
	// The content | 发送的内容
	Content string `json:"content,omitempty"`
	// The send status, 0 unknown 1 success 2 failed | 发送的状态, 0 未知, 1 成功, 2 失败
	SendStatus uint8 `json:"send_status,omitempty"`
	// The sms service provider | 短信服务提供商
	Provider string `json:"provider,omitempty"`
	// contains filtered or unexported fields
}

EmailLog is the model entity for the EmailLog schema.

func (*EmailLog) ExecContext

func (c *EmailLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLog) QueryContext

func (c *EmailLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLog) String

func (el *EmailLog) String() string

String implements the fmt.Stringer.

func (*EmailLog) Unwrap

func (el *EmailLog) Unwrap() *EmailLog

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

func (el *EmailLog) Update() *EmailLogUpdateOne

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

func (*EmailLog) Value

func (el *EmailLog) Value(name string) (ent.Value, error)

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

type EmailLogClient

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

EmailLogClient is a client for the EmailLog schema.

func NewEmailLogClient

func NewEmailLogClient(c config) *EmailLogClient

NewEmailLogClient returns a client for the EmailLog from the given config.

func (*EmailLogClient) Create

func (c *EmailLogClient) Create() *EmailLogCreate

Create returns a builder for creating a EmailLog entity.

func (*EmailLogClient) CreateBulk

func (c *EmailLogClient) CreateBulk(builders ...*EmailLogCreate) *EmailLogCreateBulk

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

func (*EmailLogClient) Delete

func (c *EmailLogClient) Delete() *EmailLogDelete

Delete returns a delete builder for EmailLog.

func (*EmailLogClient) DeleteOne

func (c *EmailLogClient) DeleteOne(el *EmailLog) *EmailLogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EmailLogClient) DeleteOneID

func (c *EmailLogClient) DeleteOneID(id uuid.UUID) *EmailLogDeleteOne

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

func (*EmailLogClient) ExecContext

func (c *EmailLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogClient) Get

func (c *EmailLogClient) Get(ctx context.Context, id uuid.UUID) (*EmailLog, error)

Get returns a EmailLog entity by its id.

func (*EmailLogClient) GetX

func (c *EmailLogClient) GetX(ctx context.Context, id uuid.UUID) *EmailLog

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

func (*EmailLogClient) Hooks

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

Hooks returns the client hooks.

func (*EmailLogClient) Intercept

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

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

func (*EmailLogClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EmailLogClient) MapCreateBulk

func (c *EmailLogClient) MapCreateBulk(slice any, setFunc func(*EmailLogCreate, int)) *EmailLogCreateBulk

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

func (c *EmailLogClient) Query() *EmailLogQuery

Query returns a query builder for EmailLog.

func (*EmailLogClient) QueryContext

func (c *EmailLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogClient) Update

func (c *EmailLogClient) Update() *EmailLogUpdate

Update returns an update builder for EmailLog.

func (*EmailLogClient) UpdateOne

func (c *EmailLogClient) UpdateOne(el *EmailLog) *EmailLogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EmailLogClient) UpdateOneID

func (c *EmailLogClient) UpdateOneID(id uuid.UUID) *EmailLogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EmailLogClient) Use

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

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

type EmailLogCreate

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

EmailLogCreate is the builder for creating a EmailLog entity.

func (*EmailLogCreate) Exec

func (elc *EmailLogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EmailLogCreate) ExecContext

func (c *EmailLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogCreate) ExecX

func (elc *EmailLogCreate) ExecX(ctx context.Context)

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

func (*EmailLogCreate) Mutation

func (elc *EmailLogCreate) Mutation() *EmailLogMutation

Mutation returns the EmailLogMutation object of the builder.

func (*EmailLogCreate) QueryContext

func (c *EmailLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogCreate) Save

func (elc *EmailLogCreate) Save(ctx context.Context) (*EmailLog, error)

Save creates the EmailLog in the database.

func (*EmailLogCreate) SaveX

func (elc *EmailLogCreate) SaveX(ctx context.Context) *EmailLog

SaveX calls Save and panics if Save returns an error.

func (*EmailLogCreate) SetContent

func (elc *EmailLogCreate) SetContent(s string) *EmailLogCreate

SetContent sets the "content" field.

func (*EmailLogCreate) SetCreatedAt

func (elc *EmailLogCreate) SetCreatedAt(t time.Time) *EmailLogCreate

SetCreatedAt sets the "created_at" field.

func (*EmailLogCreate) SetID

func (elc *EmailLogCreate) SetID(u uuid.UUID) *EmailLogCreate

SetID sets the "id" field.

func (*EmailLogCreate) SetNillableCreatedAt

func (elc *EmailLogCreate) SetNillableCreatedAt(t *time.Time) *EmailLogCreate

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

func (*EmailLogCreate) SetNillableID

func (elc *EmailLogCreate) SetNillableID(u *uuid.UUID) *EmailLogCreate

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

func (*EmailLogCreate) SetNillableUpdatedAt

func (elc *EmailLogCreate) SetNillableUpdatedAt(t *time.Time) *EmailLogCreate

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

func (*EmailLogCreate) SetNotNilContent

func (el *EmailLogCreate) SetNotNilContent(value *string) *EmailLogCreate

set field if value's pointer is not nil.

func (*EmailLogCreate) SetNotNilProvider

func (el *EmailLogCreate) SetNotNilProvider(value *string) *EmailLogCreate

set field if value's pointer is not nil.

func (*EmailLogCreate) SetNotNilSendStatus

func (el *EmailLogCreate) SetNotNilSendStatus(value *uint8) *EmailLogCreate

set field if value's pointer is not nil.

func (*EmailLogCreate) SetNotNilSubject

func (el *EmailLogCreate) SetNotNilSubject(value *string) *EmailLogCreate

set field if value's pointer is not nil.

func (*EmailLogCreate) SetNotNilTarget

func (el *EmailLogCreate) SetNotNilTarget(value *string) *EmailLogCreate

set field if value's pointer is not nil.

func (*EmailLogCreate) SetNotNilUpdatedAt

func (el *EmailLogCreate) SetNotNilUpdatedAt(value *time.Time) *EmailLogCreate

set field if value's pointer is not nil.

func (*EmailLogCreate) SetProvider

func (elc *EmailLogCreate) SetProvider(s string) *EmailLogCreate

SetProvider sets the "provider" field.

func (*EmailLogCreate) SetSendStatus

func (elc *EmailLogCreate) SetSendStatus(u uint8) *EmailLogCreate

SetSendStatus sets the "send_status" field.

func (*EmailLogCreate) SetSubject

func (elc *EmailLogCreate) SetSubject(s string) *EmailLogCreate

SetSubject sets the "subject" field.

func (*EmailLogCreate) SetTarget

func (elc *EmailLogCreate) SetTarget(s string) *EmailLogCreate

SetTarget sets the "target" field.

func (*EmailLogCreate) SetUpdatedAt

func (elc *EmailLogCreate) SetUpdatedAt(t time.Time) *EmailLogCreate

SetUpdatedAt sets the "updated_at" field.

type EmailLogCreateBulk

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

EmailLogCreateBulk is the builder for creating many EmailLog entities in bulk.

func (*EmailLogCreateBulk) Exec

func (elcb *EmailLogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EmailLogCreateBulk) ExecContext

func (c *EmailLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogCreateBulk) ExecX

func (elcb *EmailLogCreateBulk) ExecX(ctx context.Context)

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

func (*EmailLogCreateBulk) QueryContext

func (c *EmailLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogCreateBulk) Save

func (elcb *EmailLogCreateBulk) Save(ctx context.Context) ([]*EmailLog, error)

Save creates the EmailLog entities in the database.

func (*EmailLogCreateBulk) SaveX

func (elcb *EmailLogCreateBulk) SaveX(ctx context.Context) []*EmailLog

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

type EmailLogDelete

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

EmailLogDelete is the builder for deleting a EmailLog entity.

func (*EmailLogDelete) Exec

func (eld *EmailLogDelete) Exec(ctx context.Context) (int, error)

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

func (*EmailLogDelete) ExecContext

func (c *EmailLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogDelete) ExecX

func (eld *EmailLogDelete) ExecX(ctx context.Context) int

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

func (*EmailLogDelete) QueryContext

func (c *EmailLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogDelete) Where

func (eld *EmailLogDelete) Where(ps ...predicate.EmailLog) *EmailLogDelete

Where appends a list predicates to the EmailLogDelete builder.

type EmailLogDeleteOne

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

EmailLogDeleteOne is the builder for deleting a single EmailLog entity.

func (*EmailLogDeleteOne) Exec

func (eldo *EmailLogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EmailLogDeleteOne) ExecX

func (eldo *EmailLogDeleteOne) ExecX(ctx context.Context)

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

func (*EmailLogDeleteOne) Where

Where appends a list predicates to the EmailLogDelete builder.

type EmailLogGroupBy

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

EmailLogGroupBy is the group-by builder for EmailLog entities.

func (*EmailLogGroupBy) Aggregate

func (elgb *EmailLogGroupBy) Aggregate(fns ...AggregateFunc) *EmailLogGroupBy

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

func (*EmailLogGroupBy) Bool

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

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

func (*EmailLogGroupBy) BoolX

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

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

func (*EmailLogGroupBy) Bools

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

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

func (*EmailLogGroupBy) BoolsX

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

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

func (*EmailLogGroupBy) Float64

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

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

func (*EmailLogGroupBy) Float64X

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

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

func (*EmailLogGroupBy) Float64s

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

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

func (*EmailLogGroupBy) Float64sX

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

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

func (*EmailLogGroupBy) Int

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

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

func (*EmailLogGroupBy) IntX

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

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

func (*EmailLogGroupBy) Ints

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

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

func (*EmailLogGroupBy) IntsX

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

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

func (*EmailLogGroupBy) Scan

func (elgb *EmailLogGroupBy) Scan(ctx context.Context, v any) error

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

func (*EmailLogGroupBy) ScanX

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

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

func (*EmailLogGroupBy) String

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

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

func (*EmailLogGroupBy) StringX

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

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

func (*EmailLogGroupBy) Strings

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

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

func (*EmailLogGroupBy) StringsX

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

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

type EmailLogMutation

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

EmailLogMutation represents an operation that mutates the EmailLog nodes in the graph.

func (*EmailLogMutation) AddField

func (m *EmailLogMutation) 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 (*EmailLogMutation) AddSendStatus

func (m *EmailLogMutation) AddSendStatus(u int8)

AddSendStatus adds u to the "send_status" field.

func (*EmailLogMutation) AddedEdges

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

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

func (*EmailLogMutation) AddedField

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

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

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

func (*EmailLogMutation) AddedIDs

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

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

func (*EmailLogMutation) AddedSendStatus

func (m *EmailLogMutation) AddedSendStatus() (r int8, exists bool)

AddedSendStatus returns the value that was added to the "send_status" field in this mutation.

func (*EmailLogMutation) ClearEdge

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

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

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

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

func (*EmailLogMutation) ClearedFields

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

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

func (EmailLogMutation) Client

func (m EmailLogMutation) 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 (*EmailLogMutation) Content

func (m *EmailLogMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*EmailLogMutation) CreatedAt

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

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

func (*EmailLogMutation) EdgeCleared

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

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

func (*EmailLogMutation) ExecContext

func (c *EmailLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogMutation) Field

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

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

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

func (*EmailLogMutation) Fields

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

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

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

func (*EmailLogMutation) IDs

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

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

func (*EmailLogMutation) OldContent

func (m *EmailLogMutation) OldContent(ctx context.Context) (v string, err error)

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

func (*EmailLogMutation) OldCreatedAt

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

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

func (*EmailLogMutation) OldField

func (m *EmailLogMutation) 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 (*EmailLogMutation) OldProvider

func (m *EmailLogMutation) OldProvider(ctx context.Context) (v string, err error)

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

func (*EmailLogMutation) OldSendStatus

func (m *EmailLogMutation) OldSendStatus(ctx context.Context) (v uint8, err error)

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

func (*EmailLogMutation) OldSubject

func (m *EmailLogMutation) OldSubject(ctx context.Context) (v string, err error)

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

func (*EmailLogMutation) OldTarget

func (m *EmailLogMutation) OldTarget(ctx context.Context) (v string, err error)

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

func (*EmailLogMutation) OldUpdatedAt

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

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

func (*EmailLogMutation) Op

func (m *EmailLogMutation) Op() Op

Op returns the operation name.

func (*EmailLogMutation) Provider

func (m *EmailLogMutation) Provider() (r string, exists bool)

Provider returns the value of the "provider" field in the mutation.

func (*EmailLogMutation) QueryContext

func (c *EmailLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogMutation) RemovedEdges

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

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

func (*EmailLogMutation) RemovedIDs

func (m *EmailLogMutation) 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 (*EmailLogMutation) ResetContent

func (m *EmailLogMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*EmailLogMutation) ResetCreatedAt

func (m *EmailLogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EmailLogMutation) ResetEdge

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

func (m *EmailLogMutation) 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 (*EmailLogMutation) ResetProvider

func (m *EmailLogMutation) ResetProvider()

ResetProvider resets all changes to the "provider" field.

func (*EmailLogMutation) ResetSendStatus

func (m *EmailLogMutation) ResetSendStatus()

ResetSendStatus resets all changes to the "send_status" field.

func (*EmailLogMutation) ResetSubject

func (m *EmailLogMutation) ResetSubject()

ResetSubject resets all changes to the "subject" field.

func (*EmailLogMutation) ResetTarget

func (m *EmailLogMutation) ResetTarget()

ResetTarget resets all changes to the "target" field.

func (*EmailLogMutation) ResetUpdatedAt

func (m *EmailLogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EmailLogMutation) SendStatus

func (m *EmailLogMutation) SendStatus() (r uint8, exists bool)

SendStatus returns the value of the "send_status" field in the mutation.

func (*EmailLogMutation) SetContent

func (m *EmailLogMutation) SetContent(s string)

SetContent sets the "content" field.

func (*EmailLogMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*EmailLogMutation) SetField

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

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

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

func (*EmailLogMutation) SetOp

func (m *EmailLogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EmailLogMutation) SetProvider

func (m *EmailLogMutation) SetProvider(s string)

SetProvider sets the "provider" field.

func (*EmailLogMutation) SetSendStatus

func (m *EmailLogMutation) SetSendStatus(u uint8)

SetSendStatus sets the "send_status" field.

func (*EmailLogMutation) SetSubject

func (m *EmailLogMutation) SetSubject(s string)

SetSubject sets the "subject" field.

func (*EmailLogMutation) SetTarget

func (m *EmailLogMutation) SetTarget(s string)

SetTarget sets the "target" field.

func (*EmailLogMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EmailLogMutation) Subject

func (m *EmailLogMutation) Subject() (r string, exists bool)

Subject returns the value of the "subject" field in the mutation.

func (*EmailLogMutation) Target

func (m *EmailLogMutation) Target() (r string, exists bool)

Target returns the value of the "target" field in the mutation.

func (EmailLogMutation) Tx

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

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

func (*EmailLogMutation) Type

func (m *EmailLogMutation) Type() string

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

func (*EmailLogMutation) UpdatedAt

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

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

func (*EmailLogMutation) Where

func (m *EmailLogMutation) Where(ps ...predicate.EmailLog)

Where appends a list predicates to the EmailLogMutation builder.

func (*EmailLogMutation) WhereP

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

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

type EmailLogPageList

type EmailLogPageList struct {
	List        []*EmailLog  `json:"list"`
	PageDetails *PageDetails `json:"pageDetails"`
}

EmailLogPageList is EmailLog PageList result.

type EmailLogPager

type EmailLogPager struct {
	Order  emaillog.OrderOption
	Filter func(*EmailLogQuery) (*EmailLogQuery, error)
}

func (*EmailLogPager) ApplyFilter

func (p *EmailLogPager) ApplyFilter(query *EmailLogQuery) (*EmailLogQuery, error)

type EmailLogPaginateOption

type EmailLogPaginateOption func(*EmailLogPager)

EmailLogPaginateOption enables pagination customization.

type EmailLogQuery

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

EmailLogQuery is the builder for querying EmailLog entities.

func (*EmailLogQuery) Aggregate

func (elq *EmailLogQuery) Aggregate(fns ...AggregateFunc) *EmailLogSelect

Aggregate returns a EmailLogSelect configured with the given aggregations.

func (*EmailLogQuery) All

func (elq *EmailLogQuery) All(ctx context.Context) ([]*EmailLog, error)

All executes the query and returns a list of EmailLogs.

func (*EmailLogQuery) AllX

func (elq *EmailLogQuery) AllX(ctx context.Context) []*EmailLog

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

func (*EmailLogQuery) Clone

func (elq *EmailLogQuery) Clone() *EmailLogQuery

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

func (*EmailLogQuery) Count

func (elq *EmailLogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EmailLogQuery) CountX

func (elq *EmailLogQuery) CountX(ctx context.Context) int

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

func (*EmailLogQuery) ExecContext

func (c *EmailLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogQuery) Exist

func (elq *EmailLogQuery) Exist(ctx context.Context) (bool, error)

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

func (*EmailLogQuery) ExistX

func (elq *EmailLogQuery) ExistX(ctx context.Context) bool

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

func (*EmailLogQuery) First

func (elq *EmailLogQuery) First(ctx context.Context) (*EmailLog, error)

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

func (*EmailLogQuery) FirstID

func (elq *EmailLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*EmailLogQuery) FirstIDX

func (elq *EmailLogQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*EmailLogQuery) FirstX

func (elq *EmailLogQuery) FirstX(ctx context.Context) *EmailLog

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

func (*EmailLogQuery) GroupBy

func (elq *EmailLogQuery) GroupBy(field string, fields ...string) *EmailLogGroupBy

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

func (*EmailLogQuery) IDs

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

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

func (*EmailLogQuery) IDsX

func (elq *EmailLogQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*EmailLogQuery) Limit

func (elq *EmailLogQuery) Limit(limit int) *EmailLogQuery

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

func (*EmailLogQuery) Offset

func (elq *EmailLogQuery) Offset(offset int) *EmailLogQuery

Offset to start from.

func (*EmailLogQuery) Only

func (elq *EmailLogQuery) Only(ctx context.Context) (*EmailLog, error)

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

func (*EmailLogQuery) OnlyID

func (elq *EmailLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*EmailLogQuery) OnlyIDX

func (elq *EmailLogQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*EmailLogQuery) OnlyX

func (elq *EmailLogQuery) OnlyX(ctx context.Context) *EmailLog

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

func (*EmailLogQuery) Order

func (elq *EmailLogQuery) Order(o ...emaillog.OrderOption) *EmailLogQuery

Order specifies how the records should be ordered.

func (*EmailLogQuery) Page

func (el *EmailLogQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...EmailLogPaginateOption,
) (*EmailLogPageList, error)

func (*EmailLogQuery) QueryContext

func (c *EmailLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogQuery) Select

func (elq *EmailLogQuery) Select(fields ...string) *EmailLogSelect

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

func (*EmailLogQuery) Unique

func (elq *EmailLogQuery) Unique(unique bool) *EmailLogQuery

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

func (elq *EmailLogQuery) Where(ps ...predicate.EmailLog) *EmailLogQuery

Where adds a new predicate for the EmailLogQuery builder.

type EmailLogSelect

type EmailLogSelect struct {
	*EmailLogQuery
	// contains filtered or unexported fields
}

EmailLogSelect is the builder for selecting fields of EmailLog entities.

func (*EmailLogSelect) Aggregate

func (els *EmailLogSelect) Aggregate(fns ...AggregateFunc) *EmailLogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EmailLogSelect) Bool

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

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

func (*EmailLogSelect) BoolX

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

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

func (*EmailLogSelect) Bools

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

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

func (*EmailLogSelect) BoolsX

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

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

func (EmailLogSelect) ExecContext

func (c EmailLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogSelect) Float64

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

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

func (*EmailLogSelect) Float64X

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

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

func (*EmailLogSelect) Float64s

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

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

func (*EmailLogSelect) Float64sX

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

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

func (*EmailLogSelect) Int

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

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

func (*EmailLogSelect) IntX

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

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

func (*EmailLogSelect) Ints

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

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

func (*EmailLogSelect) IntsX

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

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

func (EmailLogSelect) QueryContext

func (c EmailLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogSelect) Scan

func (els *EmailLogSelect) Scan(ctx context.Context, v any) error

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

func (*EmailLogSelect) ScanX

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

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

func (*EmailLogSelect) String

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

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

func (*EmailLogSelect) StringX

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

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

func (*EmailLogSelect) Strings

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

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

func (*EmailLogSelect) StringsX

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

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

type EmailLogUpdate

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

EmailLogUpdate is the builder for updating EmailLog entities.

func (*EmailLogUpdate) AddSendStatus

func (elu *EmailLogUpdate) AddSendStatus(u int8) *EmailLogUpdate

AddSendStatus adds u to the "send_status" field.

func (*EmailLogUpdate) Exec

func (elu *EmailLogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EmailLogUpdate) ExecContext

func (c *EmailLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogUpdate) ExecX

func (elu *EmailLogUpdate) ExecX(ctx context.Context)

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

func (*EmailLogUpdate) Mutation

func (elu *EmailLogUpdate) Mutation() *EmailLogMutation

Mutation returns the EmailLogMutation object of the builder.

func (*EmailLogUpdate) QueryContext

func (c *EmailLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogUpdate) Save

func (elu *EmailLogUpdate) Save(ctx context.Context) (int, error)

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

func (*EmailLogUpdate) SaveX

func (elu *EmailLogUpdate) SaveX(ctx context.Context) int

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

func (*EmailLogUpdate) SetContent

func (elu *EmailLogUpdate) SetContent(s string) *EmailLogUpdate

SetContent sets the "content" field.

func (*EmailLogUpdate) SetNillableContent

func (elu *EmailLogUpdate) SetNillableContent(s *string) *EmailLogUpdate

SetNillableContent sets the "content" field if the given value is not nil.

func (*EmailLogUpdate) SetNillableProvider

func (elu *EmailLogUpdate) SetNillableProvider(s *string) *EmailLogUpdate

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*EmailLogUpdate) SetNillableSendStatus

func (elu *EmailLogUpdate) SetNillableSendStatus(u *uint8) *EmailLogUpdate

SetNillableSendStatus sets the "send_status" field if the given value is not nil.

func (*EmailLogUpdate) SetNillableSubject

func (elu *EmailLogUpdate) SetNillableSubject(s *string) *EmailLogUpdate

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*EmailLogUpdate) SetNillableTarget

func (elu *EmailLogUpdate) SetNillableTarget(s *string) *EmailLogUpdate

SetNillableTarget sets the "target" field if the given value is not nil.

func (*EmailLogUpdate) SetNotNilContent

func (el *EmailLogUpdate) SetNotNilContent(value *string) *EmailLogUpdate

set field if value's pointer is not nil.

func (*EmailLogUpdate) SetNotNilProvider

func (el *EmailLogUpdate) SetNotNilProvider(value *string) *EmailLogUpdate

set field if value's pointer is not nil.

func (*EmailLogUpdate) SetNotNilSendStatus

func (el *EmailLogUpdate) SetNotNilSendStatus(value *uint8) *EmailLogUpdate

set field if value's pointer is not nil.

func (*EmailLogUpdate) SetNotNilSubject

func (el *EmailLogUpdate) SetNotNilSubject(value *string) *EmailLogUpdate

set field if value's pointer is not nil.

func (*EmailLogUpdate) SetNotNilTarget

func (el *EmailLogUpdate) SetNotNilTarget(value *string) *EmailLogUpdate

set field if value's pointer is not nil.

func (*EmailLogUpdate) SetNotNilUpdatedAt

func (el *EmailLogUpdate) SetNotNilUpdatedAt(value *time.Time) *EmailLogUpdate

set field if value's pointer is not nil.

func (*EmailLogUpdate) SetProvider

func (elu *EmailLogUpdate) SetProvider(s string) *EmailLogUpdate

SetProvider sets the "provider" field.

func (*EmailLogUpdate) SetSendStatus

func (elu *EmailLogUpdate) SetSendStatus(u uint8) *EmailLogUpdate

SetSendStatus sets the "send_status" field.

func (*EmailLogUpdate) SetSubject

func (elu *EmailLogUpdate) SetSubject(s string) *EmailLogUpdate

SetSubject sets the "subject" field.

func (*EmailLogUpdate) SetTarget

func (elu *EmailLogUpdate) SetTarget(s string) *EmailLogUpdate

SetTarget sets the "target" field.

func (*EmailLogUpdate) SetUpdatedAt

func (elu *EmailLogUpdate) SetUpdatedAt(t time.Time) *EmailLogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EmailLogUpdate) Where

func (elu *EmailLogUpdate) Where(ps ...predicate.EmailLog) *EmailLogUpdate

Where appends a list predicates to the EmailLogUpdate builder.

type EmailLogUpdateOne

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

EmailLogUpdateOne is the builder for updating a single EmailLog entity.

func (*EmailLogUpdateOne) AddSendStatus

func (eluo *EmailLogUpdateOne) AddSendStatus(u int8) *EmailLogUpdateOne

AddSendStatus adds u to the "send_status" field.

func (*EmailLogUpdateOne) Exec

func (eluo *EmailLogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EmailLogUpdateOne) ExecContext

func (c *EmailLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailLogUpdateOne) ExecX

func (eluo *EmailLogUpdateOne) ExecX(ctx context.Context)

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

func (*EmailLogUpdateOne) Mutation

func (eluo *EmailLogUpdateOne) Mutation() *EmailLogMutation

Mutation returns the EmailLogMutation object of the builder.

func (*EmailLogUpdateOne) QueryContext

func (c *EmailLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailLogUpdateOne) Save

func (eluo *EmailLogUpdateOne) Save(ctx context.Context) (*EmailLog, error)

Save executes the query and returns the updated EmailLog entity.

func (*EmailLogUpdateOne) SaveX

func (eluo *EmailLogUpdateOne) SaveX(ctx context.Context) *EmailLog

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

func (*EmailLogUpdateOne) Select

func (eluo *EmailLogUpdateOne) Select(field string, fields ...string) *EmailLogUpdateOne

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

func (*EmailLogUpdateOne) SetContent

func (eluo *EmailLogUpdateOne) SetContent(s string) *EmailLogUpdateOne

SetContent sets the "content" field.

func (*EmailLogUpdateOne) SetNillableContent

func (eluo *EmailLogUpdateOne) SetNillableContent(s *string) *EmailLogUpdateOne

SetNillableContent sets the "content" field if the given value is not nil.

func (*EmailLogUpdateOne) SetNillableProvider

func (eluo *EmailLogUpdateOne) SetNillableProvider(s *string) *EmailLogUpdateOne

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*EmailLogUpdateOne) SetNillableSendStatus

func (eluo *EmailLogUpdateOne) SetNillableSendStatus(u *uint8) *EmailLogUpdateOne

SetNillableSendStatus sets the "send_status" field if the given value is not nil.

func (*EmailLogUpdateOne) SetNillableSubject

func (eluo *EmailLogUpdateOne) SetNillableSubject(s *string) *EmailLogUpdateOne

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*EmailLogUpdateOne) SetNillableTarget

func (eluo *EmailLogUpdateOne) SetNillableTarget(s *string) *EmailLogUpdateOne

SetNillableTarget sets the "target" field if the given value is not nil.

func (*EmailLogUpdateOne) SetNotNilContent

func (el *EmailLogUpdateOne) SetNotNilContent(value *string) *EmailLogUpdateOne

set field if value's pointer is not nil.

func (*EmailLogUpdateOne) SetNotNilProvider

func (el *EmailLogUpdateOne) SetNotNilProvider(value *string) *EmailLogUpdateOne

set field if value's pointer is not nil.

func (*EmailLogUpdateOne) SetNotNilSendStatus

func (el *EmailLogUpdateOne) SetNotNilSendStatus(value *uint8) *EmailLogUpdateOne

set field if value's pointer is not nil.

func (*EmailLogUpdateOne) SetNotNilSubject

func (el *EmailLogUpdateOne) SetNotNilSubject(value *string) *EmailLogUpdateOne

set field if value's pointer is not nil.

func (*EmailLogUpdateOne) SetNotNilTarget

func (el *EmailLogUpdateOne) SetNotNilTarget(value *string) *EmailLogUpdateOne

set field if value's pointer is not nil.

func (*EmailLogUpdateOne) SetNotNilUpdatedAt

func (el *EmailLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *EmailLogUpdateOne

set field if value's pointer is not nil.

func (*EmailLogUpdateOne) SetProvider

func (eluo *EmailLogUpdateOne) SetProvider(s string) *EmailLogUpdateOne

SetProvider sets the "provider" field.

func (*EmailLogUpdateOne) SetSendStatus

func (eluo *EmailLogUpdateOne) SetSendStatus(u uint8) *EmailLogUpdateOne

SetSendStatus sets the "send_status" field.

func (*EmailLogUpdateOne) SetSubject

func (eluo *EmailLogUpdateOne) SetSubject(s string) *EmailLogUpdateOne

SetSubject sets the "subject" field.

func (*EmailLogUpdateOne) SetTarget

func (eluo *EmailLogUpdateOne) SetTarget(s string) *EmailLogUpdateOne

SetTarget sets the "target" field.

func (*EmailLogUpdateOne) SetUpdatedAt

func (eluo *EmailLogUpdateOne) SetUpdatedAt(t time.Time) *EmailLogUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*EmailLogUpdateOne) Where

Where appends a list predicates to the EmailLogUpdate builder.

type EmailLogs

type EmailLogs []*EmailLog

EmailLogs is a parsable slice of EmailLog.

type EmailProvider

type EmailProvider struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The email provider name | 电子邮件服务的提供商
	Name string `json:"name,omitempty"`
	// The auth type, supported plain, CRAMMD5 | 鉴权类型, 支持 plain, CRAMMD5
	AuthType uint8 `json:"auth_type,omitempty"`
	// The email address | 邮箱地址
	EmailAddr string `json:"email_addr,omitempty"`
	// The email's password | 电子邮件的密码
	Password string `json:"password,omitempty"`
	// The host name is the email service's host address | 电子邮箱服务的服务器地址
	HostName string `json:"host_name,omitempty"`
	// The identify info, for CRAMMD5 | 身份信息, 支持 CRAMMD5
	Identify string `json:"identify,omitempty"`
	// The secret, for CRAMMD5 | 邮箱密钥, 用于 CRAMMD5
	Secret string `json:"secret,omitempty"`
	// The port of the host | 服务器端口
	Port uint32 `json:"port,omitempty"`
	// Whether to use TLS | 是否采用 tls 加密
	TLS bool `json:"tls,omitempty"`
	// Is it the default provider | 是否为默认提供商
	IsDefault bool `json:"is_default,omitempty"`
	// contains filtered or unexported fields
}

EmailProvider is the model entity for the EmailProvider schema.

func (*EmailProvider) ExecContext

func (c *EmailProvider) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProvider) QueryContext

func (c *EmailProvider) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProvider) String

func (ep *EmailProvider) String() string

String implements the fmt.Stringer.

func (*EmailProvider) Unwrap

func (ep *EmailProvider) Unwrap() *EmailProvider

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

func (ep *EmailProvider) Update() *EmailProviderUpdateOne

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

func (*EmailProvider) Value

func (ep *EmailProvider) Value(name string) (ent.Value, error)

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

type EmailProviderClient

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

EmailProviderClient is a client for the EmailProvider schema.

func NewEmailProviderClient

func NewEmailProviderClient(c config) *EmailProviderClient

NewEmailProviderClient returns a client for the EmailProvider from the given config.

func (*EmailProviderClient) Create

Create returns a builder for creating a EmailProvider entity.

func (*EmailProviderClient) CreateBulk

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

func (*EmailProviderClient) Delete

Delete returns a delete builder for EmailProvider.

func (*EmailProviderClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EmailProviderClient) DeleteOneID

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

func (*EmailProviderClient) ExecContext

func (c *EmailProviderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderClient) Get

Get returns a EmailProvider entity by its id.

func (*EmailProviderClient) GetX

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

func (*EmailProviderClient) Hooks

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

Hooks returns the client hooks.

func (*EmailProviderClient) Intercept

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

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

func (*EmailProviderClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EmailProviderClient) MapCreateBulk

func (c *EmailProviderClient) MapCreateBulk(slice any, setFunc func(*EmailProviderCreate, int)) *EmailProviderCreateBulk

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

Query returns a query builder for EmailProvider.

func (*EmailProviderClient) QueryContext

func (c *EmailProviderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderClient) Update

Update returns an update builder for EmailProvider.

func (*EmailProviderClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EmailProviderClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*EmailProviderClient) Use

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

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

type EmailProviderCreate

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

EmailProviderCreate is the builder for creating a EmailProvider entity.

func (*EmailProviderCreate) Exec

func (epc *EmailProviderCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EmailProviderCreate) ExecContext

func (c *EmailProviderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderCreate) ExecX

func (epc *EmailProviderCreate) ExecX(ctx context.Context)

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

func (*EmailProviderCreate) Mutation

func (epc *EmailProviderCreate) Mutation() *EmailProviderMutation

Mutation returns the EmailProviderMutation object of the builder.

func (*EmailProviderCreate) QueryContext

func (c *EmailProviderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderCreate) Save

Save creates the EmailProvider in the database.

func (*EmailProviderCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EmailProviderCreate) SetAuthType

func (epc *EmailProviderCreate) SetAuthType(u uint8) *EmailProviderCreate

SetAuthType sets the "auth_type" field.

func (*EmailProviderCreate) SetCreatedAt

func (epc *EmailProviderCreate) SetCreatedAt(t time.Time) *EmailProviderCreate

SetCreatedAt sets the "created_at" field.

func (*EmailProviderCreate) SetEmailAddr

func (epc *EmailProviderCreate) SetEmailAddr(s string) *EmailProviderCreate

SetEmailAddr sets the "email_addr" field.

func (*EmailProviderCreate) SetHostName

func (epc *EmailProviderCreate) SetHostName(s string) *EmailProviderCreate

SetHostName sets the "host_name" field.

func (*EmailProviderCreate) SetID

SetID sets the "id" field.

func (*EmailProviderCreate) SetIdentify

func (epc *EmailProviderCreate) SetIdentify(s string) *EmailProviderCreate

SetIdentify sets the "identify" field.

func (*EmailProviderCreate) SetIsDefault

func (epc *EmailProviderCreate) SetIsDefault(b bool) *EmailProviderCreate

SetIsDefault sets the "is_default" field.

func (*EmailProviderCreate) SetName

SetName sets the "name" field.

func (*EmailProviderCreate) SetNillableCreatedAt

func (epc *EmailProviderCreate) SetNillableCreatedAt(t *time.Time) *EmailProviderCreate

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

func (*EmailProviderCreate) SetNillableIdentify

func (epc *EmailProviderCreate) SetNillableIdentify(s *string) *EmailProviderCreate

SetNillableIdentify sets the "identify" field if the given value is not nil.

func (*EmailProviderCreate) SetNillableIsDefault

func (epc *EmailProviderCreate) SetNillableIsDefault(b *bool) *EmailProviderCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*EmailProviderCreate) SetNillablePassword

func (epc *EmailProviderCreate) SetNillablePassword(s *string) *EmailProviderCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*EmailProviderCreate) SetNillablePort

func (epc *EmailProviderCreate) SetNillablePort(u *uint32) *EmailProviderCreate

SetNillablePort sets the "port" field if the given value is not nil.

func (*EmailProviderCreate) SetNillableSecret

func (epc *EmailProviderCreate) SetNillableSecret(s *string) *EmailProviderCreate

SetNillableSecret sets the "secret" field if the given value is not nil.

func (*EmailProviderCreate) SetNillableTLS

func (epc *EmailProviderCreate) SetNillableTLS(b *bool) *EmailProviderCreate

SetNillableTLS sets the "tls" field if the given value is not nil.

func (*EmailProviderCreate) SetNillableUpdatedAt

func (epc *EmailProviderCreate) SetNillableUpdatedAt(t *time.Time) *EmailProviderCreate

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

func (*EmailProviderCreate) SetNotNilAuthType

func (ep *EmailProviderCreate) SetNotNilAuthType(value *uint8) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilEmailAddr

func (ep *EmailProviderCreate) SetNotNilEmailAddr(value *string) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilHostName

func (ep *EmailProviderCreate) SetNotNilHostName(value *string) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilIdentify

func (ep *EmailProviderCreate) SetNotNilIdentify(value *string) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilIsDefault

func (ep *EmailProviderCreate) SetNotNilIsDefault(value *bool) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilName

func (ep *EmailProviderCreate) SetNotNilName(value *string) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilPassword

func (ep *EmailProviderCreate) SetNotNilPassword(value *string) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilPort

func (ep *EmailProviderCreate) SetNotNilPort(value *uint32) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilSecret

func (ep *EmailProviderCreate) SetNotNilSecret(value *string) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilTLS

func (ep *EmailProviderCreate) SetNotNilTLS(value *bool) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetNotNilUpdatedAt

func (ep *EmailProviderCreate) SetNotNilUpdatedAt(value *time.Time) *EmailProviderCreate

set field if value's pointer is not nil.

func (*EmailProviderCreate) SetPassword

func (epc *EmailProviderCreate) SetPassword(s string) *EmailProviderCreate

SetPassword sets the "password" field.

func (*EmailProviderCreate) SetPort

SetPort sets the "port" field.

func (*EmailProviderCreate) SetSecret

func (epc *EmailProviderCreate) SetSecret(s string) *EmailProviderCreate

SetSecret sets the "secret" field.

func (*EmailProviderCreate) SetTLS

SetTLS sets the "tls" field.

func (*EmailProviderCreate) SetUpdatedAt

func (epc *EmailProviderCreate) SetUpdatedAt(t time.Time) *EmailProviderCreate

SetUpdatedAt sets the "updated_at" field.

type EmailProviderCreateBulk

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

EmailProviderCreateBulk is the builder for creating many EmailProvider entities in bulk.

func (*EmailProviderCreateBulk) Exec

func (epcb *EmailProviderCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EmailProviderCreateBulk) ExecContext

func (c *EmailProviderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderCreateBulk) ExecX

func (epcb *EmailProviderCreateBulk) ExecX(ctx context.Context)

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

func (*EmailProviderCreateBulk) QueryContext

func (c *EmailProviderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderCreateBulk) Save

Save creates the EmailProvider entities in the database.

func (*EmailProviderCreateBulk) SaveX

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

type EmailProviderDelete

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

EmailProviderDelete is the builder for deleting a EmailProvider entity.

func (*EmailProviderDelete) Exec

func (epd *EmailProviderDelete) Exec(ctx context.Context) (int, error)

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

func (*EmailProviderDelete) ExecContext

func (c *EmailProviderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderDelete) ExecX

func (epd *EmailProviderDelete) ExecX(ctx context.Context) int

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

func (*EmailProviderDelete) QueryContext

func (c *EmailProviderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderDelete) Where

Where appends a list predicates to the EmailProviderDelete builder.

type EmailProviderDeleteOne

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

EmailProviderDeleteOne is the builder for deleting a single EmailProvider entity.

func (*EmailProviderDeleteOne) Exec

func (epdo *EmailProviderDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EmailProviderDeleteOne) ExecX

func (epdo *EmailProviderDeleteOne) ExecX(ctx context.Context)

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

func (*EmailProviderDeleteOne) Where

Where appends a list predicates to the EmailProviderDelete builder.

type EmailProviderGroupBy

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

EmailProviderGroupBy is the group-by builder for EmailProvider entities.

func (*EmailProviderGroupBy) Aggregate

func (epgb *EmailProviderGroupBy) Aggregate(fns ...AggregateFunc) *EmailProviderGroupBy

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

func (*EmailProviderGroupBy) Bool

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

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

func (*EmailProviderGroupBy) BoolX

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

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

func (*EmailProviderGroupBy) Bools

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

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

func (*EmailProviderGroupBy) BoolsX

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

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

func (*EmailProviderGroupBy) Float64

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

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

func (*EmailProviderGroupBy) Float64X

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

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

func (*EmailProviderGroupBy) Float64s

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

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

func (*EmailProviderGroupBy) Float64sX

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

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

func (*EmailProviderGroupBy) Int

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

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

func (*EmailProviderGroupBy) IntX

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

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

func (*EmailProviderGroupBy) Ints

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

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

func (*EmailProviderGroupBy) IntsX

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

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

func (*EmailProviderGroupBy) Scan

func (epgb *EmailProviderGroupBy) Scan(ctx context.Context, v any) error

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

func (*EmailProviderGroupBy) ScanX

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

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

func (*EmailProviderGroupBy) String

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

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

func (*EmailProviderGroupBy) StringX

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

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

func (*EmailProviderGroupBy) Strings

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

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

func (*EmailProviderGroupBy) StringsX

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

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

type EmailProviderMutation

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

EmailProviderMutation represents an operation that mutates the EmailProvider nodes in the graph.

func (*EmailProviderMutation) AddAuthType

func (m *EmailProviderMutation) AddAuthType(u int8)

AddAuthType adds u to the "auth_type" field.

func (*EmailProviderMutation) AddField

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) AddPort

func (m *EmailProviderMutation) AddPort(u int32)

AddPort adds u to the "port" field.

func (*EmailProviderMutation) AddedAuthType

func (m *EmailProviderMutation) AddedAuthType() (r int8, exists bool)

AddedAuthType returns the value that was added to the "auth_type" field in this mutation.

func (*EmailProviderMutation) AddedEdges

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

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

func (*EmailProviderMutation) AddedField

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

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

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

func (*EmailProviderMutation) AddedIDs

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

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

func (*EmailProviderMutation) AddedPort

func (m *EmailProviderMutation) AddedPort() (r int32, exists bool)

AddedPort returns the value that was added to the "port" field in this mutation.

func (*EmailProviderMutation) AuthType

func (m *EmailProviderMutation) AuthType() (r uint8, exists bool)

AuthType returns the value of the "auth_type" field in the mutation.

func (*EmailProviderMutation) ClearEdge

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

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) ClearIdentify

func (m *EmailProviderMutation) ClearIdentify()

ClearIdentify clears the value of the "identify" field.

func (*EmailProviderMutation) ClearPassword

func (m *EmailProviderMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*EmailProviderMutation) ClearPort

func (m *EmailProviderMutation) ClearPort()

ClearPort clears the value of the "port" field.

func (*EmailProviderMutation) ClearSecret

func (m *EmailProviderMutation) ClearSecret()

ClearSecret clears the value of the "secret" field.

func (*EmailProviderMutation) ClearedEdges

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

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

func (*EmailProviderMutation) ClearedFields

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

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

func (EmailProviderMutation) Client

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

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

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

func (*EmailProviderMutation) EdgeCleared

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

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

func (*EmailProviderMutation) EmailAddr

func (m *EmailProviderMutation) EmailAddr() (r string, exists bool)

EmailAddr returns the value of the "email_addr" field in the mutation.

func (*EmailProviderMutation) ExecContext

func (c *EmailProviderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderMutation) Field

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

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

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

func (*EmailProviderMutation) Fields

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) HostName

func (m *EmailProviderMutation) HostName() (r string, exists bool)

HostName returns the value of the "host_name" field in the mutation.

func (*EmailProviderMutation) ID

func (m *EmailProviderMutation) ID() (id uint64, 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 (*EmailProviderMutation) 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 (*EmailProviderMutation) Identify

func (m *EmailProviderMutation) Identify() (r string, exists bool)

Identify returns the value of the "identify" field in the mutation.

func (*EmailProviderMutation) IdentifyCleared

func (m *EmailProviderMutation) IdentifyCleared() bool

IdentifyCleared returns if the "identify" field was cleared in this mutation.

func (*EmailProviderMutation) IsDefault

func (m *EmailProviderMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*EmailProviderMutation) Name

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

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

func (*EmailProviderMutation) OldAuthType

func (m *EmailProviderMutation) OldAuthType(ctx context.Context) (v uint8, err error)

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

func (*EmailProviderMutation) OldCreatedAt

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

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

func (*EmailProviderMutation) OldEmailAddr

func (m *EmailProviderMutation) OldEmailAddr(ctx context.Context) (v string, err error)

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

func (*EmailProviderMutation) OldField

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) OldHostName

func (m *EmailProviderMutation) OldHostName(ctx context.Context) (v string, err error)

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

func (*EmailProviderMutation) OldIdentify

func (m *EmailProviderMutation) OldIdentify(ctx context.Context) (v string, err error)

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

func (*EmailProviderMutation) OldIsDefault

func (m *EmailProviderMutation) OldIsDefault(ctx context.Context) (v bool, err error)

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

func (*EmailProviderMutation) OldName

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

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

func (*EmailProviderMutation) OldPassword

func (m *EmailProviderMutation) OldPassword(ctx context.Context) (v string, err error)

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

func (*EmailProviderMutation) OldPort

func (m *EmailProviderMutation) OldPort(ctx context.Context) (v uint32, err error)

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

func (*EmailProviderMutation) OldSecret

func (m *EmailProviderMutation) OldSecret(ctx context.Context) (v string, err error)

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

func (*EmailProviderMutation) OldTLS

func (m *EmailProviderMutation) OldTLS(ctx context.Context) (v bool, err error)

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

func (*EmailProviderMutation) OldUpdatedAt

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

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

func (*EmailProviderMutation) Op

func (m *EmailProviderMutation) Op() Op

Op returns the operation name.

func (*EmailProviderMutation) Password

func (m *EmailProviderMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*EmailProviderMutation) PasswordCleared

func (m *EmailProviderMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*EmailProviderMutation) Port

func (m *EmailProviderMutation) Port() (r uint32, exists bool)

Port returns the value of the "port" field in the mutation.

func (*EmailProviderMutation) PortCleared

func (m *EmailProviderMutation) PortCleared() bool

PortCleared returns if the "port" field was cleared in this mutation.

func (*EmailProviderMutation) QueryContext

func (c *EmailProviderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderMutation) RemovedEdges

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

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

func (*EmailProviderMutation) RemovedIDs

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) ResetAuthType

func (m *EmailProviderMutation) ResetAuthType()

ResetAuthType resets all changes to the "auth_type" field.

func (*EmailProviderMutation) ResetCreatedAt

func (m *EmailProviderMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EmailProviderMutation) ResetEdge

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) ResetEmailAddr

func (m *EmailProviderMutation) ResetEmailAddr()

ResetEmailAddr resets all changes to the "email_addr" field.

func (*EmailProviderMutation) ResetField

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) ResetHostName

func (m *EmailProviderMutation) ResetHostName()

ResetHostName resets all changes to the "host_name" field.

func (*EmailProviderMutation) ResetIdentify

func (m *EmailProviderMutation) ResetIdentify()

ResetIdentify resets all changes to the "identify" field.

func (*EmailProviderMutation) ResetIsDefault

func (m *EmailProviderMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*EmailProviderMutation) ResetName

func (m *EmailProviderMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*EmailProviderMutation) ResetPassword

func (m *EmailProviderMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*EmailProviderMutation) ResetPort

func (m *EmailProviderMutation) ResetPort()

ResetPort resets all changes to the "port" field.

func (*EmailProviderMutation) ResetSecret

func (m *EmailProviderMutation) ResetSecret()

ResetSecret resets all changes to the "secret" field.

func (*EmailProviderMutation) ResetTLS

func (m *EmailProviderMutation) ResetTLS()

ResetTLS resets all changes to the "tls" field.

func (*EmailProviderMutation) ResetUpdatedAt

func (m *EmailProviderMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*EmailProviderMutation) Secret

func (m *EmailProviderMutation) Secret() (r string, exists bool)

Secret returns the value of the "secret" field in the mutation.

func (*EmailProviderMutation) SecretCleared

func (m *EmailProviderMutation) SecretCleared() bool

SecretCleared returns if the "secret" field was cleared in this mutation.

func (*EmailProviderMutation) SetAuthType

func (m *EmailProviderMutation) SetAuthType(u uint8)

SetAuthType sets the "auth_type" field.

func (*EmailProviderMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*EmailProviderMutation) SetEmailAddr

func (m *EmailProviderMutation) SetEmailAddr(s string)

SetEmailAddr sets the "email_addr" field.

func (*EmailProviderMutation) SetField

func (m *EmailProviderMutation) 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 (*EmailProviderMutation) SetHostName

func (m *EmailProviderMutation) SetHostName(s string)

SetHostName sets the "host_name" field.

func (*EmailProviderMutation) SetID

func (m *EmailProviderMutation) SetID(id uint64)

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

func (*EmailProviderMutation) SetIdentify

func (m *EmailProviderMutation) SetIdentify(s string)

SetIdentify sets the "identify" field.

func (*EmailProviderMutation) SetIsDefault

func (m *EmailProviderMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*EmailProviderMutation) SetName

func (m *EmailProviderMutation) SetName(s string)

SetName sets the "name" field.

func (*EmailProviderMutation) SetOp

func (m *EmailProviderMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EmailProviderMutation) SetPassword

func (m *EmailProviderMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*EmailProviderMutation) SetPort

func (m *EmailProviderMutation) SetPort(u uint32)

SetPort sets the "port" field.

func (*EmailProviderMutation) SetSecret

func (m *EmailProviderMutation) SetSecret(s string)

SetSecret sets the "secret" field.

func (*EmailProviderMutation) SetTLS

func (m *EmailProviderMutation) SetTLS(b bool)

SetTLS sets the "tls" field.

func (*EmailProviderMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*EmailProviderMutation) TLS

func (m *EmailProviderMutation) TLS() (r bool, exists bool)

TLS returns the value of the "tls" field in the mutation.

func (EmailProviderMutation) Tx

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

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

func (*EmailProviderMutation) Type

func (m *EmailProviderMutation) Type() string

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

func (*EmailProviderMutation) UpdatedAt

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

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

func (*EmailProviderMutation) Where

Where appends a list predicates to the EmailProviderMutation builder.

func (*EmailProviderMutation) WhereP

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

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

type EmailProviderPageList

type EmailProviderPageList struct {
	List        []*EmailProvider `json:"list"`
	PageDetails *PageDetails     `json:"pageDetails"`
}

EmailProviderPageList is EmailProvider PageList result.

type EmailProviderPager

type EmailProviderPager struct {
	Order  emailprovider.OrderOption
	Filter func(*EmailProviderQuery) (*EmailProviderQuery, error)
}

func (*EmailProviderPager) ApplyFilter

type EmailProviderPaginateOption

type EmailProviderPaginateOption func(*EmailProviderPager)

EmailProviderPaginateOption enables pagination customization.

type EmailProviderQuery

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

EmailProviderQuery is the builder for querying EmailProvider entities.

func (*EmailProviderQuery) Aggregate

func (epq *EmailProviderQuery) Aggregate(fns ...AggregateFunc) *EmailProviderSelect

Aggregate returns a EmailProviderSelect configured with the given aggregations.

func (*EmailProviderQuery) All

All executes the query and returns a list of EmailProviders.

func (*EmailProviderQuery) AllX

func (epq *EmailProviderQuery) AllX(ctx context.Context) []*EmailProvider

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

func (*EmailProviderQuery) Clone

func (epq *EmailProviderQuery) Clone() *EmailProviderQuery

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

func (*EmailProviderQuery) Count

func (epq *EmailProviderQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EmailProviderQuery) CountX

func (epq *EmailProviderQuery) CountX(ctx context.Context) int

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

func (*EmailProviderQuery) ExecContext

func (c *EmailProviderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderQuery) Exist

func (epq *EmailProviderQuery) Exist(ctx context.Context) (bool, error)

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

func (*EmailProviderQuery) ExistX

func (epq *EmailProviderQuery) ExistX(ctx context.Context) bool

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

func (*EmailProviderQuery) First

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

func (*EmailProviderQuery) FirstID

func (epq *EmailProviderQuery) FirstID(ctx context.Context) (id uint64, err error)

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

func (*EmailProviderQuery) FirstIDX

func (epq *EmailProviderQuery) FirstIDX(ctx context.Context) uint64

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

func (*EmailProviderQuery) FirstX

func (epq *EmailProviderQuery) FirstX(ctx context.Context) *EmailProvider

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

func (*EmailProviderQuery) GroupBy

func (epq *EmailProviderQuery) GroupBy(field string, fields ...string) *EmailProviderGroupBy

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

func (*EmailProviderQuery) IDs

func (epq *EmailProviderQuery) IDs(ctx context.Context) (ids []uint64, err error)

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

func (*EmailProviderQuery) IDsX

func (epq *EmailProviderQuery) IDsX(ctx context.Context) []uint64

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

func (*EmailProviderQuery) Limit

func (epq *EmailProviderQuery) Limit(limit int) *EmailProviderQuery

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

func (*EmailProviderQuery) Offset

func (epq *EmailProviderQuery) Offset(offset int) *EmailProviderQuery

Offset to start from.

func (*EmailProviderQuery) Only

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

func (*EmailProviderQuery) OnlyID

func (epq *EmailProviderQuery) OnlyID(ctx context.Context) (id uint64, err error)

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

func (*EmailProviderQuery) OnlyIDX

func (epq *EmailProviderQuery) OnlyIDX(ctx context.Context) uint64

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

func (*EmailProviderQuery) OnlyX

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

func (*EmailProviderQuery) Order

Order specifies how the records should be ordered.

func (*EmailProviderQuery) Page

func (ep *EmailProviderQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...EmailProviderPaginateOption,
) (*EmailProviderPageList, error)

func (*EmailProviderQuery) QueryContext

func (c *EmailProviderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderQuery) Select

func (epq *EmailProviderQuery) Select(fields ...string) *EmailProviderSelect

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

func (*EmailProviderQuery) Unique

func (epq *EmailProviderQuery) Unique(unique bool) *EmailProviderQuery

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

Where adds a new predicate for the EmailProviderQuery builder.

type EmailProviderSelect

type EmailProviderSelect struct {
	*EmailProviderQuery
	// contains filtered or unexported fields
}

EmailProviderSelect is the builder for selecting fields of EmailProvider entities.

func (*EmailProviderSelect) Aggregate

func (eps *EmailProviderSelect) Aggregate(fns ...AggregateFunc) *EmailProviderSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EmailProviderSelect) Bool

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

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

func (*EmailProviderSelect) BoolX

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

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

func (*EmailProviderSelect) Bools

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

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

func (*EmailProviderSelect) BoolsX

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

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

func (EmailProviderSelect) ExecContext

func (c EmailProviderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderSelect) Float64

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

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

func (*EmailProviderSelect) Float64X

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

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

func (*EmailProviderSelect) Float64s

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

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

func (*EmailProviderSelect) Float64sX

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

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

func (*EmailProviderSelect) Int

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

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

func (*EmailProviderSelect) IntX

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

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

func (*EmailProviderSelect) Ints

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

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

func (*EmailProviderSelect) IntsX

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

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

func (EmailProviderSelect) QueryContext

func (c EmailProviderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderSelect) Scan

func (eps *EmailProviderSelect) Scan(ctx context.Context, v any) error

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

func (*EmailProviderSelect) ScanX

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

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

func (*EmailProviderSelect) String

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

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

func (*EmailProviderSelect) StringX

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

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

func (*EmailProviderSelect) Strings

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

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

func (*EmailProviderSelect) StringsX

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

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

type EmailProviderUpdate

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

EmailProviderUpdate is the builder for updating EmailProvider entities.

func (*EmailProviderUpdate) AddAuthType

func (epu *EmailProviderUpdate) AddAuthType(u int8) *EmailProviderUpdate

AddAuthType adds u to the "auth_type" field.

func (*EmailProviderUpdate) AddPort

AddPort adds u to the "port" field.

func (*EmailProviderUpdate) ClearIdentify

func (epu *EmailProviderUpdate) ClearIdentify() *EmailProviderUpdate

ClearIdentify clears the value of the "identify" field.

func (*EmailProviderUpdate) ClearPassword

func (epu *EmailProviderUpdate) ClearPassword() *EmailProviderUpdate

ClearPassword clears the value of the "password" field.

func (*EmailProviderUpdate) ClearPort

func (epu *EmailProviderUpdate) ClearPort() *EmailProviderUpdate

ClearPort clears the value of the "port" field.

func (*EmailProviderUpdate) ClearSecret

func (epu *EmailProviderUpdate) ClearSecret() *EmailProviderUpdate

ClearSecret clears the value of the "secret" field.

func (*EmailProviderUpdate) Exec

func (epu *EmailProviderUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EmailProviderUpdate) ExecContext

func (c *EmailProviderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderUpdate) ExecX

func (epu *EmailProviderUpdate) ExecX(ctx context.Context)

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

func (*EmailProviderUpdate) Mutation

func (epu *EmailProviderUpdate) Mutation() *EmailProviderMutation

Mutation returns the EmailProviderMutation object of the builder.

func (*EmailProviderUpdate) QueryContext

func (c *EmailProviderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderUpdate) Save

func (epu *EmailProviderUpdate) Save(ctx context.Context) (int, error)

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

func (*EmailProviderUpdate) SaveX

func (epu *EmailProviderUpdate) SaveX(ctx context.Context) int

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

func (*EmailProviderUpdate) SetAuthType

func (epu *EmailProviderUpdate) SetAuthType(u uint8) *EmailProviderUpdate

SetAuthType sets the "auth_type" field.

func (*EmailProviderUpdate) SetEmailAddr

func (epu *EmailProviderUpdate) SetEmailAddr(s string) *EmailProviderUpdate

SetEmailAddr sets the "email_addr" field.

func (*EmailProviderUpdate) SetHostName

func (epu *EmailProviderUpdate) SetHostName(s string) *EmailProviderUpdate

SetHostName sets the "host_name" field.

func (*EmailProviderUpdate) SetIdentify

func (epu *EmailProviderUpdate) SetIdentify(s string) *EmailProviderUpdate

SetIdentify sets the "identify" field.

func (*EmailProviderUpdate) SetIsDefault

func (epu *EmailProviderUpdate) SetIsDefault(b bool) *EmailProviderUpdate

SetIsDefault sets the "is_default" field.

func (*EmailProviderUpdate) SetName

SetName sets the "name" field.

func (*EmailProviderUpdate) SetNillableAuthType

func (epu *EmailProviderUpdate) SetNillableAuthType(u *uint8) *EmailProviderUpdate

SetNillableAuthType sets the "auth_type" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableEmailAddr

func (epu *EmailProviderUpdate) SetNillableEmailAddr(s *string) *EmailProviderUpdate

SetNillableEmailAddr sets the "email_addr" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableHostName

func (epu *EmailProviderUpdate) SetNillableHostName(s *string) *EmailProviderUpdate

SetNillableHostName sets the "host_name" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableIdentify

func (epu *EmailProviderUpdate) SetNillableIdentify(s *string) *EmailProviderUpdate

SetNillableIdentify sets the "identify" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableIsDefault

func (epu *EmailProviderUpdate) SetNillableIsDefault(b *bool) *EmailProviderUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableName

func (epu *EmailProviderUpdate) SetNillableName(s *string) *EmailProviderUpdate

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

func (*EmailProviderUpdate) SetNillablePassword

func (epu *EmailProviderUpdate) SetNillablePassword(s *string) *EmailProviderUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillablePort

func (epu *EmailProviderUpdate) SetNillablePort(u *uint32) *EmailProviderUpdate

SetNillablePort sets the "port" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableSecret

func (epu *EmailProviderUpdate) SetNillableSecret(s *string) *EmailProviderUpdate

SetNillableSecret sets the "secret" field if the given value is not nil.

func (*EmailProviderUpdate) SetNillableTLS

func (epu *EmailProviderUpdate) SetNillableTLS(b *bool) *EmailProviderUpdate

SetNillableTLS sets the "tls" field if the given value is not nil.

func (*EmailProviderUpdate) SetNotNilAuthType

func (ep *EmailProviderUpdate) SetNotNilAuthType(value *uint8) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilEmailAddr

func (ep *EmailProviderUpdate) SetNotNilEmailAddr(value *string) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilHostName

func (ep *EmailProviderUpdate) SetNotNilHostName(value *string) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilIdentify

func (ep *EmailProviderUpdate) SetNotNilIdentify(value *string) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilIsDefault

func (ep *EmailProviderUpdate) SetNotNilIsDefault(value *bool) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilName

func (ep *EmailProviderUpdate) SetNotNilName(value *string) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilPassword

func (ep *EmailProviderUpdate) SetNotNilPassword(value *string) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilPort

func (ep *EmailProviderUpdate) SetNotNilPort(value *uint32) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilSecret

func (ep *EmailProviderUpdate) SetNotNilSecret(value *string) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilTLS

func (ep *EmailProviderUpdate) SetNotNilTLS(value *bool) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetNotNilUpdatedAt

func (ep *EmailProviderUpdate) SetNotNilUpdatedAt(value *time.Time) *EmailProviderUpdate

set field if value's pointer is not nil.

func (*EmailProviderUpdate) SetPassword

func (epu *EmailProviderUpdate) SetPassword(s string) *EmailProviderUpdate

SetPassword sets the "password" field.

func (*EmailProviderUpdate) SetPort

SetPort sets the "port" field.

func (*EmailProviderUpdate) SetSecret

func (epu *EmailProviderUpdate) SetSecret(s string) *EmailProviderUpdate

SetSecret sets the "secret" field.

func (*EmailProviderUpdate) SetTLS

SetTLS sets the "tls" field.

func (*EmailProviderUpdate) SetUpdatedAt

func (epu *EmailProviderUpdate) SetUpdatedAt(t time.Time) *EmailProviderUpdate

SetUpdatedAt sets the "updated_at" field.

func (*EmailProviderUpdate) Where

Where appends a list predicates to the EmailProviderUpdate builder.

type EmailProviderUpdateOne

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

EmailProviderUpdateOne is the builder for updating a single EmailProvider entity.

func (*EmailProviderUpdateOne) AddAuthType

func (epuo *EmailProviderUpdateOne) AddAuthType(u int8) *EmailProviderUpdateOne

AddAuthType adds u to the "auth_type" field.

func (*EmailProviderUpdateOne) AddPort

AddPort adds u to the "port" field.

func (*EmailProviderUpdateOne) ClearIdentify

func (epuo *EmailProviderUpdateOne) ClearIdentify() *EmailProviderUpdateOne

ClearIdentify clears the value of the "identify" field.

func (*EmailProviderUpdateOne) ClearPassword

func (epuo *EmailProviderUpdateOne) ClearPassword() *EmailProviderUpdateOne

ClearPassword clears the value of the "password" field.

func (*EmailProviderUpdateOne) ClearPort

ClearPort clears the value of the "port" field.

func (*EmailProviderUpdateOne) ClearSecret

func (epuo *EmailProviderUpdateOne) ClearSecret() *EmailProviderUpdateOne

ClearSecret clears the value of the "secret" field.

func (*EmailProviderUpdateOne) Exec

func (epuo *EmailProviderUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EmailProviderUpdateOne) ExecContext

func (c *EmailProviderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*EmailProviderUpdateOne) ExecX

func (epuo *EmailProviderUpdateOne) ExecX(ctx context.Context)

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

func (*EmailProviderUpdateOne) Mutation

Mutation returns the EmailProviderMutation object of the builder.

func (*EmailProviderUpdateOne) QueryContext

func (c *EmailProviderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*EmailProviderUpdateOne) Save

Save executes the query and returns the updated EmailProvider entity.

func (*EmailProviderUpdateOne) SaveX

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

func (*EmailProviderUpdateOne) Select

func (epuo *EmailProviderUpdateOne) Select(field string, fields ...string) *EmailProviderUpdateOne

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

func (*EmailProviderUpdateOne) SetAuthType

func (epuo *EmailProviderUpdateOne) SetAuthType(u uint8) *EmailProviderUpdateOne

SetAuthType sets the "auth_type" field.

func (*EmailProviderUpdateOne) SetEmailAddr

func (epuo *EmailProviderUpdateOne) SetEmailAddr(s string) *EmailProviderUpdateOne

SetEmailAddr sets the "email_addr" field.

func (*EmailProviderUpdateOne) SetHostName

SetHostName sets the "host_name" field.

func (*EmailProviderUpdateOne) SetIdentify

SetIdentify sets the "identify" field.

func (*EmailProviderUpdateOne) SetIsDefault

func (epuo *EmailProviderUpdateOne) SetIsDefault(b bool) *EmailProviderUpdateOne

SetIsDefault sets the "is_default" field.

func (*EmailProviderUpdateOne) SetName

SetName sets the "name" field.

func (*EmailProviderUpdateOne) SetNillableAuthType

func (epuo *EmailProviderUpdateOne) SetNillableAuthType(u *uint8) *EmailProviderUpdateOne

SetNillableAuthType sets the "auth_type" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableEmailAddr

func (epuo *EmailProviderUpdateOne) SetNillableEmailAddr(s *string) *EmailProviderUpdateOne

SetNillableEmailAddr sets the "email_addr" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableHostName

func (epuo *EmailProviderUpdateOne) SetNillableHostName(s *string) *EmailProviderUpdateOne

SetNillableHostName sets the "host_name" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableIdentify

func (epuo *EmailProviderUpdateOne) SetNillableIdentify(s *string) *EmailProviderUpdateOne

SetNillableIdentify sets the "identify" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableIsDefault

func (epuo *EmailProviderUpdateOne) SetNillableIsDefault(b *bool) *EmailProviderUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableName

func (epuo *EmailProviderUpdateOne) SetNillableName(s *string) *EmailProviderUpdateOne

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

func (*EmailProviderUpdateOne) SetNillablePassword

func (epuo *EmailProviderUpdateOne) SetNillablePassword(s *string) *EmailProviderUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillablePort

func (epuo *EmailProviderUpdateOne) SetNillablePort(u *uint32) *EmailProviderUpdateOne

SetNillablePort sets the "port" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableSecret

func (epuo *EmailProviderUpdateOne) SetNillableSecret(s *string) *EmailProviderUpdateOne

SetNillableSecret sets the "secret" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNillableTLS

func (epuo *EmailProviderUpdateOne) SetNillableTLS(b *bool) *EmailProviderUpdateOne

SetNillableTLS sets the "tls" field if the given value is not nil.

func (*EmailProviderUpdateOne) SetNotNilAuthType

func (ep *EmailProviderUpdateOne) SetNotNilAuthType(value *uint8) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilEmailAddr

func (ep *EmailProviderUpdateOne) SetNotNilEmailAddr(value *string) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilHostName

func (ep *EmailProviderUpdateOne) SetNotNilHostName(value *string) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilIdentify

func (ep *EmailProviderUpdateOne) SetNotNilIdentify(value *string) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilIsDefault

func (ep *EmailProviderUpdateOne) SetNotNilIsDefault(value *bool) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilName

func (ep *EmailProviderUpdateOne) SetNotNilName(value *string) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilPassword

func (ep *EmailProviderUpdateOne) SetNotNilPassword(value *string) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilPort

func (ep *EmailProviderUpdateOne) SetNotNilPort(value *uint32) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilSecret

func (ep *EmailProviderUpdateOne) SetNotNilSecret(value *string) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilTLS

func (ep *EmailProviderUpdateOne) SetNotNilTLS(value *bool) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetNotNilUpdatedAt

func (ep *EmailProviderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *EmailProviderUpdateOne

set field if value's pointer is not nil.

func (*EmailProviderUpdateOne) SetPassword

SetPassword sets the "password" field.

func (*EmailProviderUpdateOne) SetPort

SetPort sets the "port" field.

func (*EmailProviderUpdateOne) SetSecret

SetSecret sets the "secret" field.

func (*EmailProviderUpdateOne) SetTLS

SetTLS sets the "tls" field.

func (*EmailProviderUpdateOne) SetUpdatedAt

func (epuo *EmailProviderUpdateOne) SetUpdatedAt(t time.Time) *EmailProviderUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*EmailProviderUpdateOne) Where

Where appends a list predicates to the EmailProviderUpdate builder.

type EmailProviders

type EmailProviders []*EmailProvider

EmailProviders is a parsable slice of EmailProvider.

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 OrderDirection

type OrderDirection string

OrderDirection defines the directions in which to order a list of items.

const (
	// OrderDirectionAsc specifies an ascending order.
	OrderDirectionAsc OrderDirection = "ASC"
	// OrderDirectionDesc specifies a descending order.
	OrderDirectionDesc OrderDirection = "DESC"
)

func (OrderDirection) String

func (o OrderDirection) String() string

String implements fmt.Stringer interface.

func (OrderDirection) Validate

func (o OrderDirection) Validate() error

Validate the order direction value.

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 PageDetails

type PageDetails struct {
	Page  uint64 `json:"page"`
	Size  uint64 `json:"size"`
	Total uint64 `json:"total"`
}

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 SmsLog

type SmsLog struct {

	// ID of the ent.
	// UUID
	ID uuid.UUID `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The target phone number | 目标电话
	PhoneNumber string `json:"phone_number,omitempty"`
	// The content | 发送的内容
	Content string `json:"content,omitempty"`
	// The send status, 0 unknown 1 success 2 failed | 发送的状态, 0 未知, 1 成功, 2 失败
	SendStatus uint8 `json:"send_status,omitempty"`
	// The sms service provider | 短信服务提供商
	Provider string `json:"provider,omitempty"`
	// contains filtered or unexported fields
}

SmsLog is the model entity for the SmsLog schema.

func (*SmsLog) ExecContext

func (c *SmsLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLog) QueryContext

func (c *SmsLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLog) String

func (sl *SmsLog) String() string

String implements the fmt.Stringer.

func (*SmsLog) Unwrap

func (sl *SmsLog) Unwrap() *SmsLog

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

func (sl *SmsLog) Update() *SmsLogUpdateOne

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

func (*SmsLog) Value

func (sl *SmsLog) Value(name string) (ent.Value, error)

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

type SmsLogClient

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

SmsLogClient is a client for the SmsLog schema.

func NewSmsLogClient

func NewSmsLogClient(c config) *SmsLogClient

NewSmsLogClient returns a client for the SmsLog from the given config.

func (*SmsLogClient) Create

func (c *SmsLogClient) Create() *SmsLogCreate

Create returns a builder for creating a SmsLog entity.

func (*SmsLogClient) CreateBulk

func (c *SmsLogClient) CreateBulk(builders ...*SmsLogCreate) *SmsLogCreateBulk

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

func (*SmsLogClient) Delete

func (c *SmsLogClient) Delete() *SmsLogDelete

Delete returns a delete builder for SmsLog.

func (*SmsLogClient) DeleteOne

func (c *SmsLogClient) DeleteOne(sl *SmsLog) *SmsLogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SmsLogClient) DeleteOneID

func (c *SmsLogClient) DeleteOneID(id uuid.UUID) *SmsLogDeleteOne

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

func (*SmsLogClient) ExecContext

func (c *SmsLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogClient) Get

func (c *SmsLogClient) Get(ctx context.Context, id uuid.UUID) (*SmsLog, error)

Get returns a SmsLog entity by its id.

func (*SmsLogClient) GetX

func (c *SmsLogClient) GetX(ctx context.Context, id uuid.UUID) *SmsLog

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

func (*SmsLogClient) Hooks

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

Hooks returns the client hooks.

func (*SmsLogClient) Intercept

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

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

func (*SmsLogClient) Interceptors

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

Interceptors returns the client interceptors.

func (*SmsLogClient) MapCreateBulk

func (c *SmsLogClient) MapCreateBulk(slice any, setFunc func(*SmsLogCreate, int)) *SmsLogCreateBulk

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

func (c *SmsLogClient) Query() *SmsLogQuery

Query returns a query builder for SmsLog.

func (*SmsLogClient) QueryContext

func (c *SmsLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogClient) Update

func (c *SmsLogClient) Update() *SmsLogUpdate

Update returns an update builder for SmsLog.

func (*SmsLogClient) UpdateOne

func (c *SmsLogClient) UpdateOne(sl *SmsLog) *SmsLogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SmsLogClient) UpdateOneID

func (c *SmsLogClient) UpdateOneID(id uuid.UUID) *SmsLogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SmsLogClient) Use

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

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

type SmsLogCreate

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

SmsLogCreate is the builder for creating a SmsLog entity.

func (*SmsLogCreate) Exec

func (slc *SmsLogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SmsLogCreate) ExecContext

func (c *SmsLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogCreate) ExecX

func (slc *SmsLogCreate) ExecX(ctx context.Context)

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

func (*SmsLogCreate) Mutation

func (slc *SmsLogCreate) Mutation() *SmsLogMutation

Mutation returns the SmsLogMutation object of the builder.

func (*SmsLogCreate) QueryContext

func (c *SmsLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogCreate) Save

func (slc *SmsLogCreate) Save(ctx context.Context) (*SmsLog, error)

Save creates the SmsLog in the database.

func (*SmsLogCreate) SaveX

func (slc *SmsLogCreate) SaveX(ctx context.Context) *SmsLog

SaveX calls Save and panics if Save returns an error.

func (*SmsLogCreate) SetContent

func (slc *SmsLogCreate) SetContent(s string) *SmsLogCreate

SetContent sets the "content" field.

func (*SmsLogCreate) SetCreatedAt

func (slc *SmsLogCreate) SetCreatedAt(t time.Time) *SmsLogCreate

SetCreatedAt sets the "created_at" field.

func (*SmsLogCreate) SetID

func (slc *SmsLogCreate) SetID(u uuid.UUID) *SmsLogCreate

SetID sets the "id" field.

func (*SmsLogCreate) SetNillableCreatedAt

func (slc *SmsLogCreate) SetNillableCreatedAt(t *time.Time) *SmsLogCreate

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

func (*SmsLogCreate) SetNillableID

func (slc *SmsLogCreate) SetNillableID(u *uuid.UUID) *SmsLogCreate

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

func (*SmsLogCreate) SetNillableUpdatedAt

func (slc *SmsLogCreate) SetNillableUpdatedAt(t *time.Time) *SmsLogCreate

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

func (*SmsLogCreate) SetNotNilContent

func (sl *SmsLogCreate) SetNotNilContent(value *string) *SmsLogCreate

set field if value's pointer is not nil.

func (*SmsLogCreate) SetNotNilPhoneNumber

func (sl *SmsLogCreate) SetNotNilPhoneNumber(value *string) *SmsLogCreate

set field if value's pointer is not nil.

func (*SmsLogCreate) SetNotNilProvider

func (sl *SmsLogCreate) SetNotNilProvider(value *string) *SmsLogCreate

set field if value's pointer is not nil.

func (*SmsLogCreate) SetNotNilSendStatus

func (sl *SmsLogCreate) SetNotNilSendStatus(value *uint8) *SmsLogCreate

set field if value's pointer is not nil.

func (*SmsLogCreate) SetNotNilUpdatedAt

func (sl *SmsLogCreate) SetNotNilUpdatedAt(value *time.Time) *SmsLogCreate

set field if value's pointer is not nil.

func (*SmsLogCreate) SetPhoneNumber

func (slc *SmsLogCreate) SetPhoneNumber(s string) *SmsLogCreate

SetPhoneNumber sets the "phone_number" field.

func (*SmsLogCreate) SetProvider

func (slc *SmsLogCreate) SetProvider(s string) *SmsLogCreate

SetProvider sets the "provider" field.

func (*SmsLogCreate) SetSendStatus

func (slc *SmsLogCreate) SetSendStatus(u uint8) *SmsLogCreate

SetSendStatus sets the "send_status" field.

func (*SmsLogCreate) SetUpdatedAt

func (slc *SmsLogCreate) SetUpdatedAt(t time.Time) *SmsLogCreate

SetUpdatedAt sets the "updated_at" field.

type SmsLogCreateBulk

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

SmsLogCreateBulk is the builder for creating many SmsLog entities in bulk.

func (*SmsLogCreateBulk) Exec

func (slcb *SmsLogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SmsLogCreateBulk) ExecContext

func (c *SmsLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogCreateBulk) ExecX

func (slcb *SmsLogCreateBulk) ExecX(ctx context.Context)

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

func (*SmsLogCreateBulk) QueryContext

func (c *SmsLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogCreateBulk) Save

func (slcb *SmsLogCreateBulk) Save(ctx context.Context) ([]*SmsLog, error)

Save creates the SmsLog entities in the database.

func (*SmsLogCreateBulk) SaveX

func (slcb *SmsLogCreateBulk) SaveX(ctx context.Context) []*SmsLog

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

type SmsLogDelete

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

SmsLogDelete is the builder for deleting a SmsLog entity.

func (*SmsLogDelete) Exec

func (sld *SmsLogDelete) Exec(ctx context.Context) (int, error)

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

func (*SmsLogDelete) ExecContext

func (c *SmsLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogDelete) ExecX

func (sld *SmsLogDelete) ExecX(ctx context.Context) int

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

func (*SmsLogDelete) QueryContext

func (c *SmsLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogDelete) Where

func (sld *SmsLogDelete) Where(ps ...predicate.SmsLog) *SmsLogDelete

Where appends a list predicates to the SmsLogDelete builder.

type SmsLogDeleteOne

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

SmsLogDeleteOne is the builder for deleting a single SmsLog entity.

func (*SmsLogDeleteOne) Exec

func (sldo *SmsLogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SmsLogDeleteOne) ExecX

func (sldo *SmsLogDeleteOne) ExecX(ctx context.Context)

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

func (*SmsLogDeleteOne) Where

func (sldo *SmsLogDeleteOne) Where(ps ...predicate.SmsLog) *SmsLogDeleteOne

Where appends a list predicates to the SmsLogDelete builder.

type SmsLogGroupBy

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

SmsLogGroupBy is the group-by builder for SmsLog entities.

func (*SmsLogGroupBy) Aggregate

func (slgb *SmsLogGroupBy) Aggregate(fns ...AggregateFunc) *SmsLogGroupBy

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

func (*SmsLogGroupBy) Bool

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

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

func (*SmsLogGroupBy) BoolX

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

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

func (*SmsLogGroupBy) Bools

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

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

func (*SmsLogGroupBy) BoolsX

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

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

func (*SmsLogGroupBy) Float64

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

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

func (*SmsLogGroupBy) Float64X

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

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

func (*SmsLogGroupBy) Float64s

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

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

func (*SmsLogGroupBy) Float64sX

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

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

func (*SmsLogGroupBy) Int

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

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

func (*SmsLogGroupBy) IntX

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

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

func (*SmsLogGroupBy) Ints

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

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

func (*SmsLogGroupBy) IntsX

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

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

func (*SmsLogGroupBy) Scan

func (slgb *SmsLogGroupBy) Scan(ctx context.Context, v any) error

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

func (*SmsLogGroupBy) ScanX

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

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

func (*SmsLogGroupBy) String

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

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

func (*SmsLogGroupBy) StringX

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

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

func (*SmsLogGroupBy) Strings

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

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

func (*SmsLogGroupBy) StringsX

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

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

type SmsLogMutation

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

SmsLogMutation represents an operation that mutates the SmsLog nodes in the graph.

func (*SmsLogMutation) AddField

func (m *SmsLogMutation) 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 (*SmsLogMutation) AddSendStatus

func (m *SmsLogMutation) AddSendStatus(u int8)

AddSendStatus adds u to the "send_status" field.

func (*SmsLogMutation) AddedEdges

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

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

func (*SmsLogMutation) AddedField

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

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

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

func (*SmsLogMutation) AddedIDs

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

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

func (*SmsLogMutation) AddedSendStatus

func (m *SmsLogMutation) AddedSendStatus() (r int8, exists bool)

AddedSendStatus returns the value that was added to the "send_status" field in this mutation.

func (*SmsLogMutation) ClearEdge

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

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

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

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

func (*SmsLogMutation) ClearedFields

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

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

func (SmsLogMutation) Client

func (m SmsLogMutation) 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 (*SmsLogMutation) Content

func (m *SmsLogMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*SmsLogMutation) CreatedAt

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

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

func (*SmsLogMutation) EdgeCleared

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

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

func (*SmsLogMutation) ExecContext

func (c *SmsLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogMutation) Field

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

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

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

func (*SmsLogMutation) Fields

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

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

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

func (*SmsLogMutation) IDs

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

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

func (*SmsLogMutation) OldContent

func (m *SmsLogMutation) OldContent(ctx context.Context) (v string, err error)

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

func (*SmsLogMutation) OldCreatedAt

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

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

func (*SmsLogMutation) OldField

func (m *SmsLogMutation) 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 (*SmsLogMutation) OldPhoneNumber

func (m *SmsLogMutation) OldPhoneNumber(ctx context.Context) (v string, err error)

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

func (*SmsLogMutation) OldProvider

func (m *SmsLogMutation) OldProvider(ctx context.Context) (v string, err error)

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

func (*SmsLogMutation) OldSendStatus

func (m *SmsLogMutation) OldSendStatus(ctx context.Context) (v uint8, err error)

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

func (*SmsLogMutation) OldUpdatedAt

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

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

func (*SmsLogMutation) Op

func (m *SmsLogMutation) Op() Op

Op returns the operation name.

func (*SmsLogMutation) PhoneNumber

func (m *SmsLogMutation) PhoneNumber() (r string, exists bool)

PhoneNumber returns the value of the "phone_number" field in the mutation.

func (*SmsLogMutation) Provider

func (m *SmsLogMutation) Provider() (r string, exists bool)

Provider returns the value of the "provider" field in the mutation.

func (*SmsLogMutation) QueryContext

func (c *SmsLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogMutation) RemovedEdges

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

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

func (*SmsLogMutation) RemovedIDs

func (m *SmsLogMutation) 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 (*SmsLogMutation) ResetContent

func (m *SmsLogMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*SmsLogMutation) ResetCreatedAt

func (m *SmsLogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SmsLogMutation) ResetEdge

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

func (m *SmsLogMutation) 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 (*SmsLogMutation) ResetPhoneNumber

func (m *SmsLogMutation) ResetPhoneNumber()

ResetPhoneNumber resets all changes to the "phone_number" field.

func (*SmsLogMutation) ResetProvider

func (m *SmsLogMutation) ResetProvider()

ResetProvider resets all changes to the "provider" field.

func (*SmsLogMutation) ResetSendStatus

func (m *SmsLogMutation) ResetSendStatus()

ResetSendStatus resets all changes to the "send_status" field.

func (*SmsLogMutation) ResetUpdatedAt

func (m *SmsLogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SmsLogMutation) SendStatus

func (m *SmsLogMutation) SendStatus() (r uint8, exists bool)

SendStatus returns the value of the "send_status" field in the mutation.

func (*SmsLogMutation) SetContent

func (m *SmsLogMutation) SetContent(s string)

SetContent sets the "content" field.

func (*SmsLogMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SmsLogMutation) SetField

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

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

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

func (*SmsLogMutation) SetOp

func (m *SmsLogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SmsLogMutation) SetPhoneNumber

func (m *SmsLogMutation) SetPhoneNumber(s string)

SetPhoneNumber sets the "phone_number" field.

func (*SmsLogMutation) SetProvider

func (m *SmsLogMutation) SetProvider(s string)

SetProvider sets the "provider" field.

func (*SmsLogMutation) SetSendStatus

func (m *SmsLogMutation) SetSendStatus(u uint8)

SetSendStatus sets the "send_status" field.

func (*SmsLogMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (SmsLogMutation) Tx

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

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

func (*SmsLogMutation) Type

func (m *SmsLogMutation) Type() string

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

func (*SmsLogMutation) UpdatedAt

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

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

func (*SmsLogMutation) Where

func (m *SmsLogMutation) Where(ps ...predicate.SmsLog)

Where appends a list predicates to the SmsLogMutation builder.

func (*SmsLogMutation) WhereP

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

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

type SmsLogPageList

type SmsLogPageList struct {
	List        []*SmsLog    `json:"list"`
	PageDetails *PageDetails `json:"pageDetails"`
}

SmsLogPageList is SmsLog PageList result.

type SmsLogPager

type SmsLogPager struct {
	Order  smslog.OrderOption
	Filter func(*SmsLogQuery) (*SmsLogQuery, error)
}

func (*SmsLogPager) ApplyFilter

func (p *SmsLogPager) ApplyFilter(query *SmsLogQuery) (*SmsLogQuery, error)

type SmsLogPaginateOption

type SmsLogPaginateOption func(*SmsLogPager)

SmsLogPaginateOption enables pagination customization.

type SmsLogQuery

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

SmsLogQuery is the builder for querying SmsLog entities.

func (*SmsLogQuery) Aggregate

func (slq *SmsLogQuery) Aggregate(fns ...AggregateFunc) *SmsLogSelect

Aggregate returns a SmsLogSelect configured with the given aggregations.

func (*SmsLogQuery) All

func (slq *SmsLogQuery) All(ctx context.Context) ([]*SmsLog, error)

All executes the query and returns a list of SmsLogs.

func (*SmsLogQuery) AllX

func (slq *SmsLogQuery) AllX(ctx context.Context) []*SmsLog

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

func (*SmsLogQuery) Clone

func (slq *SmsLogQuery) Clone() *SmsLogQuery

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

func (*SmsLogQuery) Count

func (slq *SmsLogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SmsLogQuery) CountX

func (slq *SmsLogQuery) CountX(ctx context.Context) int

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

func (*SmsLogQuery) ExecContext

func (c *SmsLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogQuery) Exist

func (slq *SmsLogQuery) Exist(ctx context.Context) (bool, error)

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

func (*SmsLogQuery) ExistX

func (slq *SmsLogQuery) ExistX(ctx context.Context) bool

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

func (*SmsLogQuery) First

func (slq *SmsLogQuery) First(ctx context.Context) (*SmsLog, error)

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

func (*SmsLogQuery) FirstID

func (slq *SmsLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*SmsLogQuery) FirstIDX

func (slq *SmsLogQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*SmsLogQuery) FirstX

func (slq *SmsLogQuery) FirstX(ctx context.Context) *SmsLog

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

func (*SmsLogQuery) GroupBy

func (slq *SmsLogQuery) GroupBy(field string, fields ...string) *SmsLogGroupBy

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

func (*SmsLogQuery) IDs

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

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

func (*SmsLogQuery) IDsX

func (slq *SmsLogQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*SmsLogQuery) Limit

func (slq *SmsLogQuery) Limit(limit int) *SmsLogQuery

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

func (*SmsLogQuery) Offset

func (slq *SmsLogQuery) Offset(offset int) *SmsLogQuery

Offset to start from.

func (*SmsLogQuery) Only

func (slq *SmsLogQuery) Only(ctx context.Context) (*SmsLog, error)

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

func (*SmsLogQuery) OnlyID

func (slq *SmsLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*SmsLogQuery) OnlyIDX

func (slq *SmsLogQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*SmsLogQuery) OnlyX

func (slq *SmsLogQuery) OnlyX(ctx context.Context) *SmsLog

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

func (*SmsLogQuery) Order

func (slq *SmsLogQuery) Order(o ...smslog.OrderOption) *SmsLogQuery

Order specifies how the records should be ordered.

func (*SmsLogQuery) Page

func (sl *SmsLogQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...SmsLogPaginateOption,
) (*SmsLogPageList, error)

func (*SmsLogQuery) QueryContext

func (c *SmsLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogQuery) Select

func (slq *SmsLogQuery) Select(fields ...string) *SmsLogSelect

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

func (*SmsLogQuery) Unique

func (slq *SmsLogQuery) Unique(unique bool) *SmsLogQuery

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

func (slq *SmsLogQuery) Where(ps ...predicate.SmsLog) *SmsLogQuery

Where adds a new predicate for the SmsLogQuery builder.

type SmsLogSelect

type SmsLogSelect struct {
	*SmsLogQuery
	// contains filtered or unexported fields
}

SmsLogSelect is the builder for selecting fields of SmsLog entities.

func (*SmsLogSelect) Aggregate

func (sls *SmsLogSelect) Aggregate(fns ...AggregateFunc) *SmsLogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SmsLogSelect) Bool

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

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

func (*SmsLogSelect) BoolX

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

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

func (*SmsLogSelect) Bools

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

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

func (*SmsLogSelect) BoolsX

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

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

func (SmsLogSelect) ExecContext

func (c SmsLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogSelect) Float64

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

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

func (*SmsLogSelect) Float64X

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

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

func (*SmsLogSelect) Float64s

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

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

func (*SmsLogSelect) Float64sX

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

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

func (*SmsLogSelect) Int

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

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

func (*SmsLogSelect) IntX

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

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

func (*SmsLogSelect) Ints

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

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

func (*SmsLogSelect) IntsX

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

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

func (SmsLogSelect) QueryContext

func (c SmsLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogSelect) Scan

func (sls *SmsLogSelect) Scan(ctx context.Context, v any) error

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

func (*SmsLogSelect) ScanX

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

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

func (*SmsLogSelect) String

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

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

func (*SmsLogSelect) StringX

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

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

func (*SmsLogSelect) Strings

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

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

func (*SmsLogSelect) StringsX

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

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

type SmsLogUpdate

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

SmsLogUpdate is the builder for updating SmsLog entities.

func (*SmsLogUpdate) AddSendStatus

func (slu *SmsLogUpdate) AddSendStatus(u int8) *SmsLogUpdate

AddSendStatus adds u to the "send_status" field.

func (*SmsLogUpdate) Exec

func (slu *SmsLogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SmsLogUpdate) ExecContext

func (c *SmsLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogUpdate) ExecX

func (slu *SmsLogUpdate) ExecX(ctx context.Context)

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

func (*SmsLogUpdate) Mutation

func (slu *SmsLogUpdate) Mutation() *SmsLogMutation

Mutation returns the SmsLogMutation object of the builder.

func (*SmsLogUpdate) QueryContext

func (c *SmsLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogUpdate) Save

func (slu *SmsLogUpdate) Save(ctx context.Context) (int, error)

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

func (*SmsLogUpdate) SaveX

func (slu *SmsLogUpdate) SaveX(ctx context.Context) int

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

func (*SmsLogUpdate) SetContent

func (slu *SmsLogUpdate) SetContent(s string) *SmsLogUpdate

SetContent sets the "content" field.

func (*SmsLogUpdate) SetNillableContent

func (slu *SmsLogUpdate) SetNillableContent(s *string) *SmsLogUpdate

SetNillableContent sets the "content" field if the given value is not nil.

func (*SmsLogUpdate) SetNillablePhoneNumber

func (slu *SmsLogUpdate) SetNillablePhoneNumber(s *string) *SmsLogUpdate

SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil.

func (*SmsLogUpdate) SetNillableProvider

func (slu *SmsLogUpdate) SetNillableProvider(s *string) *SmsLogUpdate

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*SmsLogUpdate) SetNillableSendStatus

func (slu *SmsLogUpdate) SetNillableSendStatus(u *uint8) *SmsLogUpdate

SetNillableSendStatus sets the "send_status" field if the given value is not nil.

func (*SmsLogUpdate) SetNotNilContent

func (sl *SmsLogUpdate) SetNotNilContent(value *string) *SmsLogUpdate

set field if value's pointer is not nil.

func (*SmsLogUpdate) SetNotNilPhoneNumber

func (sl *SmsLogUpdate) SetNotNilPhoneNumber(value *string) *SmsLogUpdate

set field if value's pointer is not nil.

func (*SmsLogUpdate) SetNotNilProvider

func (sl *SmsLogUpdate) SetNotNilProvider(value *string) *SmsLogUpdate

set field if value's pointer is not nil.

func (*SmsLogUpdate) SetNotNilSendStatus

func (sl *SmsLogUpdate) SetNotNilSendStatus(value *uint8) *SmsLogUpdate

set field if value's pointer is not nil.

func (*SmsLogUpdate) SetNotNilUpdatedAt

func (sl *SmsLogUpdate) SetNotNilUpdatedAt(value *time.Time) *SmsLogUpdate

set field if value's pointer is not nil.

func (*SmsLogUpdate) SetPhoneNumber

func (slu *SmsLogUpdate) SetPhoneNumber(s string) *SmsLogUpdate

SetPhoneNumber sets the "phone_number" field.

func (*SmsLogUpdate) SetProvider

func (slu *SmsLogUpdate) SetProvider(s string) *SmsLogUpdate

SetProvider sets the "provider" field.

func (*SmsLogUpdate) SetSendStatus

func (slu *SmsLogUpdate) SetSendStatus(u uint8) *SmsLogUpdate

SetSendStatus sets the "send_status" field.

func (*SmsLogUpdate) SetUpdatedAt

func (slu *SmsLogUpdate) SetUpdatedAt(t time.Time) *SmsLogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SmsLogUpdate) Where

func (slu *SmsLogUpdate) Where(ps ...predicate.SmsLog) *SmsLogUpdate

Where appends a list predicates to the SmsLogUpdate builder.

type SmsLogUpdateOne

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

SmsLogUpdateOne is the builder for updating a single SmsLog entity.

func (*SmsLogUpdateOne) AddSendStatus

func (sluo *SmsLogUpdateOne) AddSendStatus(u int8) *SmsLogUpdateOne

AddSendStatus adds u to the "send_status" field.

func (*SmsLogUpdateOne) Exec

func (sluo *SmsLogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SmsLogUpdateOne) ExecContext

func (c *SmsLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsLogUpdateOne) ExecX

func (sluo *SmsLogUpdateOne) ExecX(ctx context.Context)

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

func (*SmsLogUpdateOne) Mutation

func (sluo *SmsLogUpdateOne) Mutation() *SmsLogMutation

Mutation returns the SmsLogMutation object of the builder.

func (*SmsLogUpdateOne) QueryContext

func (c *SmsLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsLogUpdateOne) Save

func (sluo *SmsLogUpdateOne) Save(ctx context.Context) (*SmsLog, error)

Save executes the query and returns the updated SmsLog entity.

func (*SmsLogUpdateOne) SaveX

func (sluo *SmsLogUpdateOne) SaveX(ctx context.Context) *SmsLog

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

func (*SmsLogUpdateOne) Select

func (sluo *SmsLogUpdateOne) Select(field string, fields ...string) *SmsLogUpdateOne

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

func (*SmsLogUpdateOne) SetContent

func (sluo *SmsLogUpdateOne) SetContent(s string) *SmsLogUpdateOne

SetContent sets the "content" field.

func (*SmsLogUpdateOne) SetNillableContent

func (sluo *SmsLogUpdateOne) SetNillableContent(s *string) *SmsLogUpdateOne

SetNillableContent sets the "content" field if the given value is not nil.

func (*SmsLogUpdateOne) SetNillablePhoneNumber

func (sluo *SmsLogUpdateOne) SetNillablePhoneNumber(s *string) *SmsLogUpdateOne

SetNillablePhoneNumber sets the "phone_number" field if the given value is not nil.

func (*SmsLogUpdateOne) SetNillableProvider

func (sluo *SmsLogUpdateOne) SetNillableProvider(s *string) *SmsLogUpdateOne

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*SmsLogUpdateOne) SetNillableSendStatus

func (sluo *SmsLogUpdateOne) SetNillableSendStatus(u *uint8) *SmsLogUpdateOne

SetNillableSendStatus sets the "send_status" field if the given value is not nil.

func (*SmsLogUpdateOne) SetNotNilContent

func (sl *SmsLogUpdateOne) SetNotNilContent(value *string) *SmsLogUpdateOne

set field if value's pointer is not nil.

func (*SmsLogUpdateOne) SetNotNilPhoneNumber

func (sl *SmsLogUpdateOne) SetNotNilPhoneNumber(value *string) *SmsLogUpdateOne

set field if value's pointer is not nil.

func (*SmsLogUpdateOne) SetNotNilProvider

func (sl *SmsLogUpdateOne) SetNotNilProvider(value *string) *SmsLogUpdateOne

set field if value's pointer is not nil.

func (*SmsLogUpdateOne) SetNotNilSendStatus

func (sl *SmsLogUpdateOne) SetNotNilSendStatus(value *uint8) *SmsLogUpdateOne

set field if value's pointer is not nil.

func (*SmsLogUpdateOne) SetNotNilUpdatedAt

func (sl *SmsLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SmsLogUpdateOne

set field if value's pointer is not nil.

func (*SmsLogUpdateOne) SetPhoneNumber

func (sluo *SmsLogUpdateOne) SetPhoneNumber(s string) *SmsLogUpdateOne

SetPhoneNumber sets the "phone_number" field.

func (*SmsLogUpdateOne) SetProvider

func (sluo *SmsLogUpdateOne) SetProvider(s string) *SmsLogUpdateOne

SetProvider sets the "provider" field.

func (*SmsLogUpdateOne) SetSendStatus

func (sluo *SmsLogUpdateOne) SetSendStatus(u uint8) *SmsLogUpdateOne

SetSendStatus sets the "send_status" field.

func (*SmsLogUpdateOne) SetUpdatedAt

func (sluo *SmsLogUpdateOne) SetUpdatedAt(t time.Time) *SmsLogUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SmsLogUpdateOne) Where

func (sluo *SmsLogUpdateOne) Where(ps ...predicate.SmsLog) *SmsLogUpdateOne

Where appends a list predicates to the SmsLogUpdate builder.

type SmsLogs

type SmsLogs []*SmsLog

SmsLogs is a parsable slice of SmsLog.

type SmsProvider

type SmsProvider struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// The SMS provider name | 短信服务的提供商
	Name string `json:"name,omitempty"`
	// The secret ID | 密钥 ID
	SecretID string `json:"secret_id,omitempty"`
	// The secret key | 密钥 Key
	SecretKey string `json:"secret_key,omitempty"`
	// The service region | 服务器所在地区
	Region string `json:"region,omitempty"`
	// Is it the default provider | 是否为默认提供商
	IsDefault bool `json:"is_default,omitempty"`
	// contains filtered or unexported fields
}

SmsProvider is the model entity for the SmsProvider schema.

func (*SmsProvider) ExecContext

func (c *SmsProvider) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProvider) QueryContext

func (c *SmsProvider) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProvider) String

func (sp *SmsProvider) String() string

String implements the fmt.Stringer.

func (*SmsProvider) Unwrap

func (sp *SmsProvider) Unwrap() *SmsProvider

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

func (sp *SmsProvider) Update() *SmsProviderUpdateOne

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

func (*SmsProvider) Value

func (sp *SmsProvider) Value(name string) (ent.Value, error)

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

type SmsProviderClient

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

SmsProviderClient is a client for the SmsProvider schema.

func NewSmsProviderClient

func NewSmsProviderClient(c config) *SmsProviderClient

NewSmsProviderClient returns a client for the SmsProvider from the given config.

func (*SmsProviderClient) Create

func (c *SmsProviderClient) Create() *SmsProviderCreate

Create returns a builder for creating a SmsProvider entity.

func (*SmsProviderClient) CreateBulk

func (c *SmsProviderClient) CreateBulk(builders ...*SmsProviderCreate) *SmsProviderCreateBulk

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

func (*SmsProviderClient) Delete

func (c *SmsProviderClient) Delete() *SmsProviderDelete

Delete returns a delete builder for SmsProvider.

func (*SmsProviderClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SmsProviderClient) DeleteOneID

func (c *SmsProviderClient) DeleteOneID(id uint64) *SmsProviderDeleteOne

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

func (*SmsProviderClient) ExecContext

func (c *SmsProviderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderClient) Get

Get returns a SmsProvider entity by its id.

func (*SmsProviderClient) GetX

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

func (*SmsProviderClient) Hooks

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

Hooks returns the client hooks.

func (*SmsProviderClient) Intercept

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

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

func (*SmsProviderClient) Interceptors

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

Interceptors returns the client interceptors.

func (*SmsProviderClient) MapCreateBulk

func (c *SmsProviderClient) MapCreateBulk(slice any, setFunc func(*SmsProviderCreate, int)) *SmsProviderCreateBulk

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

func (c *SmsProviderClient) Query() *SmsProviderQuery

Query returns a query builder for SmsProvider.

func (*SmsProviderClient) QueryContext

func (c *SmsProviderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderClient) Update

func (c *SmsProviderClient) Update() *SmsProviderUpdate

Update returns an update builder for SmsProvider.

func (*SmsProviderClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SmsProviderClient) UpdateOneID

func (c *SmsProviderClient) UpdateOneID(id uint64) *SmsProviderUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SmsProviderClient) Use

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

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

type SmsProviderCreate

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

SmsProviderCreate is the builder for creating a SmsProvider entity.

func (*SmsProviderCreate) Exec

func (spc *SmsProviderCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SmsProviderCreate) ExecContext

func (c *SmsProviderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderCreate) ExecX

func (spc *SmsProviderCreate) ExecX(ctx context.Context)

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

func (*SmsProviderCreate) Mutation

func (spc *SmsProviderCreate) Mutation() *SmsProviderMutation

Mutation returns the SmsProviderMutation object of the builder.

func (*SmsProviderCreate) QueryContext

func (c *SmsProviderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderCreate) Save

func (spc *SmsProviderCreate) Save(ctx context.Context) (*SmsProvider, error)

Save creates the SmsProvider in the database.

func (*SmsProviderCreate) SaveX

func (spc *SmsProviderCreate) SaveX(ctx context.Context) *SmsProvider

SaveX calls Save and panics if Save returns an error.

func (*SmsProviderCreate) SetCreatedAt

func (spc *SmsProviderCreate) SetCreatedAt(t time.Time) *SmsProviderCreate

SetCreatedAt sets the "created_at" field.

func (*SmsProviderCreate) SetID

SetID sets the "id" field.

func (*SmsProviderCreate) SetIsDefault

func (spc *SmsProviderCreate) SetIsDefault(b bool) *SmsProviderCreate

SetIsDefault sets the "is_default" field.

func (*SmsProviderCreate) SetName

func (spc *SmsProviderCreate) SetName(s string) *SmsProviderCreate

SetName sets the "name" field.

func (*SmsProviderCreate) SetNillableCreatedAt

func (spc *SmsProviderCreate) SetNillableCreatedAt(t *time.Time) *SmsProviderCreate

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

func (*SmsProviderCreate) SetNillableIsDefault

func (spc *SmsProviderCreate) SetNillableIsDefault(b *bool) *SmsProviderCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*SmsProviderCreate) SetNillableUpdatedAt

func (spc *SmsProviderCreate) SetNillableUpdatedAt(t *time.Time) *SmsProviderCreate

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

func (*SmsProviderCreate) SetNotNilIsDefault

func (sp *SmsProviderCreate) SetNotNilIsDefault(value *bool) *SmsProviderCreate

set field if value's pointer is not nil.

func (*SmsProviderCreate) SetNotNilName

func (sp *SmsProviderCreate) SetNotNilName(value *string) *SmsProviderCreate

set field if value's pointer is not nil.

func (*SmsProviderCreate) SetNotNilRegion

func (sp *SmsProviderCreate) SetNotNilRegion(value *string) *SmsProviderCreate

set field if value's pointer is not nil.

func (*SmsProviderCreate) SetNotNilSecretID

func (sp *SmsProviderCreate) SetNotNilSecretID(value *string) *SmsProviderCreate

set field if value's pointer is not nil.

func (*SmsProviderCreate) SetNotNilSecretKey

func (sp *SmsProviderCreate) SetNotNilSecretKey(value *string) *SmsProviderCreate

set field if value's pointer is not nil.

func (*SmsProviderCreate) SetNotNilUpdatedAt

func (sp *SmsProviderCreate) SetNotNilUpdatedAt(value *time.Time) *SmsProviderCreate

set field if value's pointer is not nil.

func (*SmsProviderCreate) SetRegion

func (spc *SmsProviderCreate) SetRegion(s string) *SmsProviderCreate

SetRegion sets the "region" field.

func (*SmsProviderCreate) SetSecretID

func (spc *SmsProviderCreate) SetSecretID(s string) *SmsProviderCreate

SetSecretID sets the "secret_id" field.

func (*SmsProviderCreate) SetSecretKey

func (spc *SmsProviderCreate) SetSecretKey(s string) *SmsProviderCreate

SetSecretKey sets the "secret_key" field.

func (*SmsProviderCreate) SetUpdatedAt

func (spc *SmsProviderCreate) SetUpdatedAt(t time.Time) *SmsProviderCreate

SetUpdatedAt sets the "updated_at" field.

type SmsProviderCreateBulk

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

SmsProviderCreateBulk is the builder for creating many SmsProvider entities in bulk.

func (*SmsProviderCreateBulk) Exec

func (spcb *SmsProviderCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SmsProviderCreateBulk) ExecContext

func (c *SmsProviderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderCreateBulk) ExecX

func (spcb *SmsProviderCreateBulk) ExecX(ctx context.Context)

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

func (*SmsProviderCreateBulk) QueryContext

func (c *SmsProviderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderCreateBulk) Save

func (spcb *SmsProviderCreateBulk) Save(ctx context.Context) ([]*SmsProvider, error)

Save creates the SmsProvider entities in the database.

func (*SmsProviderCreateBulk) SaveX

func (spcb *SmsProviderCreateBulk) SaveX(ctx context.Context) []*SmsProvider

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

type SmsProviderDelete

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

SmsProviderDelete is the builder for deleting a SmsProvider entity.

func (*SmsProviderDelete) Exec

func (spd *SmsProviderDelete) Exec(ctx context.Context) (int, error)

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

func (*SmsProviderDelete) ExecContext

func (c *SmsProviderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderDelete) ExecX

func (spd *SmsProviderDelete) ExecX(ctx context.Context) int

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

func (*SmsProviderDelete) QueryContext

func (c *SmsProviderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderDelete) Where

Where appends a list predicates to the SmsProviderDelete builder.

type SmsProviderDeleteOne

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

SmsProviderDeleteOne is the builder for deleting a single SmsProvider entity.

func (*SmsProviderDeleteOne) Exec

func (spdo *SmsProviderDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SmsProviderDeleteOne) ExecX

func (spdo *SmsProviderDeleteOne) ExecX(ctx context.Context)

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

func (*SmsProviderDeleteOne) Where

Where appends a list predicates to the SmsProviderDelete builder.

type SmsProviderGroupBy

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

SmsProviderGroupBy is the group-by builder for SmsProvider entities.

func (*SmsProviderGroupBy) Aggregate

func (spgb *SmsProviderGroupBy) Aggregate(fns ...AggregateFunc) *SmsProviderGroupBy

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

func (*SmsProviderGroupBy) Bool

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

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

func (*SmsProviderGroupBy) BoolX

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

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

func (*SmsProviderGroupBy) Bools

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

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

func (*SmsProviderGroupBy) BoolsX

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

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

func (*SmsProviderGroupBy) Float64

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

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

func (*SmsProviderGroupBy) Float64X

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

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

func (*SmsProviderGroupBy) Float64s

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

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

func (*SmsProviderGroupBy) Float64sX

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

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

func (*SmsProviderGroupBy) Int

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

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

func (*SmsProviderGroupBy) IntX

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

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

func (*SmsProviderGroupBy) Ints

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

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

func (*SmsProviderGroupBy) IntsX

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

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

func (*SmsProviderGroupBy) Scan

func (spgb *SmsProviderGroupBy) Scan(ctx context.Context, v any) error

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

func (*SmsProviderGroupBy) ScanX

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

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

func (*SmsProviderGroupBy) String

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

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

func (*SmsProviderGroupBy) StringX

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

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

func (*SmsProviderGroupBy) Strings

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

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

func (*SmsProviderGroupBy) StringsX

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

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

type SmsProviderMutation

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

SmsProviderMutation represents an operation that mutates the SmsProvider nodes in the graph.

func (*SmsProviderMutation) AddField

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

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

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

func (*SmsProviderMutation) AddedField

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

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

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

func (*SmsProviderMutation) AddedIDs

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

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

func (*SmsProviderMutation) ClearEdge

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

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

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

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

func (*SmsProviderMutation) ClearedFields

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

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

func (SmsProviderMutation) Client

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

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

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

func (*SmsProviderMutation) EdgeCleared

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

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

func (*SmsProviderMutation) ExecContext

func (c *SmsProviderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderMutation) Field

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

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

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

func (*SmsProviderMutation) Fields

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

func (m *SmsProviderMutation) ID() (id uint64, 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 (*SmsProviderMutation) IDs

func (m *SmsProviderMutation) IDs(ctx context.Context) ([]uint64, 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 (*SmsProviderMutation) IsDefault

func (m *SmsProviderMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*SmsProviderMutation) Name

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

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

func (*SmsProviderMutation) OldCreatedAt

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

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

func (*SmsProviderMutation) OldField

func (m *SmsProviderMutation) 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 (*SmsProviderMutation) OldIsDefault

func (m *SmsProviderMutation) OldIsDefault(ctx context.Context) (v bool, err error)

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

func (*SmsProviderMutation) OldName

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

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

func (*SmsProviderMutation) OldRegion

func (m *SmsProviderMutation) OldRegion(ctx context.Context) (v string, err error)

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

func (*SmsProviderMutation) OldSecretID

func (m *SmsProviderMutation) OldSecretID(ctx context.Context) (v string, err error)

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

func (*SmsProviderMutation) OldSecretKey

func (m *SmsProviderMutation) OldSecretKey(ctx context.Context) (v string, err error)

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

func (*SmsProviderMutation) OldUpdatedAt

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

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

func (*SmsProviderMutation) Op

func (m *SmsProviderMutation) Op() Op

Op returns the operation name.

func (*SmsProviderMutation) QueryContext

func (c *SmsProviderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderMutation) Region

func (m *SmsProviderMutation) Region() (r string, exists bool)

Region returns the value of the "region" field in the mutation.

func (*SmsProviderMutation) RemovedEdges

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

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

func (*SmsProviderMutation) RemovedIDs

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

func (m *SmsProviderMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SmsProviderMutation) ResetEdge

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

func (m *SmsProviderMutation) 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 (*SmsProviderMutation) ResetIsDefault

func (m *SmsProviderMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*SmsProviderMutation) ResetName

func (m *SmsProviderMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SmsProviderMutation) ResetRegion

func (m *SmsProviderMutation) ResetRegion()

ResetRegion resets all changes to the "region" field.

func (*SmsProviderMutation) ResetSecretID

func (m *SmsProviderMutation) ResetSecretID()

ResetSecretID resets all changes to the "secret_id" field.

func (*SmsProviderMutation) ResetSecretKey

func (m *SmsProviderMutation) ResetSecretKey()

ResetSecretKey resets all changes to the "secret_key" field.

func (*SmsProviderMutation) ResetUpdatedAt

func (m *SmsProviderMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SmsProviderMutation) SecretID

func (m *SmsProviderMutation) SecretID() (r string, exists bool)

SecretID returns the value of the "secret_id" field in the mutation.

func (*SmsProviderMutation) SecretKey

func (m *SmsProviderMutation) SecretKey() (r string, exists bool)

SecretKey returns the value of the "secret_key" field in the mutation.

func (*SmsProviderMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SmsProviderMutation) SetField

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

func (m *SmsProviderMutation) SetID(id uint64)

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

func (*SmsProviderMutation) SetIsDefault

func (m *SmsProviderMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*SmsProviderMutation) SetName

func (m *SmsProviderMutation) SetName(s string)

SetName sets the "name" field.

func (*SmsProviderMutation) SetOp

func (m *SmsProviderMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SmsProviderMutation) SetRegion

func (m *SmsProviderMutation) SetRegion(s string)

SetRegion sets the "region" field.

func (*SmsProviderMutation) SetSecretID

func (m *SmsProviderMutation) SetSecretID(s string)

SetSecretID sets the "secret_id" field.

func (*SmsProviderMutation) SetSecretKey

func (m *SmsProviderMutation) SetSecretKey(s string)

SetSecretKey sets the "secret_key" field.

func (*SmsProviderMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (SmsProviderMutation) Tx

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

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

func (*SmsProviderMutation) Type

func (m *SmsProviderMutation) Type() string

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

func (*SmsProviderMutation) UpdatedAt

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

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

func (*SmsProviderMutation) Where

func (m *SmsProviderMutation) Where(ps ...predicate.SmsProvider)

Where appends a list predicates to the SmsProviderMutation builder.

func (*SmsProviderMutation) WhereP

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

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

type SmsProviderPageList

type SmsProviderPageList struct {
	List        []*SmsProvider `json:"list"`
	PageDetails *PageDetails   `json:"pageDetails"`
}

SmsProviderPageList is SmsProvider PageList result.

type SmsProviderPager

type SmsProviderPager struct {
	Order  smsprovider.OrderOption
	Filter func(*SmsProviderQuery) (*SmsProviderQuery, error)
}

func (*SmsProviderPager) ApplyFilter

func (p *SmsProviderPager) ApplyFilter(query *SmsProviderQuery) (*SmsProviderQuery, error)

type SmsProviderPaginateOption

type SmsProviderPaginateOption func(*SmsProviderPager)

SmsProviderPaginateOption enables pagination customization.

type SmsProviderQuery

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

SmsProviderQuery is the builder for querying SmsProvider entities.

func (*SmsProviderQuery) Aggregate

func (spq *SmsProviderQuery) Aggregate(fns ...AggregateFunc) *SmsProviderSelect

Aggregate returns a SmsProviderSelect configured with the given aggregations.

func (*SmsProviderQuery) All

func (spq *SmsProviderQuery) All(ctx context.Context) ([]*SmsProvider, error)

All executes the query and returns a list of SmsProviders.

func (*SmsProviderQuery) AllX

func (spq *SmsProviderQuery) AllX(ctx context.Context) []*SmsProvider

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

func (*SmsProviderQuery) Clone

func (spq *SmsProviderQuery) Clone() *SmsProviderQuery

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

func (*SmsProviderQuery) Count

func (spq *SmsProviderQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SmsProviderQuery) CountX

func (spq *SmsProviderQuery) CountX(ctx context.Context) int

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

func (*SmsProviderQuery) ExecContext

func (c *SmsProviderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderQuery) Exist

func (spq *SmsProviderQuery) Exist(ctx context.Context) (bool, error)

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

func (*SmsProviderQuery) ExistX

func (spq *SmsProviderQuery) ExistX(ctx context.Context) bool

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

func (*SmsProviderQuery) First

func (spq *SmsProviderQuery) First(ctx context.Context) (*SmsProvider, error)

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

func (*SmsProviderQuery) FirstID

func (spq *SmsProviderQuery) FirstID(ctx context.Context) (id uint64, err error)

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

func (*SmsProviderQuery) FirstIDX

func (spq *SmsProviderQuery) FirstIDX(ctx context.Context) uint64

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

func (*SmsProviderQuery) FirstX

func (spq *SmsProviderQuery) FirstX(ctx context.Context) *SmsProvider

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

func (*SmsProviderQuery) GroupBy

func (spq *SmsProviderQuery) GroupBy(field string, fields ...string) *SmsProviderGroupBy

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

func (*SmsProviderQuery) IDs

func (spq *SmsProviderQuery) IDs(ctx context.Context) (ids []uint64, err error)

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

func (*SmsProviderQuery) IDsX

func (spq *SmsProviderQuery) IDsX(ctx context.Context) []uint64

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

func (*SmsProviderQuery) Limit

func (spq *SmsProviderQuery) Limit(limit int) *SmsProviderQuery

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

func (*SmsProviderQuery) Offset

func (spq *SmsProviderQuery) Offset(offset int) *SmsProviderQuery

Offset to start from.

func (*SmsProviderQuery) Only

func (spq *SmsProviderQuery) Only(ctx context.Context) (*SmsProvider, error)

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

func (*SmsProviderQuery) OnlyID

func (spq *SmsProviderQuery) OnlyID(ctx context.Context) (id uint64, err error)

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

func (*SmsProviderQuery) OnlyIDX

func (spq *SmsProviderQuery) OnlyIDX(ctx context.Context) uint64

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

func (*SmsProviderQuery) OnlyX

func (spq *SmsProviderQuery) OnlyX(ctx context.Context) *SmsProvider

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

func (*SmsProviderQuery) Order

Order specifies how the records should be ordered.

func (*SmsProviderQuery) Page

func (sp *SmsProviderQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...SmsProviderPaginateOption,
) (*SmsProviderPageList, error)

func (*SmsProviderQuery) QueryContext

func (c *SmsProviderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderQuery) Select

func (spq *SmsProviderQuery) Select(fields ...string) *SmsProviderSelect

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

func (*SmsProviderQuery) Unique

func (spq *SmsProviderQuery) Unique(unique bool) *SmsProviderQuery

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

Where adds a new predicate for the SmsProviderQuery builder.

type SmsProviderSelect

type SmsProviderSelect struct {
	*SmsProviderQuery
	// contains filtered or unexported fields
}

SmsProviderSelect is the builder for selecting fields of SmsProvider entities.

func (*SmsProviderSelect) Aggregate

func (sps *SmsProviderSelect) Aggregate(fns ...AggregateFunc) *SmsProviderSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SmsProviderSelect) Bool

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

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

func (*SmsProviderSelect) BoolX

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

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

func (*SmsProviderSelect) Bools

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

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

func (*SmsProviderSelect) BoolsX

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

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

func (SmsProviderSelect) ExecContext

func (c SmsProviderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderSelect) Float64

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

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

func (*SmsProviderSelect) Float64X

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

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

func (*SmsProviderSelect) Float64s

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

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

func (*SmsProviderSelect) Float64sX

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

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

func (*SmsProviderSelect) Int

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

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

func (*SmsProviderSelect) IntX

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

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

func (*SmsProviderSelect) Ints

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

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

func (*SmsProviderSelect) IntsX

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

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

func (SmsProviderSelect) QueryContext

func (c SmsProviderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderSelect) Scan

func (sps *SmsProviderSelect) Scan(ctx context.Context, v any) error

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

func (*SmsProviderSelect) ScanX

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

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

func (*SmsProviderSelect) String

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

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

func (*SmsProviderSelect) StringX

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

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

func (*SmsProviderSelect) Strings

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

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

func (*SmsProviderSelect) StringsX

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

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

type SmsProviderUpdate

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

SmsProviderUpdate is the builder for updating SmsProvider entities.

func (*SmsProviderUpdate) Exec

func (spu *SmsProviderUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SmsProviderUpdate) ExecContext

func (c *SmsProviderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderUpdate) ExecX

func (spu *SmsProviderUpdate) ExecX(ctx context.Context)

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

func (*SmsProviderUpdate) Mutation

func (spu *SmsProviderUpdate) Mutation() *SmsProviderMutation

Mutation returns the SmsProviderMutation object of the builder.

func (*SmsProviderUpdate) QueryContext

func (c *SmsProviderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderUpdate) Save

func (spu *SmsProviderUpdate) Save(ctx context.Context) (int, error)

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

func (*SmsProviderUpdate) SaveX

func (spu *SmsProviderUpdate) SaveX(ctx context.Context) int

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

func (*SmsProviderUpdate) SetIsDefault

func (spu *SmsProviderUpdate) SetIsDefault(b bool) *SmsProviderUpdate

SetIsDefault sets the "is_default" field.

func (*SmsProviderUpdate) SetName

func (spu *SmsProviderUpdate) SetName(s string) *SmsProviderUpdate

SetName sets the "name" field.

func (*SmsProviderUpdate) SetNillableIsDefault

func (spu *SmsProviderUpdate) SetNillableIsDefault(b *bool) *SmsProviderUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*SmsProviderUpdate) SetNillableName

func (spu *SmsProviderUpdate) SetNillableName(s *string) *SmsProviderUpdate

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

func (*SmsProviderUpdate) SetNillableRegion

func (spu *SmsProviderUpdate) SetNillableRegion(s *string) *SmsProviderUpdate

SetNillableRegion sets the "region" field if the given value is not nil.

func (*SmsProviderUpdate) SetNillableSecretID

func (spu *SmsProviderUpdate) SetNillableSecretID(s *string) *SmsProviderUpdate

SetNillableSecretID sets the "secret_id" field if the given value is not nil.

func (*SmsProviderUpdate) SetNillableSecretKey

func (spu *SmsProviderUpdate) SetNillableSecretKey(s *string) *SmsProviderUpdate

SetNillableSecretKey sets the "secret_key" field if the given value is not nil.

func (*SmsProviderUpdate) SetNotNilIsDefault

func (sp *SmsProviderUpdate) SetNotNilIsDefault(value *bool) *SmsProviderUpdate

set field if value's pointer is not nil.

func (*SmsProviderUpdate) SetNotNilName

func (sp *SmsProviderUpdate) SetNotNilName(value *string) *SmsProviderUpdate

set field if value's pointer is not nil.

func (*SmsProviderUpdate) SetNotNilRegion

func (sp *SmsProviderUpdate) SetNotNilRegion(value *string) *SmsProviderUpdate

set field if value's pointer is not nil.

func (*SmsProviderUpdate) SetNotNilSecretID

func (sp *SmsProviderUpdate) SetNotNilSecretID(value *string) *SmsProviderUpdate

set field if value's pointer is not nil.

func (*SmsProviderUpdate) SetNotNilSecretKey

func (sp *SmsProviderUpdate) SetNotNilSecretKey(value *string) *SmsProviderUpdate

set field if value's pointer is not nil.

func (*SmsProviderUpdate) SetNotNilUpdatedAt

func (sp *SmsProviderUpdate) SetNotNilUpdatedAt(value *time.Time) *SmsProviderUpdate

set field if value's pointer is not nil.

func (*SmsProviderUpdate) SetRegion

func (spu *SmsProviderUpdate) SetRegion(s string) *SmsProviderUpdate

SetRegion sets the "region" field.

func (*SmsProviderUpdate) SetSecretID

func (spu *SmsProviderUpdate) SetSecretID(s string) *SmsProviderUpdate

SetSecretID sets the "secret_id" field.

func (*SmsProviderUpdate) SetSecretKey

func (spu *SmsProviderUpdate) SetSecretKey(s string) *SmsProviderUpdate

SetSecretKey sets the "secret_key" field.

func (*SmsProviderUpdate) SetUpdatedAt

func (spu *SmsProviderUpdate) SetUpdatedAt(t time.Time) *SmsProviderUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SmsProviderUpdate) Where

Where appends a list predicates to the SmsProviderUpdate builder.

type SmsProviderUpdateOne

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

SmsProviderUpdateOne is the builder for updating a single SmsProvider entity.

func (*SmsProviderUpdateOne) Exec

func (spuo *SmsProviderUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SmsProviderUpdateOne) ExecContext

func (c *SmsProviderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SmsProviderUpdateOne) ExecX

func (spuo *SmsProviderUpdateOne) ExecX(ctx context.Context)

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

func (*SmsProviderUpdateOne) Mutation

func (spuo *SmsProviderUpdateOne) Mutation() *SmsProviderMutation

Mutation returns the SmsProviderMutation object of the builder.

func (*SmsProviderUpdateOne) QueryContext

func (c *SmsProviderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SmsProviderUpdateOne) Save

Save executes the query and returns the updated SmsProvider entity.

func (*SmsProviderUpdateOne) SaveX

func (spuo *SmsProviderUpdateOne) SaveX(ctx context.Context) *SmsProvider

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

func (*SmsProviderUpdateOne) Select

func (spuo *SmsProviderUpdateOne) Select(field string, fields ...string) *SmsProviderUpdateOne

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

func (*SmsProviderUpdateOne) SetIsDefault

func (spuo *SmsProviderUpdateOne) SetIsDefault(b bool) *SmsProviderUpdateOne

SetIsDefault sets the "is_default" field.

func (*SmsProviderUpdateOne) SetName

SetName sets the "name" field.

func (*SmsProviderUpdateOne) SetNillableIsDefault

func (spuo *SmsProviderUpdateOne) SetNillableIsDefault(b *bool) *SmsProviderUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*SmsProviderUpdateOne) SetNillableName

func (spuo *SmsProviderUpdateOne) SetNillableName(s *string) *SmsProviderUpdateOne

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

func (*SmsProviderUpdateOne) SetNillableRegion

func (spuo *SmsProviderUpdateOne) SetNillableRegion(s *string) *SmsProviderUpdateOne

SetNillableRegion sets the "region" field if the given value is not nil.

func (*SmsProviderUpdateOne) SetNillableSecretID

func (spuo *SmsProviderUpdateOne) SetNillableSecretID(s *string) *SmsProviderUpdateOne

SetNillableSecretID sets the "secret_id" field if the given value is not nil.

func (*SmsProviderUpdateOne) SetNillableSecretKey

func (spuo *SmsProviderUpdateOne) SetNillableSecretKey(s *string) *SmsProviderUpdateOne

SetNillableSecretKey sets the "secret_key" field if the given value is not nil.

func (*SmsProviderUpdateOne) SetNotNilIsDefault

func (sp *SmsProviderUpdateOne) SetNotNilIsDefault(value *bool) *SmsProviderUpdateOne

set field if value's pointer is not nil.

func (*SmsProviderUpdateOne) SetNotNilName

func (sp *SmsProviderUpdateOne) SetNotNilName(value *string) *SmsProviderUpdateOne

set field if value's pointer is not nil.

func (*SmsProviderUpdateOne) SetNotNilRegion

func (sp *SmsProviderUpdateOne) SetNotNilRegion(value *string) *SmsProviderUpdateOne

set field if value's pointer is not nil.

func (*SmsProviderUpdateOne) SetNotNilSecretID

func (sp *SmsProviderUpdateOne) SetNotNilSecretID(value *string) *SmsProviderUpdateOne

set field if value's pointer is not nil.

func (*SmsProviderUpdateOne) SetNotNilSecretKey

func (sp *SmsProviderUpdateOne) SetNotNilSecretKey(value *string) *SmsProviderUpdateOne

set field if value's pointer is not nil.

func (*SmsProviderUpdateOne) SetNotNilUpdatedAt

func (sp *SmsProviderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SmsProviderUpdateOne

set field if value's pointer is not nil.

func (*SmsProviderUpdateOne) SetRegion

func (spuo *SmsProviderUpdateOne) SetRegion(s string) *SmsProviderUpdateOne

SetRegion sets the "region" field.

func (*SmsProviderUpdateOne) SetSecretID

func (spuo *SmsProviderUpdateOne) SetSecretID(s string) *SmsProviderUpdateOne

SetSecretID sets the "secret_id" field.

func (*SmsProviderUpdateOne) SetSecretKey

func (spuo *SmsProviderUpdateOne) SetSecretKey(s string) *SmsProviderUpdateOne

SetSecretKey sets the "secret_key" field.

func (*SmsProviderUpdateOne) SetUpdatedAt

func (spuo *SmsProviderUpdateOne) SetUpdatedAt(t time.Time) *SmsProviderUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SmsProviderUpdateOne) Where

Where appends a list predicates to the SmsProviderUpdate builder.

type SmsProviders

type SmsProviders []*SmsProvider

SmsProviders is a parsable slice of SmsProvider.

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 {

	// EmailLog is the client for interacting with the EmailLog builders.
	EmailLog *EmailLogClient
	// EmailProvider is the client for interacting with the EmailProvider builders.
	EmailProvider *EmailProviderClient
	// SmsLog is the client for interacting with the SmsLog builders.
	SmsLog *SmsLogClient
	// SmsProvider is the client for interacting with the SmsProvider builders.
	SmsProvider *SmsProviderClient
	// 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) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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