ent

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: GPL-3.0 Imports: 26 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.
	TypeChannel  = "Channel"
	TypeLive     = "Live"
	TypePlayback = "Playback"
	TypePlaylist = "Playlist"
	TypeQueue    = "Queue"
	TypeUser     = "User"
	TypeVod      = "Vod"
)

Variables

This section is empty.

Functions

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 Channel

type Channel struct {

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

Channel is the model entity for the Channel schema.

func (*Channel) QueryLive

func (c *Channel) QueryLive() *LiveQuery

QueryLive queries the "live" edge of the Channel entity.

func (*Channel) QueryVods

func (c *Channel) QueryVods() *VodQuery

QueryVods queries the "vods" edge of the Channel entity.

func (*Channel) String

func (c *Channel) String() string

String implements the fmt.Stringer.

func (*Channel) Unwrap

func (c *Channel) Unwrap() *Channel

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

func (c *Channel) Update() *ChannelUpdateOne

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

type ChannelClient

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

ChannelClient is a client for the Channel schema.

func NewChannelClient

func NewChannelClient(c config) *ChannelClient

NewChannelClient returns a client for the Channel from the given config.

func (*ChannelClient) Create

func (c *ChannelClient) Create() *ChannelCreate

Create returns a builder for creating a Channel entity.

func (*ChannelClient) CreateBulk

func (c *ChannelClient) CreateBulk(builders ...*ChannelCreate) *ChannelCreateBulk

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

func (*ChannelClient) Delete

func (c *ChannelClient) Delete() *ChannelDelete

Delete returns a delete builder for Channel.

func (*ChannelClient) DeleteOne

func (c *ChannelClient) DeleteOne(ch *Channel) *ChannelDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ChannelClient) DeleteOneID

func (c *ChannelClient) DeleteOneID(id uuid.UUID) *ChannelDeleteOne

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

func (*ChannelClient) Get

func (c *ChannelClient) Get(ctx context.Context, id uuid.UUID) (*Channel, error)

Get returns a Channel entity by its id.

func (*ChannelClient) GetX

func (c *ChannelClient) GetX(ctx context.Context, id uuid.UUID) *Channel

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

func (*ChannelClient) Hooks

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

Hooks returns the client hooks.

func (*ChannelClient) Query

func (c *ChannelClient) Query() *ChannelQuery

Query returns a query builder for Channel.

func (*ChannelClient) QueryLive

func (c *ChannelClient) QueryLive(ch *Channel) *LiveQuery

QueryLive queries the live edge of a Channel.

func (*ChannelClient) QueryVods

func (c *ChannelClient) QueryVods(ch *Channel) *VodQuery

QueryVods queries the vods edge of a Channel.

func (*ChannelClient) Update

func (c *ChannelClient) Update() *ChannelUpdate

Update returns an update builder for Channel.

func (*ChannelClient) UpdateOne

func (c *ChannelClient) UpdateOne(ch *Channel) *ChannelUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ChannelClient) UpdateOneID

func (c *ChannelClient) UpdateOneID(id uuid.UUID) *ChannelUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ChannelClient) Use

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

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

type ChannelCreate

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

ChannelCreate is the builder for creating a Channel entity.

func (*ChannelCreate) AddLive

func (cc *ChannelCreate) AddLive(l ...*Live) *ChannelCreate

AddLive adds the "live" edges to the Live entity.

func (*ChannelCreate) AddLiveIDs

func (cc *ChannelCreate) AddLiveIDs(ids ...uuid.UUID) *ChannelCreate

AddLiveIDs adds the "live" edge to the Live entity by IDs.

func (*ChannelCreate) AddVodIDs

func (cc *ChannelCreate) AddVodIDs(ids ...uuid.UUID) *ChannelCreate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*ChannelCreate) AddVods

func (cc *ChannelCreate) AddVods(v ...*Vod) *ChannelCreate

AddVods adds the "vods" edges to the Vod entity.

func (*ChannelCreate) Exec

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

Exec executes the query.

func (*ChannelCreate) ExecX

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

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

func (*ChannelCreate) Mutation

func (cc *ChannelCreate) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelCreate) Save

func (cc *ChannelCreate) Save(ctx context.Context) (*Channel, error)

Save creates the Channel in the database.

func (*ChannelCreate) SaveX

func (cc *ChannelCreate) SaveX(ctx context.Context) *Channel

SaveX calls Save and panics if Save returns an error.

func (*ChannelCreate) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ChannelCreate) SetDisplayName

func (cc *ChannelCreate) SetDisplayName(s string) *ChannelCreate

SetDisplayName sets the "display_name" field.

func (*ChannelCreate) SetExtID added in v1.1.0

func (cc *ChannelCreate) SetExtID(s string) *ChannelCreate

SetExtID sets the "ext_id" field.

func (*ChannelCreate) SetID

func (cc *ChannelCreate) SetID(u uuid.UUID) *ChannelCreate

SetID sets the "id" field.

func (*ChannelCreate) SetImagePath

func (cc *ChannelCreate) SetImagePath(s string) *ChannelCreate

SetImagePath sets the "image_path" field.

func (*ChannelCreate) SetName

func (cc *ChannelCreate) SetName(s string) *ChannelCreate

SetName sets the "name" field.

func (*ChannelCreate) SetNillableCreatedAt

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

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

func (*ChannelCreate) SetNillableExtID added in v1.1.0

func (cc *ChannelCreate) SetNillableExtID(s *string) *ChannelCreate

SetNillableExtID sets the "ext_id" field if the given value is not nil.

func (*ChannelCreate) SetNillableID

func (cc *ChannelCreate) SetNillableID(u *uuid.UUID) *ChannelCreate

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

func (*ChannelCreate) SetNillableUpdatedAt

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

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

func (*ChannelCreate) SetUpdatedAt

func (cc *ChannelCreate) SetUpdatedAt(t time.Time) *ChannelCreate

SetUpdatedAt sets the "updated_at" field.

type ChannelCreateBulk

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

ChannelCreateBulk is the builder for creating many Channel entities in bulk.

func (*ChannelCreateBulk) Exec

func (ccb *ChannelCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ChannelCreateBulk) ExecX

func (ccb *ChannelCreateBulk) ExecX(ctx context.Context)

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

func (*ChannelCreateBulk) Save

func (ccb *ChannelCreateBulk) Save(ctx context.Context) ([]*Channel, error)

Save creates the Channel entities in the database.

func (*ChannelCreateBulk) SaveX

func (ccb *ChannelCreateBulk) SaveX(ctx context.Context) []*Channel

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

type ChannelDelete

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

ChannelDelete is the builder for deleting a Channel entity.

func (*ChannelDelete) Exec

func (cd *ChannelDelete) Exec(ctx context.Context) (int, error)

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

func (*ChannelDelete) ExecX

func (cd *ChannelDelete) ExecX(ctx context.Context) int

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

func (*ChannelDelete) Where

func (cd *ChannelDelete) Where(ps ...predicate.Channel) *ChannelDelete

Where appends a list predicates to the ChannelDelete builder.

type ChannelDeleteOne

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

ChannelDeleteOne is the builder for deleting a single Channel entity.

func (*ChannelDeleteOne) Exec

func (cdo *ChannelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ChannelDeleteOne) ExecX

func (cdo *ChannelDeleteOne) ExecX(ctx context.Context)

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

type ChannelEdges

type ChannelEdges struct {
	// Vods holds the value of the vods edge.
	Vods []*Vod `json:"vods,omitempty"`
	// Live holds the value of the live edge.
	Live []*Live `json:"live,omitempty"`
	// contains filtered or unexported fields
}

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

func (ChannelEdges) LiveOrErr

func (e ChannelEdges) LiveOrErr() ([]*Live, error)

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

func (ChannelEdges) VodsOrErr

func (e ChannelEdges) VodsOrErr() ([]*Vod, error)

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

type ChannelGroupBy

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

ChannelGroupBy is the group-by builder for Channel entities.

func (*ChannelGroupBy) Aggregate

func (cgb *ChannelGroupBy) Aggregate(fns ...AggregateFunc) *ChannelGroupBy

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

func (*ChannelGroupBy) Bool

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

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

func (*ChannelGroupBy) BoolX

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

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

func (*ChannelGroupBy) Bools

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

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

func (*ChannelGroupBy) BoolsX

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

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

func (*ChannelGroupBy) Float64

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

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

func (*ChannelGroupBy) Float64X

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

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

func (*ChannelGroupBy) Float64s

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

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

func (*ChannelGroupBy) Float64sX

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

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

func (*ChannelGroupBy) Int

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

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

func (*ChannelGroupBy) IntX

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

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

func (*ChannelGroupBy) Ints

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

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

func (*ChannelGroupBy) IntsX

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

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

func (*ChannelGroupBy) Scan

func (cgb *ChannelGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ChannelGroupBy) ScanX

func (s *ChannelGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ChannelGroupBy) String

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

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

func (*ChannelGroupBy) StringX

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

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

func (*ChannelGroupBy) Strings

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

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

func (*ChannelGroupBy) StringsX

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

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

type ChannelMutation

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

ChannelMutation represents an operation that mutates the Channel nodes in the graph.

func (*ChannelMutation) AddField

func (m *ChannelMutation) 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 (*ChannelMutation) AddLiveIDs

func (m *ChannelMutation) AddLiveIDs(ids ...uuid.UUID)

AddLiveIDs adds the "live" edge to the Live entity by ids.

func (*ChannelMutation) AddVodIDs

func (m *ChannelMutation) AddVodIDs(ids ...uuid.UUID)

AddVodIDs adds the "vods" edge to the Vod entity by ids.

func (*ChannelMutation) AddedEdges

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

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

func (*ChannelMutation) AddedField

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

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

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

func (*ChannelMutation) AddedIDs

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

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

func (*ChannelMutation) ClearEdge

func (m *ChannelMutation) 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 (*ChannelMutation) ClearExtID added in v1.1.0

func (m *ChannelMutation) ClearExtID()

ClearExtID clears the value of the "ext_id" field.

func (*ChannelMutation) ClearField

func (m *ChannelMutation) 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 (*ChannelMutation) ClearLive

func (m *ChannelMutation) ClearLive()

ClearLive clears the "live" edge to the Live entity.

func (*ChannelMutation) ClearVods

func (m *ChannelMutation) ClearVods()

ClearVods clears the "vods" edge to the Vod entity.

func (*ChannelMutation) ClearedEdges

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

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

func (*ChannelMutation) ClearedFields

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

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

func (ChannelMutation) Client

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

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

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

func (*ChannelMutation) DisplayName

func (m *ChannelMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*ChannelMutation) EdgeCleared

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

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

func (*ChannelMutation) ExtID added in v1.1.0

func (m *ChannelMutation) ExtID() (r string, exists bool)

ExtID returns the value of the "ext_id" field in the mutation.

func (*ChannelMutation) ExtIDCleared added in v1.1.0

func (m *ChannelMutation) ExtIDCleared() bool

ExtIDCleared returns if the "ext_id" field was cleared in this mutation.

func (*ChannelMutation) Field

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

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

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

func (*ChannelMutation) Fields

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

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

func (m *ChannelMutation) 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 (*ChannelMutation) ImagePath

func (m *ChannelMutation) ImagePath() (r string, exists bool)

ImagePath returns the value of the "image_path" field in the mutation.

func (*ChannelMutation) LiveCleared

func (m *ChannelMutation) LiveCleared() bool

LiveCleared reports if the "live" edge to the Live entity was cleared.

func (*ChannelMutation) LiveIDs

func (m *ChannelMutation) LiveIDs() (ids []uuid.UUID)

LiveIDs returns the "live" edge IDs in the mutation.

func (*ChannelMutation) Name

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

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

func (*ChannelMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Channel entity. If the Channel 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 (*ChannelMutation) OldDisplayName

func (m *ChannelMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the Channel entity. If the Channel 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 (*ChannelMutation) OldExtID added in v1.1.0

func (m *ChannelMutation) OldExtID(ctx context.Context) (v string, err error)

OldExtID returns the old "ext_id" field's value of the Channel entity. If the Channel 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 (*ChannelMutation) OldField

func (m *ChannelMutation) 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 (*ChannelMutation) OldImagePath

func (m *ChannelMutation) OldImagePath(ctx context.Context) (v string, err error)

OldImagePath returns the old "image_path" field's value of the Channel entity. If the Channel 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 (*ChannelMutation) OldName

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

OldName returns the old "name" field's value of the Channel entity. If the Channel 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 (*ChannelMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Channel entity. If the Channel 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 (*ChannelMutation) Op

func (m *ChannelMutation) Op() Op

Op returns the operation name.

func (*ChannelMutation) RemoveLiveIDs

func (m *ChannelMutation) RemoveLiveIDs(ids ...uuid.UUID)

RemoveLiveIDs removes the "live" edge to the Live entity by IDs.

func (*ChannelMutation) RemoveVodIDs

func (m *ChannelMutation) RemoveVodIDs(ids ...uuid.UUID)

RemoveVodIDs removes the "vods" edge to the Vod entity by IDs.

func (*ChannelMutation) RemovedEdges

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

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

func (*ChannelMutation) RemovedIDs

func (m *ChannelMutation) 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 (*ChannelMutation) RemovedLiveIDs

func (m *ChannelMutation) RemovedLiveIDs() (ids []uuid.UUID)

RemovedLive returns the removed IDs of the "live" edge to the Live entity.

func (*ChannelMutation) RemovedVodsIDs

func (m *ChannelMutation) RemovedVodsIDs() (ids []uuid.UUID)

RemovedVods returns the removed IDs of the "vods" edge to the Vod entity.

func (*ChannelMutation) ResetCreatedAt

func (m *ChannelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ChannelMutation) ResetDisplayName

func (m *ChannelMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*ChannelMutation) ResetEdge

func (m *ChannelMutation) 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 (*ChannelMutation) ResetExtID added in v1.1.0

func (m *ChannelMutation) ResetExtID()

ResetExtID resets all changes to the "ext_id" field.

func (*ChannelMutation) ResetField

func (m *ChannelMutation) 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 (*ChannelMutation) ResetImagePath

func (m *ChannelMutation) ResetImagePath()

ResetImagePath resets all changes to the "image_path" field.

func (*ChannelMutation) ResetLive

func (m *ChannelMutation) ResetLive()

ResetLive resets all changes to the "live" edge.

func (*ChannelMutation) ResetName

func (m *ChannelMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ChannelMutation) ResetUpdatedAt

func (m *ChannelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ChannelMutation) ResetVods

func (m *ChannelMutation) ResetVods()

ResetVods resets all changes to the "vods" edge.

func (*ChannelMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ChannelMutation) SetDisplayName

func (m *ChannelMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*ChannelMutation) SetExtID added in v1.1.0

func (m *ChannelMutation) SetExtID(s string)

SetExtID sets the "ext_id" field.

func (*ChannelMutation) SetField

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

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

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

func (*ChannelMutation) SetImagePath

func (m *ChannelMutation) SetImagePath(s string)

SetImagePath sets the "image_path" field.

func (*ChannelMutation) SetName

func (m *ChannelMutation) SetName(s string)

SetName sets the "name" field.

func (*ChannelMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (ChannelMutation) Tx

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

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

func (*ChannelMutation) Type

func (m *ChannelMutation) Type() string

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

func (*ChannelMutation) UpdatedAt

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

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

func (*ChannelMutation) VodsCleared

func (m *ChannelMutation) VodsCleared() bool

VodsCleared reports if the "vods" edge to the Vod entity was cleared.

func (*ChannelMutation) VodsIDs

func (m *ChannelMutation) VodsIDs() (ids []uuid.UUID)

VodsIDs returns the "vods" edge IDs in the mutation.

func (*ChannelMutation) Where

func (m *ChannelMutation) Where(ps ...predicate.Channel)

Where appends a list predicates to the ChannelMutation builder.

type ChannelQuery

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

ChannelQuery is the builder for querying Channel entities.

func (*ChannelQuery) All

func (cq *ChannelQuery) All(ctx context.Context) ([]*Channel, error)

All executes the query and returns a list of Channels.

func (*ChannelQuery) AllX

func (cq *ChannelQuery) AllX(ctx context.Context) []*Channel

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

func (*ChannelQuery) Clone

func (cq *ChannelQuery) Clone() *ChannelQuery

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

func (*ChannelQuery) Count

func (cq *ChannelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ChannelQuery) CountX

func (cq *ChannelQuery) CountX(ctx context.Context) int

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

func (*ChannelQuery) Exist

func (cq *ChannelQuery) Exist(ctx context.Context) (bool, error)

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

func (*ChannelQuery) ExistX

func (cq *ChannelQuery) ExistX(ctx context.Context) bool

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

func (*ChannelQuery) First

func (cq *ChannelQuery) First(ctx context.Context) (*Channel, error)

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

func (*ChannelQuery) FirstID

func (cq *ChannelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ChannelQuery) FirstIDX

func (cq *ChannelQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*ChannelQuery) FirstX

func (cq *ChannelQuery) FirstX(ctx context.Context) *Channel

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

func (*ChannelQuery) GroupBy

func (cq *ChannelQuery) GroupBy(field string, fields ...string) *ChannelGroupBy

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

client.Channel.Query().
	GroupBy(channel.FieldExtID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ChannelQuery) IDs

func (cq *ChannelQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*ChannelQuery) IDsX

func (cq *ChannelQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*ChannelQuery) Limit

func (cq *ChannelQuery) Limit(limit int) *ChannelQuery

Limit adds a limit step to the query.

func (*ChannelQuery) Offset

func (cq *ChannelQuery) Offset(offset int) *ChannelQuery

Offset adds an offset step to the query.

func (*ChannelQuery) Only

func (cq *ChannelQuery) Only(ctx context.Context) (*Channel, error)

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

func (*ChannelQuery) OnlyID

func (cq *ChannelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ChannelQuery) OnlyIDX

func (cq *ChannelQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*ChannelQuery) OnlyX

func (cq *ChannelQuery) OnlyX(ctx context.Context) *Channel

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

func (*ChannelQuery) Order

func (cq *ChannelQuery) Order(o ...OrderFunc) *ChannelQuery

Order adds an order step to the query.

func (*ChannelQuery) QueryLive

func (cq *ChannelQuery) QueryLive() *LiveQuery

QueryLive chains the current query on the "live" edge.

func (*ChannelQuery) QueryVods

func (cq *ChannelQuery) QueryVods() *VodQuery

QueryVods chains the current query on the "vods" edge.

func (*ChannelQuery) Select

func (cq *ChannelQuery) Select(fields ...string) *ChannelSelect

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

client.Channel.Query().
	Select(channel.FieldExtID).
	Scan(ctx, &v)

func (*ChannelQuery) Unique

func (cq *ChannelQuery) Unique(unique bool) *ChannelQuery

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

func (cq *ChannelQuery) Where(ps ...predicate.Channel) *ChannelQuery

Where adds a new predicate for the ChannelQuery builder.

func (*ChannelQuery) WithLive

func (cq *ChannelQuery) WithLive(opts ...func(*LiveQuery)) *ChannelQuery

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

func (*ChannelQuery) WithVods

func (cq *ChannelQuery) WithVods(opts ...func(*VodQuery)) *ChannelQuery

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

type ChannelSelect

type ChannelSelect struct {
	*ChannelQuery
	// contains filtered or unexported fields
}

ChannelSelect is the builder for selecting fields of Channel entities.

func (*ChannelSelect) Bool

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

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

func (*ChannelSelect) BoolX

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

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

func (*ChannelSelect) Bools

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

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

func (*ChannelSelect) BoolsX

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

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

func (*ChannelSelect) Float64

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

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

func (*ChannelSelect) Float64X

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

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

func (*ChannelSelect) Float64s

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

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

func (*ChannelSelect) Float64sX

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

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

func (*ChannelSelect) Int

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

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

func (*ChannelSelect) IntX

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

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

func (*ChannelSelect) Ints

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

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

func (*ChannelSelect) IntsX

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

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

func (*ChannelSelect) Scan

func (cs *ChannelSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ChannelSelect) ScanX

func (s *ChannelSelect) ScanX(ctx context.Context, v interface{})

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

func (*ChannelSelect) String

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

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

func (*ChannelSelect) StringX

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

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

func (*ChannelSelect) Strings

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

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

func (*ChannelSelect) StringsX

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

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

type ChannelUpdate

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

ChannelUpdate is the builder for updating Channel entities.

func (*ChannelUpdate) AddLive

func (cu *ChannelUpdate) AddLive(l ...*Live) *ChannelUpdate

AddLive adds the "live" edges to the Live entity.

func (*ChannelUpdate) AddLiveIDs

func (cu *ChannelUpdate) AddLiveIDs(ids ...uuid.UUID) *ChannelUpdate

AddLiveIDs adds the "live" edge to the Live entity by IDs.

func (*ChannelUpdate) AddVodIDs

func (cu *ChannelUpdate) AddVodIDs(ids ...uuid.UUID) *ChannelUpdate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*ChannelUpdate) AddVods

func (cu *ChannelUpdate) AddVods(v ...*Vod) *ChannelUpdate

AddVods adds the "vods" edges to the Vod entity.

func (*ChannelUpdate) ClearExtID added in v1.1.0

func (cu *ChannelUpdate) ClearExtID() *ChannelUpdate

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpdate) ClearLive

func (cu *ChannelUpdate) ClearLive() *ChannelUpdate

ClearLive clears all "live" edges to the Live entity.

func (*ChannelUpdate) ClearVods

func (cu *ChannelUpdate) ClearVods() *ChannelUpdate

ClearVods clears all "vods" edges to the Vod entity.

func (*ChannelUpdate) Exec

func (cu *ChannelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChannelUpdate) ExecX

func (cu *ChannelUpdate) ExecX(ctx context.Context)

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

func (*ChannelUpdate) Mutation

func (cu *ChannelUpdate) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelUpdate) RemoveLive

func (cu *ChannelUpdate) RemoveLive(l ...*Live) *ChannelUpdate

RemoveLive removes "live" edges to Live entities.

func (*ChannelUpdate) RemoveLiveIDs

func (cu *ChannelUpdate) RemoveLiveIDs(ids ...uuid.UUID) *ChannelUpdate

RemoveLiveIDs removes the "live" edge to Live entities by IDs.

func (*ChannelUpdate) RemoveVodIDs

func (cu *ChannelUpdate) RemoveVodIDs(ids ...uuid.UUID) *ChannelUpdate

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*ChannelUpdate) RemoveVods

func (cu *ChannelUpdate) RemoveVods(v ...*Vod) *ChannelUpdate

RemoveVods removes "vods" edges to Vod entities.

func (*ChannelUpdate) Save

func (cu *ChannelUpdate) Save(ctx context.Context) (int, error)

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

func (*ChannelUpdate) SaveX

func (cu *ChannelUpdate) SaveX(ctx context.Context) int

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

func (*ChannelUpdate) SetDisplayName

func (cu *ChannelUpdate) SetDisplayName(s string) *ChannelUpdate

SetDisplayName sets the "display_name" field.

func (*ChannelUpdate) SetExtID added in v1.1.0

func (cu *ChannelUpdate) SetExtID(s string) *ChannelUpdate

SetExtID sets the "ext_id" field.

func (*ChannelUpdate) SetImagePath

func (cu *ChannelUpdate) SetImagePath(s string) *ChannelUpdate

SetImagePath sets the "image_path" field.

func (*ChannelUpdate) SetName

func (cu *ChannelUpdate) SetName(s string) *ChannelUpdate

SetName sets the "name" field.

func (*ChannelUpdate) SetNillableExtID added in v1.1.0

func (cu *ChannelUpdate) SetNillableExtID(s *string) *ChannelUpdate

SetNillableExtID sets the "ext_id" field if the given value is not nil.

func (*ChannelUpdate) SetUpdatedAt

func (cu *ChannelUpdate) SetUpdatedAt(t time.Time) *ChannelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpdate) Where

func (cu *ChannelUpdate) Where(ps ...predicate.Channel) *ChannelUpdate

Where appends a list predicates to the ChannelUpdate builder.

type ChannelUpdateOne

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

ChannelUpdateOne is the builder for updating a single Channel entity.

func (*ChannelUpdateOne) AddLive

func (cuo *ChannelUpdateOne) AddLive(l ...*Live) *ChannelUpdateOne

AddLive adds the "live" edges to the Live entity.

func (*ChannelUpdateOne) AddLiveIDs

func (cuo *ChannelUpdateOne) AddLiveIDs(ids ...uuid.UUID) *ChannelUpdateOne

AddLiveIDs adds the "live" edge to the Live entity by IDs.

func (*ChannelUpdateOne) AddVodIDs

func (cuo *ChannelUpdateOne) AddVodIDs(ids ...uuid.UUID) *ChannelUpdateOne

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*ChannelUpdateOne) AddVods

func (cuo *ChannelUpdateOne) AddVods(v ...*Vod) *ChannelUpdateOne

AddVods adds the "vods" edges to the Vod entity.

func (*ChannelUpdateOne) ClearExtID added in v1.1.0

func (cuo *ChannelUpdateOne) ClearExtID() *ChannelUpdateOne

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpdateOne) ClearLive

func (cuo *ChannelUpdateOne) ClearLive() *ChannelUpdateOne

ClearLive clears all "live" edges to the Live entity.

func (*ChannelUpdateOne) ClearVods

func (cuo *ChannelUpdateOne) ClearVods() *ChannelUpdateOne

ClearVods clears all "vods" edges to the Vod entity.

func (*ChannelUpdateOne) Exec

func (cuo *ChannelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ChannelUpdateOne) ExecX

func (cuo *ChannelUpdateOne) ExecX(ctx context.Context)

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

func (*ChannelUpdateOne) Mutation

func (cuo *ChannelUpdateOne) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelUpdateOne) RemoveLive

func (cuo *ChannelUpdateOne) RemoveLive(l ...*Live) *ChannelUpdateOne

RemoveLive removes "live" edges to Live entities.

func (*ChannelUpdateOne) RemoveLiveIDs

func (cuo *ChannelUpdateOne) RemoveLiveIDs(ids ...uuid.UUID) *ChannelUpdateOne

RemoveLiveIDs removes the "live" edge to Live entities by IDs.

func (*ChannelUpdateOne) RemoveVodIDs

func (cuo *ChannelUpdateOne) RemoveVodIDs(ids ...uuid.UUID) *ChannelUpdateOne

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*ChannelUpdateOne) RemoveVods

func (cuo *ChannelUpdateOne) RemoveVods(v ...*Vod) *ChannelUpdateOne

RemoveVods removes "vods" edges to Vod entities.

func (*ChannelUpdateOne) Save

func (cuo *ChannelUpdateOne) Save(ctx context.Context) (*Channel, error)

Save executes the query and returns the updated Channel entity.

func (*ChannelUpdateOne) SaveX

func (cuo *ChannelUpdateOne) SaveX(ctx context.Context) *Channel

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

func (*ChannelUpdateOne) Select

func (cuo *ChannelUpdateOne) Select(field string, fields ...string) *ChannelUpdateOne

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

func (*ChannelUpdateOne) SetDisplayName

func (cuo *ChannelUpdateOne) SetDisplayName(s string) *ChannelUpdateOne

SetDisplayName sets the "display_name" field.

func (*ChannelUpdateOne) SetExtID added in v1.1.0

func (cuo *ChannelUpdateOne) SetExtID(s string) *ChannelUpdateOne

SetExtID sets the "ext_id" field.

func (*ChannelUpdateOne) SetImagePath

func (cuo *ChannelUpdateOne) SetImagePath(s string) *ChannelUpdateOne

SetImagePath sets the "image_path" field.

func (*ChannelUpdateOne) SetName

func (cuo *ChannelUpdateOne) SetName(s string) *ChannelUpdateOne

SetName sets the "name" field.

func (*ChannelUpdateOne) SetNillableExtID added in v1.1.0

func (cuo *ChannelUpdateOne) SetNillableExtID(s *string) *ChannelUpdateOne

SetNillableExtID sets the "ext_id" field if the given value is not nil.

func (*ChannelUpdateOne) SetUpdatedAt

func (cuo *ChannelUpdateOne) SetUpdatedAt(t time.Time) *ChannelUpdateOne

SetUpdatedAt sets the "updated_at" field.

type Channels

type Channels []*Channel

Channels is a parsable slice of Channel.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Channel is the client for interacting with the Channel builders.
	Channel *ChannelClient
	// Live is the client for interacting with the Live builders.
	Live *LiveClient
	// Playback is the client for interacting with the Playback builders.
	Playback *PlaybackClient
	// Playlist is the client for interacting with the Playlist builders.
	Playlist *PlaylistClient
	// Queue is the client for interacting with the Queue builders.
	Queue *QueueClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// Vod is the client for interacting with the Vod builders.
	Vod *VodClient
	// 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().
	Channel.
	Query().
	Count(ctx)

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

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

type Live

type Live struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Watch live streams
	WatchLive bool `json:"watch_live,omitempty"`
	// Watch new VODs
	WatchVod bool `json:"watch_vod,omitempty"`
	// Download archives
	DownloadArchives bool `json:"download_archives,omitempty"`
	// Download highlights
	DownloadHighlights bool `json:"download_highlights,omitempty"`
	// Download uploads
	DownloadUploads bool `json:"download_uploads,omitempty"`
	// Whether the channel is currently live.
	IsLive bool `json:"is_live,omitempty"`
	// Whether the chat archive is enabled.
	ArchiveChat bool `json:"archive_chat,omitempty"`
	// Resolution holds the value of the "resolution" field.
	Resolution string `json:"resolution,omitempty"`
	// The time the channel last went live.
	LastLive time.Time `json:"last_live,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LiveQuery when eager-loading is set.
	Edges LiveEdges `json:"edges"`
	// contains filtered or unexported fields
}

Live is the model entity for the Live schema.

func (*Live) QueryChannel

func (l *Live) QueryChannel() *ChannelQuery

QueryChannel queries the "channel" edge of the Live entity.

func (*Live) String

func (l *Live) String() string

String implements the fmt.Stringer.

func (*Live) Unwrap

func (l *Live) Unwrap() *Live

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

func (l *Live) Update() *LiveUpdateOne

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

type LiveClient

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

LiveClient is a client for the Live schema.

func NewLiveClient

func NewLiveClient(c config) *LiveClient

NewLiveClient returns a client for the Live from the given config.

func (*LiveClient) Create

func (c *LiveClient) Create() *LiveCreate

Create returns a builder for creating a Live entity.

func (*LiveClient) CreateBulk

func (c *LiveClient) CreateBulk(builders ...*LiveCreate) *LiveCreateBulk

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

func (*LiveClient) Delete

func (c *LiveClient) Delete() *LiveDelete

Delete returns a delete builder for Live.

func (*LiveClient) DeleteOne

func (c *LiveClient) DeleteOne(l *Live) *LiveDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LiveClient) DeleteOneID

func (c *LiveClient) DeleteOneID(id uuid.UUID) *LiveDeleteOne

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

func (*LiveClient) Get

func (c *LiveClient) Get(ctx context.Context, id uuid.UUID) (*Live, error)

Get returns a Live entity by its id.

func (*LiveClient) GetX

func (c *LiveClient) GetX(ctx context.Context, id uuid.UUID) *Live

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

func (*LiveClient) Hooks

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

Hooks returns the client hooks.

func (*LiveClient) Query

func (c *LiveClient) Query() *LiveQuery

Query returns a query builder for Live.

func (*LiveClient) QueryChannel

func (c *LiveClient) QueryChannel(l *Live) *ChannelQuery

QueryChannel queries the channel edge of a Live.

func (*LiveClient) Update

func (c *LiveClient) Update() *LiveUpdate

Update returns an update builder for Live.

func (*LiveClient) UpdateOne

func (c *LiveClient) UpdateOne(l *Live) *LiveUpdateOne

UpdateOne returns an update builder for the given entity.

func (*LiveClient) UpdateOneID

func (c *LiveClient) UpdateOneID(id uuid.UUID) *LiveUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LiveClient) Use

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

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

type LiveCreate

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

LiveCreate is the builder for creating a Live entity.

func (*LiveCreate) Exec

func (lc *LiveCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCreate) ExecX

func (lc *LiveCreate) ExecX(ctx context.Context)

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

func (*LiveCreate) Mutation

func (lc *LiveCreate) Mutation() *LiveMutation

Mutation returns the LiveMutation object of the builder.

func (*LiveCreate) Save

func (lc *LiveCreate) Save(ctx context.Context) (*Live, error)

Save creates the Live in the database.

func (*LiveCreate) SaveX

func (lc *LiveCreate) SaveX(ctx context.Context) *Live

SaveX calls Save and panics if Save returns an error.

func (*LiveCreate) SetArchiveChat

func (lc *LiveCreate) SetArchiveChat(b bool) *LiveCreate

SetArchiveChat sets the "archive_chat" field.

func (*LiveCreate) SetChannel

func (lc *LiveCreate) SetChannel(c *Channel) *LiveCreate

SetChannel sets the "channel" edge to the Channel entity.

func (*LiveCreate) SetChannelID

func (lc *LiveCreate) SetChannelID(id uuid.UUID) *LiveCreate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*LiveCreate) SetCreatedAt

func (lc *LiveCreate) SetCreatedAt(t time.Time) *LiveCreate

SetCreatedAt sets the "created_at" field.

func (*LiveCreate) SetDownloadArchives added in v1.1.0

func (lc *LiveCreate) SetDownloadArchives(b bool) *LiveCreate

SetDownloadArchives sets the "download_archives" field.

func (*LiveCreate) SetDownloadHighlights added in v1.1.0

func (lc *LiveCreate) SetDownloadHighlights(b bool) *LiveCreate

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveCreate) SetDownloadUploads added in v1.1.0

func (lc *LiveCreate) SetDownloadUploads(b bool) *LiveCreate

SetDownloadUploads sets the "download_uploads" field.

func (*LiveCreate) SetID

func (lc *LiveCreate) SetID(u uuid.UUID) *LiveCreate

SetID sets the "id" field.

func (*LiveCreate) SetIsLive

func (lc *LiveCreate) SetIsLive(b bool) *LiveCreate

SetIsLive sets the "is_live" field.

func (*LiveCreate) SetLastLive

func (lc *LiveCreate) SetLastLive(t time.Time) *LiveCreate

SetLastLive sets the "last_live" field.

func (*LiveCreate) SetNillableArchiveChat

func (lc *LiveCreate) SetNillableArchiveChat(b *bool) *LiveCreate

SetNillableArchiveChat sets the "archive_chat" field if the given value is not nil.

func (*LiveCreate) SetNillableCreatedAt

func (lc *LiveCreate) SetNillableCreatedAt(t *time.Time) *LiveCreate

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

func (*LiveCreate) SetNillableDownloadArchives added in v1.1.0

func (lc *LiveCreate) SetNillableDownloadArchives(b *bool) *LiveCreate

SetNillableDownloadArchives sets the "download_archives" field if the given value is not nil.

func (*LiveCreate) SetNillableDownloadHighlights added in v1.1.0

func (lc *LiveCreate) SetNillableDownloadHighlights(b *bool) *LiveCreate

SetNillableDownloadHighlights sets the "download_highlights" field if the given value is not nil.

func (*LiveCreate) SetNillableDownloadUploads added in v1.1.0

func (lc *LiveCreate) SetNillableDownloadUploads(b *bool) *LiveCreate

SetNillableDownloadUploads sets the "download_uploads" field if the given value is not nil.

func (*LiveCreate) SetNillableID

func (lc *LiveCreate) SetNillableID(u *uuid.UUID) *LiveCreate

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

func (*LiveCreate) SetNillableIsLive

func (lc *LiveCreate) SetNillableIsLive(b *bool) *LiveCreate

SetNillableIsLive sets the "is_live" field if the given value is not nil.

func (*LiveCreate) SetNillableLastLive

func (lc *LiveCreate) SetNillableLastLive(t *time.Time) *LiveCreate

SetNillableLastLive sets the "last_live" field if the given value is not nil.

func (*LiveCreate) SetNillableResolution

func (lc *LiveCreate) SetNillableResolution(s *string) *LiveCreate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*LiveCreate) SetNillableUpdatedAt

func (lc *LiveCreate) SetNillableUpdatedAt(t *time.Time) *LiveCreate

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

func (*LiveCreate) SetNillableWatchLive added in v1.1.0

func (lc *LiveCreate) SetNillableWatchLive(b *bool) *LiveCreate

SetNillableWatchLive sets the "watch_live" field if the given value is not nil.

func (*LiveCreate) SetNillableWatchVod added in v1.1.0

func (lc *LiveCreate) SetNillableWatchVod(b *bool) *LiveCreate

SetNillableWatchVod sets the "watch_vod" field if the given value is not nil.

func (*LiveCreate) SetResolution

func (lc *LiveCreate) SetResolution(s string) *LiveCreate

SetResolution sets the "resolution" field.

func (*LiveCreate) SetUpdatedAt

func (lc *LiveCreate) SetUpdatedAt(t time.Time) *LiveCreate

SetUpdatedAt sets the "updated_at" field.

func (*LiveCreate) SetWatchLive added in v1.1.0

func (lc *LiveCreate) SetWatchLive(b bool) *LiveCreate

SetWatchLive sets the "watch_live" field.

func (*LiveCreate) SetWatchVod added in v1.1.0

func (lc *LiveCreate) SetWatchVod(b bool) *LiveCreate

SetWatchVod sets the "watch_vod" field.

type LiveCreateBulk

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

LiveCreateBulk is the builder for creating many Live entities in bulk.

func (*LiveCreateBulk) Exec

func (lcb *LiveCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCreateBulk) ExecX

func (lcb *LiveCreateBulk) ExecX(ctx context.Context)

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

func (*LiveCreateBulk) Save

func (lcb *LiveCreateBulk) Save(ctx context.Context) ([]*Live, error)

Save creates the Live entities in the database.

func (*LiveCreateBulk) SaveX

func (lcb *LiveCreateBulk) SaveX(ctx context.Context) []*Live

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

type LiveDelete

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

LiveDelete is the builder for deleting a Live entity.

func (*LiveDelete) Exec

func (ld *LiveDelete) Exec(ctx context.Context) (int, error)

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

func (*LiveDelete) ExecX

func (ld *LiveDelete) ExecX(ctx context.Context) int

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

func (*LiveDelete) Where

func (ld *LiveDelete) Where(ps ...predicate.Live) *LiveDelete

Where appends a list predicates to the LiveDelete builder.

type LiveDeleteOne

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

LiveDeleteOne is the builder for deleting a single Live entity.

func (*LiveDeleteOne) Exec

func (ldo *LiveDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LiveDeleteOne) ExecX

func (ldo *LiveDeleteOne) ExecX(ctx context.Context)

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

type LiveEdges

type LiveEdges struct {
	// Channel holds the value of the channel edge.
	Channel *Channel `json:"channel,omitempty"`
	// contains filtered or unexported fields
}

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

func (LiveEdges) ChannelOrErr

func (e LiveEdges) ChannelOrErr() (*Channel, error)

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

type LiveGroupBy

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

LiveGroupBy is the group-by builder for Live entities.

func (*LiveGroupBy) Aggregate

func (lgb *LiveGroupBy) Aggregate(fns ...AggregateFunc) *LiveGroupBy

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

func (*LiveGroupBy) Bool

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

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

func (*LiveGroupBy) BoolX

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

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

func (*LiveGroupBy) Bools

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

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

func (*LiveGroupBy) BoolsX

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

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

func (*LiveGroupBy) Float64

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

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

func (*LiveGroupBy) Float64X

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

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

func (*LiveGroupBy) Float64s

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

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

func (*LiveGroupBy) Float64sX

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

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

func (*LiveGroupBy) Int

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

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

func (*LiveGroupBy) IntX

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

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

func (*LiveGroupBy) Ints

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

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

func (*LiveGroupBy) IntsX

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

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

func (*LiveGroupBy) Scan

func (lgb *LiveGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*LiveGroupBy) ScanX

func (s *LiveGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*LiveGroupBy) String

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

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

func (*LiveGroupBy) StringX

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

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

func (*LiveGroupBy) Strings

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

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

func (*LiveGroupBy) StringsX

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

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

type LiveMutation

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

LiveMutation represents an operation that mutates the Live nodes in the graph.

func (*LiveMutation) AddField

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

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

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

func (*LiveMutation) AddedField

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

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

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

func (*LiveMutation) AddedIDs

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

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

func (*LiveMutation) ArchiveChat

func (m *LiveMutation) ArchiveChat() (r bool, exists bool)

ArchiveChat returns the value of the "archive_chat" field in the mutation.

func (*LiveMutation) ChannelCleared

func (m *LiveMutation) ChannelCleared() bool

ChannelCleared reports if the "channel" edge to the Channel entity was cleared.

func (*LiveMutation) ChannelID

func (m *LiveMutation) ChannelID() (id uuid.UUID, exists bool)

ChannelID returns the "channel" edge ID in the mutation.

func (*LiveMutation) ChannelIDs

func (m *LiveMutation) ChannelIDs() (ids []uuid.UUID)

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

func (*LiveMutation) ClearChannel

func (m *LiveMutation) ClearChannel()

ClearChannel clears the "channel" edge to the Channel entity.

func (*LiveMutation) ClearEdge

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

func (m *LiveMutation) 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 (*LiveMutation) ClearResolution

func (m *LiveMutation) ClearResolution()

ClearResolution clears the value of the "resolution" field.

func (*LiveMutation) ClearedEdges

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

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

func (*LiveMutation) ClearedFields

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

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

func (LiveMutation) Client

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

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

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

func (*LiveMutation) DownloadArchives added in v1.1.0

func (m *LiveMutation) DownloadArchives() (r bool, exists bool)

DownloadArchives returns the value of the "download_archives" field in the mutation.

func (*LiveMutation) DownloadHighlights added in v1.1.0

func (m *LiveMutation) DownloadHighlights() (r bool, exists bool)

DownloadHighlights returns the value of the "download_highlights" field in the mutation.

func (*LiveMutation) DownloadUploads added in v1.1.0

func (m *LiveMutation) DownloadUploads() (r bool, exists bool)

DownloadUploads returns the value of the "download_uploads" field in the mutation.

func (*LiveMutation) EdgeCleared

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

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

func (*LiveMutation) Field

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

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

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

func (*LiveMutation) Fields

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

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

func (m *LiveMutation) 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 (*LiveMutation) IsLive

func (m *LiveMutation) IsLive() (r bool, exists bool)

IsLive returns the value of the "is_live" field in the mutation.

func (*LiveMutation) LastLive

func (m *LiveMutation) LastLive() (r time.Time, exists bool)

LastLive returns the value of the "last_live" field in the mutation.

func (*LiveMutation) OldArchiveChat

func (m *LiveMutation) OldArchiveChat(ctx context.Context) (v bool, err error)

OldArchiveChat returns the old "archive_chat" field's value of the Live entity. If the Live 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 (*LiveMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Live entity. If the Live 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 (*LiveMutation) OldDownloadArchives added in v1.1.0

func (m *LiveMutation) OldDownloadArchives(ctx context.Context) (v bool, err error)

OldDownloadArchives returns the old "download_archives" field's value of the Live entity. If the Live 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 (*LiveMutation) OldDownloadHighlights added in v1.1.0

func (m *LiveMutation) OldDownloadHighlights(ctx context.Context) (v bool, err error)

OldDownloadHighlights returns the old "download_highlights" field's value of the Live entity. If the Live 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 (*LiveMutation) OldDownloadUploads added in v1.1.0

func (m *LiveMutation) OldDownloadUploads(ctx context.Context) (v bool, err error)

OldDownloadUploads returns the old "download_uploads" field's value of the Live entity. If the Live 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 (*LiveMutation) OldField

func (m *LiveMutation) 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 (*LiveMutation) OldIsLive

func (m *LiveMutation) OldIsLive(ctx context.Context) (v bool, err error)

OldIsLive returns the old "is_live" field's value of the Live entity. If the Live 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 (*LiveMutation) OldLastLive

func (m *LiveMutation) OldLastLive(ctx context.Context) (v time.Time, err error)

OldLastLive returns the old "last_live" field's value of the Live entity. If the Live 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 (*LiveMutation) OldResolution

func (m *LiveMutation) OldResolution(ctx context.Context) (v string, err error)

OldResolution returns the old "resolution" field's value of the Live entity. If the Live 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 (*LiveMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Live entity. If the Live 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 (*LiveMutation) OldWatchLive added in v1.1.0

func (m *LiveMutation) OldWatchLive(ctx context.Context) (v bool, err error)

OldWatchLive returns the old "watch_live" field's value of the Live entity. If the Live 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 (*LiveMutation) OldWatchVod added in v1.1.0

func (m *LiveMutation) OldWatchVod(ctx context.Context) (v bool, err error)

OldWatchVod returns the old "watch_vod" field's value of the Live entity. If the Live 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 (*LiveMutation) Op

func (m *LiveMutation) Op() Op

Op returns the operation name.

func (*LiveMutation) RemovedEdges

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

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

func (*LiveMutation) RemovedIDs

func (m *LiveMutation) 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 (*LiveMutation) ResetArchiveChat

func (m *LiveMutation) ResetArchiveChat()

ResetArchiveChat resets all changes to the "archive_chat" field.

func (*LiveMutation) ResetChannel

func (m *LiveMutation) ResetChannel()

ResetChannel resets all changes to the "channel" edge.

func (*LiveMutation) ResetCreatedAt

func (m *LiveMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*LiveMutation) ResetDownloadArchives added in v1.1.0

func (m *LiveMutation) ResetDownloadArchives()

ResetDownloadArchives resets all changes to the "download_archives" field.

func (*LiveMutation) ResetDownloadHighlights added in v1.1.0

func (m *LiveMutation) ResetDownloadHighlights()

ResetDownloadHighlights resets all changes to the "download_highlights" field.

func (*LiveMutation) ResetDownloadUploads added in v1.1.0

func (m *LiveMutation) ResetDownloadUploads()

ResetDownloadUploads resets all changes to the "download_uploads" field.

func (*LiveMutation) ResetEdge

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

func (m *LiveMutation) 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 (*LiveMutation) ResetIsLive

func (m *LiveMutation) ResetIsLive()

ResetIsLive resets all changes to the "is_live" field.

func (*LiveMutation) ResetLastLive

func (m *LiveMutation) ResetLastLive()

ResetLastLive resets all changes to the "last_live" field.

func (*LiveMutation) ResetResolution

func (m *LiveMutation) ResetResolution()

ResetResolution resets all changes to the "resolution" field.

func (*LiveMutation) ResetUpdatedAt

func (m *LiveMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*LiveMutation) ResetWatchLive added in v1.1.0

func (m *LiveMutation) ResetWatchLive()

ResetWatchLive resets all changes to the "watch_live" field.

func (*LiveMutation) ResetWatchVod added in v1.1.0

func (m *LiveMutation) ResetWatchVod()

ResetWatchVod resets all changes to the "watch_vod" field.

func (*LiveMutation) Resolution

func (m *LiveMutation) Resolution() (r string, exists bool)

Resolution returns the value of the "resolution" field in the mutation.

func (*LiveMutation) ResolutionCleared

func (m *LiveMutation) ResolutionCleared() bool

ResolutionCleared returns if the "resolution" field was cleared in this mutation.

func (*LiveMutation) SetArchiveChat

func (m *LiveMutation) SetArchiveChat(b bool)

SetArchiveChat sets the "archive_chat" field.

func (*LiveMutation) SetChannelID

func (m *LiveMutation) SetChannelID(id uuid.UUID)

SetChannelID sets the "channel" edge to the Channel entity by id.

func (*LiveMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*LiveMutation) SetDownloadArchives added in v1.1.0

func (m *LiveMutation) SetDownloadArchives(b bool)

SetDownloadArchives sets the "download_archives" field.

func (*LiveMutation) SetDownloadHighlights added in v1.1.0

func (m *LiveMutation) SetDownloadHighlights(b bool)

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveMutation) SetDownloadUploads added in v1.1.0

func (m *LiveMutation) SetDownloadUploads(b bool)

SetDownloadUploads sets the "download_uploads" field.

func (*LiveMutation) SetField

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

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

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

func (*LiveMutation) SetIsLive

func (m *LiveMutation) SetIsLive(b bool)

SetIsLive sets the "is_live" field.

func (*LiveMutation) SetLastLive

func (m *LiveMutation) SetLastLive(t time.Time)

SetLastLive sets the "last_live" field.

func (*LiveMutation) SetResolution

func (m *LiveMutation) SetResolution(s string)

SetResolution sets the "resolution" field.

func (*LiveMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*LiveMutation) SetWatchLive added in v1.1.0

func (m *LiveMutation) SetWatchLive(b bool)

SetWatchLive sets the "watch_live" field.

func (*LiveMutation) SetWatchVod added in v1.1.0

func (m *LiveMutation) SetWatchVod(b bool)

SetWatchVod sets the "watch_vod" field.

func (LiveMutation) Tx

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

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

func (*LiveMutation) Type

func (m *LiveMutation) Type() string

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

func (*LiveMutation) UpdatedAt

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

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

func (*LiveMutation) WatchLive added in v1.1.0

func (m *LiveMutation) WatchLive() (r bool, exists bool)

WatchLive returns the value of the "watch_live" field in the mutation.

func (*LiveMutation) WatchVod added in v1.1.0

func (m *LiveMutation) WatchVod() (r bool, exists bool)

WatchVod returns the value of the "watch_vod" field in the mutation.

func (*LiveMutation) Where

func (m *LiveMutation) Where(ps ...predicate.Live)

Where appends a list predicates to the LiveMutation builder.

type LiveQuery

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

LiveQuery is the builder for querying Live entities.

func (*LiveQuery) All

func (lq *LiveQuery) All(ctx context.Context) ([]*Live, error)

All executes the query and returns a list of Lives.

func (*LiveQuery) AllX

func (lq *LiveQuery) AllX(ctx context.Context) []*Live

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

func (*LiveQuery) Clone

func (lq *LiveQuery) Clone() *LiveQuery

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

func (*LiveQuery) Count

func (lq *LiveQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LiveQuery) CountX

func (lq *LiveQuery) CountX(ctx context.Context) int

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

func (*LiveQuery) Exist

func (lq *LiveQuery) Exist(ctx context.Context) (bool, error)

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

func (*LiveQuery) ExistX

func (lq *LiveQuery) ExistX(ctx context.Context) bool

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

func (*LiveQuery) First

func (lq *LiveQuery) First(ctx context.Context) (*Live, error)

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

func (*LiveQuery) FirstID

func (lq *LiveQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*LiveQuery) FirstIDX

func (lq *LiveQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*LiveQuery) FirstX

func (lq *LiveQuery) FirstX(ctx context.Context) *Live

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

func (*LiveQuery) GroupBy

func (lq *LiveQuery) GroupBy(field string, fields ...string) *LiveGroupBy

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 {
	WatchLive bool `json:"watch_live,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Live.Query().
	GroupBy(live.FieldWatchLive).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LiveQuery) IDs

func (lq *LiveQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*LiveQuery) IDsX

func (lq *LiveQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*LiveQuery) Limit

func (lq *LiveQuery) Limit(limit int) *LiveQuery

Limit adds a limit step to the query.

func (*LiveQuery) Offset

func (lq *LiveQuery) Offset(offset int) *LiveQuery

Offset adds an offset step to the query.

func (*LiveQuery) Only

func (lq *LiveQuery) Only(ctx context.Context) (*Live, error)

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

func (*LiveQuery) OnlyID

func (lq *LiveQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*LiveQuery) OnlyIDX

func (lq *LiveQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*LiveQuery) OnlyX

func (lq *LiveQuery) OnlyX(ctx context.Context) *Live

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

func (*LiveQuery) Order

func (lq *LiveQuery) Order(o ...OrderFunc) *LiveQuery

Order adds an order step to the query.

func (*LiveQuery) QueryChannel

func (lq *LiveQuery) QueryChannel() *ChannelQuery

QueryChannel chains the current query on the "channel" edge.

func (*LiveQuery) Select

func (lq *LiveQuery) Select(fields ...string) *LiveSelect

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 {
	WatchLive bool `json:"watch_live,omitempty"`
}

client.Live.Query().
	Select(live.FieldWatchLive).
	Scan(ctx, &v)

func (*LiveQuery) Unique

func (lq *LiveQuery) Unique(unique bool) *LiveQuery

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

func (lq *LiveQuery) Where(ps ...predicate.Live) *LiveQuery

Where adds a new predicate for the LiveQuery builder.

func (*LiveQuery) WithChannel

func (lq *LiveQuery) WithChannel(opts ...func(*ChannelQuery)) *LiveQuery

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

type LiveSelect

type LiveSelect struct {
	*LiveQuery
	// contains filtered or unexported fields
}

LiveSelect is the builder for selecting fields of Live entities.

func (*LiveSelect) Bool

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

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

func (*LiveSelect) BoolX

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

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

func (*LiveSelect) Bools

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

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

func (*LiveSelect) BoolsX

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

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

func (*LiveSelect) Float64

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

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

func (*LiveSelect) Float64X

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

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

func (*LiveSelect) Float64s

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

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

func (*LiveSelect) Float64sX

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

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

func (*LiveSelect) Int

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

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

func (*LiveSelect) IntX

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

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

func (*LiveSelect) Ints

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

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

func (*LiveSelect) IntsX

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

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

func (*LiveSelect) Scan

func (ls *LiveSelect) Scan(ctx context.Context, v interface{}) error

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

func (*LiveSelect) ScanX

func (s *LiveSelect) ScanX(ctx context.Context, v interface{})

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

func (*LiveSelect) String

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

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

func (*LiveSelect) StringX

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

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

func (*LiveSelect) Strings

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

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

func (*LiveSelect) StringsX

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

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

type LiveUpdate

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

LiveUpdate is the builder for updating Live entities.

func (*LiveUpdate) ClearChannel

func (lu *LiveUpdate) ClearChannel() *LiveUpdate

ClearChannel clears the "channel" edge to the Channel entity.

func (*LiveUpdate) ClearResolution

func (lu *LiveUpdate) ClearResolution() *LiveUpdate

ClearResolution clears the value of the "resolution" field.

func (*LiveUpdate) Exec

func (lu *LiveUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveUpdate) ExecX

func (lu *LiveUpdate) ExecX(ctx context.Context)

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

func (*LiveUpdate) Mutation

func (lu *LiveUpdate) Mutation() *LiveMutation

Mutation returns the LiveMutation object of the builder.

func (*LiveUpdate) Save

func (lu *LiveUpdate) Save(ctx context.Context) (int, error)

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

func (*LiveUpdate) SaveX

func (lu *LiveUpdate) SaveX(ctx context.Context) int

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

func (*LiveUpdate) SetArchiveChat

func (lu *LiveUpdate) SetArchiveChat(b bool) *LiveUpdate

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpdate) SetChannel

func (lu *LiveUpdate) SetChannel(c *Channel) *LiveUpdate

SetChannel sets the "channel" edge to the Channel entity.

func (*LiveUpdate) SetChannelID

func (lu *LiveUpdate) SetChannelID(id uuid.UUID) *LiveUpdate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*LiveUpdate) SetDownloadArchives added in v1.1.0

func (lu *LiveUpdate) SetDownloadArchives(b bool) *LiveUpdate

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpdate) SetDownloadHighlights added in v1.1.0

func (lu *LiveUpdate) SetDownloadHighlights(b bool) *LiveUpdate

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpdate) SetDownloadUploads added in v1.1.0

func (lu *LiveUpdate) SetDownloadUploads(b bool) *LiveUpdate

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpdate) SetIsLive

func (lu *LiveUpdate) SetIsLive(b bool) *LiveUpdate

SetIsLive sets the "is_live" field.

func (*LiveUpdate) SetLastLive

func (lu *LiveUpdate) SetLastLive(t time.Time) *LiveUpdate

SetLastLive sets the "last_live" field.

func (*LiveUpdate) SetNillableArchiveChat

func (lu *LiveUpdate) SetNillableArchiveChat(b *bool) *LiveUpdate

SetNillableArchiveChat sets the "archive_chat" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadArchives added in v1.1.0

func (lu *LiveUpdate) SetNillableDownloadArchives(b *bool) *LiveUpdate

SetNillableDownloadArchives sets the "download_archives" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadHighlights added in v1.1.0

func (lu *LiveUpdate) SetNillableDownloadHighlights(b *bool) *LiveUpdate

SetNillableDownloadHighlights sets the "download_highlights" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadUploads added in v1.1.0

func (lu *LiveUpdate) SetNillableDownloadUploads(b *bool) *LiveUpdate

SetNillableDownloadUploads sets the "download_uploads" field if the given value is not nil.

func (*LiveUpdate) SetNillableIsLive

func (lu *LiveUpdate) SetNillableIsLive(b *bool) *LiveUpdate

SetNillableIsLive sets the "is_live" field if the given value is not nil.

func (*LiveUpdate) SetNillableLastLive

func (lu *LiveUpdate) SetNillableLastLive(t *time.Time) *LiveUpdate

SetNillableLastLive sets the "last_live" field if the given value is not nil.

func (*LiveUpdate) SetNillableResolution

func (lu *LiveUpdate) SetNillableResolution(s *string) *LiveUpdate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*LiveUpdate) SetNillableWatchLive added in v1.1.0

func (lu *LiveUpdate) SetNillableWatchLive(b *bool) *LiveUpdate

SetNillableWatchLive sets the "watch_live" field if the given value is not nil.

func (*LiveUpdate) SetNillableWatchVod added in v1.1.0

func (lu *LiveUpdate) SetNillableWatchVod(b *bool) *LiveUpdate

SetNillableWatchVod sets the "watch_vod" field if the given value is not nil.

func (*LiveUpdate) SetResolution

func (lu *LiveUpdate) SetResolution(s string) *LiveUpdate

SetResolution sets the "resolution" field.

func (*LiveUpdate) SetUpdatedAt

func (lu *LiveUpdate) SetUpdatedAt(t time.Time) *LiveUpdate

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpdate) SetWatchLive added in v1.1.0

func (lu *LiveUpdate) SetWatchLive(b bool) *LiveUpdate

SetWatchLive sets the "watch_live" field.

func (*LiveUpdate) SetWatchVod added in v1.1.0

func (lu *LiveUpdate) SetWatchVod(b bool) *LiveUpdate

SetWatchVod sets the "watch_vod" field.

func (*LiveUpdate) Where

func (lu *LiveUpdate) Where(ps ...predicate.Live) *LiveUpdate

Where appends a list predicates to the LiveUpdate builder.

type LiveUpdateOne

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

LiveUpdateOne is the builder for updating a single Live entity.

func (*LiveUpdateOne) ClearChannel

func (luo *LiveUpdateOne) ClearChannel() *LiveUpdateOne

ClearChannel clears the "channel" edge to the Channel entity.

func (*LiveUpdateOne) ClearResolution

func (luo *LiveUpdateOne) ClearResolution() *LiveUpdateOne

ClearResolution clears the value of the "resolution" field.

func (*LiveUpdateOne) Exec

func (luo *LiveUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LiveUpdateOne) ExecX

func (luo *LiveUpdateOne) ExecX(ctx context.Context)

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

func (*LiveUpdateOne) Mutation

func (luo *LiveUpdateOne) Mutation() *LiveMutation

Mutation returns the LiveMutation object of the builder.

func (*LiveUpdateOne) Save

func (luo *LiveUpdateOne) Save(ctx context.Context) (*Live, error)

Save executes the query and returns the updated Live entity.

func (*LiveUpdateOne) SaveX

func (luo *LiveUpdateOne) SaveX(ctx context.Context) *Live

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

func (*LiveUpdateOne) Select

func (luo *LiveUpdateOne) Select(field string, fields ...string) *LiveUpdateOne

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

func (*LiveUpdateOne) SetArchiveChat

func (luo *LiveUpdateOne) SetArchiveChat(b bool) *LiveUpdateOne

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpdateOne) SetChannel

func (luo *LiveUpdateOne) SetChannel(c *Channel) *LiveUpdateOne

SetChannel sets the "channel" edge to the Channel entity.

func (*LiveUpdateOne) SetChannelID

func (luo *LiveUpdateOne) SetChannelID(id uuid.UUID) *LiveUpdateOne

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*LiveUpdateOne) SetDownloadArchives added in v1.1.0

func (luo *LiveUpdateOne) SetDownloadArchives(b bool) *LiveUpdateOne

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpdateOne) SetDownloadHighlights added in v1.1.0

func (luo *LiveUpdateOne) SetDownloadHighlights(b bool) *LiveUpdateOne

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpdateOne) SetDownloadUploads added in v1.1.0

func (luo *LiveUpdateOne) SetDownloadUploads(b bool) *LiveUpdateOne

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpdateOne) SetIsLive

func (luo *LiveUpdateOne) SetIsLive(b bool) *LiveUpdateOne

SetIsLive sets the "is_live" field.

func (*LiveUpdateOne) SetLastLive

func (luo *LiveUpdateOne) SetLastLive(t time.Time) *LiveUpdateOne

SetLastLive sets the "last_live" field.

func (*LiveUpdateOne) SetNillableArchiveChat

func (luo *LiveUpdateOne) SetNillableArchiveChat(b *bool) *LiveUpdateOne

SetNillableArchiveChat sets the "archive_chat" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadArchives added in v1.1.0

func (luo *LiveUpdateOne) SetNillableDownloadArchives(b *bool) *LiveUpdateOne

SetNillableDownloadArchives sets the "download_archives" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadHighlights added in v1.1.0

func (luo *LiveUpdateOne) SetNillableDownloadHighlights(b *bool) *LiveUpdateOne

SetNillableDownloadHighlights sets the "download_highlights" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadUploads added in v1.1.0

func (luo *LiveUpdateOne) SetNillableDownloadUploads(b *bool) *LiveUpdateOne

SetNillableDownloadUploads sets the "download_uploads" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableIsLive

func (luo *LiveUpdateOne) SetNillableIsLive(b *bool) *LiveUpdateOne

SetNillableIsLive sets the "is_live" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableLastLive

func (luo *LiveUpdateOne) SetNillableLastLive(t *time.Time) *LiveUpdateOne

SetNillableLastLive sets the "last_live" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableResolution

func (luo *LiveUpdateOne) SetNillableResolution(s *string) *LiveUpdateOne

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableWatchLive added in v1.1.0

func (luo *LiveUpdateOne) SetNillableWatchLive(b *bool) *LiveUpdateOne

SetNillableWatchLive sets the "watch_live" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableWatchVod added in v1.1.0

func (luo *LiveUpdateOne) SetNillableWatchVod(b *bool) *LiveUpdateOne

SetNillableWatchVod sets the "watch_vod" field if the given value is not nil.

func (*LiveUpdateOne) SetResolution

func (luo *LiveUpdateOne) SetResolution(s string) *LiveUpdateOne

SetResolution sets the "resolution" field.

func (*LiveUpdateOne) SetUpdatedAt

func (luo *LiveUpdateOne) SetUpdatedAt(t time.Time) *LiveUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpdateOne) SetWatchLive added in v1.1.0

func (luo *LiveUpdateOne) SetWatchLive(b bool) *LiveUpdateOne

SetWatchLive sets the "watch_live" field.

func (*LiveUpdateOne) SetWatchVod added in v1.1.0

func (luo *LiveUpdateOne) SetWatchVod(b bool) *LiveUpdateOne

SetWatchVod sets the "watch_vod" field.

type Lives

type Lives []*Live

Lives is a parsable slice of Live.

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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Playback added in v0.0.2

type Playback struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// VodID holds the value of the "vod_id" field.
	VodID uuid.UUID `json:"vod_id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// Time holds the value of the "time" field.
	Time int `json:"time,omitempty"`
	// Status holds the value of the "status" field.
	Status utils.PlaybackStatus `json:"status,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Playback is the model entity for the Playback schema.

func (*Playback) String added in v0.0.2

func (pl *Playback) String() string

String implements the fmt.Stringer.

func (*Playback) Unwrap added in v0.0.2

func (pl *Playback) Unwrap() *Playback

Unwrap unwraps the Playback 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 (*Playback) Update added in v0.0.2

func (pl *Playback) Update() *PlaybackUpdateOne

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

type PlaybackClient added in v0.0.2

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

PlaybackClient is a client for the Playback schema.

func NewPlaybackClient added in v0.0.2

func NewPlaybackClient(c config) *PlaybackClient

NewPlaybackClient returns a client for the Playback from the given config.

func (*PlaybackClient) Create added in v0.0.2

func (c *PlaybackClient) Create() *PlaybackCreate

Create returns a builder for creating a Playback entity.

func (*PlaybackClient) CreateBulk added in v0.0.2

func (c *PlaybackClient) CreateBulk(builders ...*PlaybackCreate) *PlaybackCreateBulk

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

func (*PlaybackClient) Delete added in v0.0.2

func (c *PlaybackClient) Delete() *PlaybackDelete

Delete returns a delete builder for Playback.

func (*PlaybackClient) DeleteOne added in v0.0.2

func (c *PlaybackClient) DeleteOne(pl *Playback) *PlaybackDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PlaybackClient) DeleteOneID added in v0.0.2

func (c *PlaybackClient) DeleteOneID(id uuid.UUID) *PlaybackDeleteOne

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

func (*PlaybackClient) Get added in v0.0.2

func (c *PlaybackClient) Get(ctx context.Context, id uuid.UUID) (*Playback, error)

Get returns a Playback entity by its id.

func (*PlaybackClient) GetX added in v0.0.2

func (c *PlaybackClient) GetX(ctx context.Context, id uuid.UUID) *Playback

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

func (*PlaybackClient) Hooks added in v0.0.2

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

Hooks returns the client hooks.

func (*PlaybackClient) Query added in v0.0.2

func (c *PlaybackClient) Query() *PlaybackQuery

Query returns a query builder for Playback.

func (*PlaybackClient) Update added in v0.0.2

func (c *PlaybackClient) Update() *PlaybackUpdate

Update returns an update builder for Playback.

func (*PlaybackClient) UpdateOne added in v0.0.2

func (c *PlaybackClient) UpdateOne(pl *Playback) *PlaybackUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PlaybackClient) UpdateOneID added in v0.0.2

func (c *PlaybackClient) UpdateOneID(id uuid.UUID) *PlaybackUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PlaybackClient) Use added in v0.0.2

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

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

type PlaybackCreate added in v0.0.2

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

PlaybackCreate is the builder for creating a Playback entity.

func (*PlaybackCreate) Exec added in v0.0.2

func (pc *PlaybackCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaybackCreate) ExecX added in v0.0.2

func (pc *PlaybackCreate) ExecX(ctx context.Context)

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

func (*PlaybackCreate) Mutation added in v0.0.2

func (pc *PlaybackCreate) Mutation() *PlaybackMutation

Mutation returns the PlaybackMutation object of the builder.

func (*PlaybackCreate) Save added in v0.0.2

func (pc *PlaybackCreate) Save(ctx context.Context) (*Playback, error)

Save creates the Playback in the database.

func (*PlaybackCreate) SaveX added in v0.0.2

func (pc *PlaybackCreate) SaveX(ctx context.Context) *Playback

SaveX calls Save and panics if Save returns an error.

func (*PlaybackCreate) SetCreatedAt added in v0.0.2

func (pc *PlaybackCreate) SetCreatedAt(t time.Time) *PlaybackCreate

SetCreatedAt sets the "created_at" field.

func (*PlaybackCreate) SetID added in v0.0.2

func (pc *PlaybackCreate) SetID(u uuid.UUID) *PlaybackCreate

SetID sets the "id" field.

func (*PlaybackCreate) SetNillableCreatedAt added in v0.0.2

func (pc *PlaybackCreate) SetNillableCreatedAt(t *time.Time) *PlaybackCreate

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

func (*PlaybackCreate) SetNillableID added in v0.0.2

func (pc *PlaybackCreate) SetNillableID(u *uuid.UUID) *PlaybackCreate

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

func (*PlaybackCreate) SetNillableStatus added in v0.0.2

func (pc *PlaybackCreate) SetNillableStatus(us *utils.PlaybackStatus) *PlaybackCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PlaybackCreate) SetNillableTime added in v0.0.2

func (pc *PlaybackCreate) SetNillableTime(i *int) *PlaybackCreate

SetNillableTime sets the "time" field if the given value is not nil.

func (*PlaybackCreate) SetNillableUpdatedAt added in v0.0.2

func (pc *PlaybackCreate) SetNillableUpdatedAt(t *time.Time) *PlaybackCreate

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

func (*PlaybackCreate) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackCreate) SetTime added in v0.0.2

func (pc *PlaybackCreate) SetTime(i int) *PlaybackCreate

SetTime sets the "time" field.

func (*PlaybackCreate) SetUpdatedAt added in v0.0.2

func (pc *PlaybackCreate) SetUpdatedAt(t time.Time) *PlaybackCreate

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackCreate) SetUserID added in v0.0.2

func (pc *PlaybackCreate) SetUserID(u uuid.UUID) *PlaybackCreate

SetUserID sets the "user_id" field.

func (*PlaybackCreate) SetVodID added in v0.0.2

func (pc *PlaybackCreate) SetVodID(u uuid.UUID) *PlaybackCreate

SetVodID sets the "vod_id" field.

type PlaybackCreateBulk added in v0.0.2

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

PlaybackCreateBulk is the builder for creating many Playback entities in bulk.

func (*PlaybackCreateBulk) Exec added in v0.0.2

func (pcb *PlaybackCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaybackCreateBulk) ExecX added in v0.0.2

func (pcb *PlaybackCreateBulk) ExecX(ctx context.Context)

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

func (*PlaybackCreateBulk) Save added in v0.0.2

func (pcb *PlaybackCreateBulk) Save(ctx context.Context) ([]*Playback, error)

Save creates the Playback entities in the database.

func (*PlaybackCreateBulk) SaveX added in v0.0.2

func (pcb *PlaybackCreateBulk) SaveX(ctx context.Context) []*Playback

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

type PlaybackDelete added in v0.0.2

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

PlaybackDelete is the builder for deleting a Playback entity.

func (*PlaybackDelete) Exec added in v0.0.2

func (pd *PlaybackDelete) Exec(ctx context.Context) (int, error)

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

func (*PlaybackDelete) ExecX added in v0.0.2

func (pd *PlaybackDelete) ExecX(ctx context.Context) int

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

func (*PlaybackDelete) Where added in v0.0.2

func (pd *PlaybackDelete) Where(ps ...predicate.Playback) *PlaybackDelete

Where appends a list predicates to the PlaybackDelete builder.

type PlaybackDeleteOne added in v0.0.2

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

PlaybackDeleteOne is the builder for deleting a single Playback entity.

func (*PlaybackDeleteOne) Exec added in v0.0.2

func (pdo *PlaybackDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PlaybackDeleteOne) ExecX added in v0.0.2

func (pdo *PlaybackDeleteOne) ExecX(ctx context.Context)

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

type PlaybackGroupBy added in v0.0.2

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

PlaybackGroupBy is the group-by builder for Playback entities.

func (*PlaybackGroupBy) Aggregate added in v0.0.2

func (pgb *PlaybackGroupBy) Aggregate(fns ...AggregateFunc) *PlaybackGroupBy

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

func (*PlaybackGroupBy) Bool added in v0.0.2

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

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

func (*PlaybackGroupBy) BoolX added in v0.0.2

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

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

func (*PlaybackGroupBy) Bools added in v0.0.2

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

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

func (*PlaybackGroupBy) BoolsX added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64 added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64X added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64s added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64sX added in v0.0.2

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

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

func (*PlaybackGroupBy) Int added in v0.0.2

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

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

func (*PlaybackGroupBy) IntX added in v0.0.2

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

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

func (*PlaybackGroupBy) Ints added in v0.0.2

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

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

func (*PlaybackGroupBy) IntsX added in v0.0.2

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

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

func (*PlaybackGroupBy) Scan added in v0.0.2

func (pgb *PlaybackGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*PlaybackGroupBy) ScanX added in v0.0.2

func (s *PlaybackGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*PlaybackGroupBy) String added in v0.0.2

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

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

func (*PlaybackGroupBy) StringX added in v0.0.2

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

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

func (*PlaybackGroupBy) Strings added in v0.0.2

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

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

func (*PlaybackGroupBy) StringsX added in v0.0.2

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

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

type PlaybackMutation added in v0.0.2

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

PlaybackMutation represents an operation that mutates the Playback nodes in the graph.

func (*PlaybackMutation) AddField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) AddTime added in v0.0.2

func (m *PlaybackMutation) AddTime(i int)

AddTime adds i to the "time" field.

func (*PlaybackMutation) AddedEdges added in v0.0.2

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

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

func (*PlaybackMutation) AddedField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) AddedFields added in v0.0.2

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

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

func (*PlaybackMutation) AddedIDs added in v0.0.2

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

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

func (*PlaybackMutation) AddedTime added in v0.0.2

func (m *PlaybackMutation) AddedTime() (r int, exists bool)

AddedTime returns the value that was added to the "time" field in this mutation.

func (*PlaybackMutation) ClearEdge added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ClearField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ClearStatus added in v0.0.2

func (m *PlaybackMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*PlaybackMutation) ClearedEdges added in v0.0.2

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

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

func (*PlaybackMutation) ClearedFields added in v0.0.2

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

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

func (PlaybackMutation) Client added in v0.0.2

func (m PlaybackMutation) 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 (*PlaybackMutation) CreatedAt added in v0.0.2

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

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

func (*PlaybackMutation) EdgeCleared added in v0.0.2

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

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

func (*PlaybackMutation) Field added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) FieldCleared added in v0.0.2

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

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

func (*PlaybackMutation) Fields added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ID added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) IDs added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) OldCreatedAt added in v0.0.2

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

OldCreatedAt returns the old "created_at" field's value of the Playback entity. If the Playback 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 (*PlaybackMutation) OldField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) OldStatus added in v0.0.2

func (m *PlaybackMutation) OldStatus(ctx context.Context) (v utils.PlaybackStatus, err error)

OldStatus returns the old "status" field's value of the Playback entity. If the Playback 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 (*PlaybackMutation) OldTime added in v0.0.2

func (m *PlaybackMutation) OldTime(ctx context.Context) (v int, err error)

OldTime returns the old "time" field's value of the Playback entity. If the Playback 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 (*PlaybackMutation) OldUpdatedAt added in v0.0.2

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

OldUpdatedAt returns the old "updated_at" field's value of the Playback entity. If the Playback 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 (*PlaybackMutation) OldUserID added in v0.0.2

func (m *PlaybackMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the Playback entity. If the Playback 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 (*PlaybackMutation) OldVodID added in v0.0.2

func (m *PlaybackMutation) OldVodID(ctx context.Context) (v uuid.UUID, err error)

OldVodID returns the old "vod_id" field's value of the Playback entity. If the Playback 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 (*PlaybackMutation) Op added in v0.0.2

func (m *PlaybackMutation) Op() Op

Op returns the operation name.

func (*PlaybackMutation) RemovedEdges added in v0.0.2

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

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

func (*PlaybackMutation) RemovedIDs added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ResetCreatedAt added in v0.0.2

func (m *PlaybackMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PlaybackMutation) ResetEdge added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ResetField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ResetStatus added in v0.0.2

func (m *PlaybackMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*PlaybackMutation) ResetTime added in v0.0.2

func (m *PlaybackMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*PlaybackMutation) ResetUpdatedAt added in v0.0.2

func (m *PlaybackMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PlaybackMutation) ResetUserID added in v0.0.2

func (m *PlaybackMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*PlaybackMutation) ResetVodID added in v0.0.2

func (m *PlaybackMutation) ResetVodID()

ResetVodID resets all changes to the "vod_id" field.

func (*PlaybackMutation) SetCreatedAt added in v0.0.2

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

SetCreatedAt sets the "created_at" field.

func (*PlaybackMutation) SetField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) SetID added in v0.0.2

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

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

func (*PlaybackMutation) SetStatus added in v0.0.2

func (m *PlaybackMutation) SetStatus(us utils.PlaybackStatus)

SetStatus sets the "status" field.

func (*PlaybackMutation) SetTime added in v0.0.2

func (m *PlaybackMutation) SetTime(i int)

SetTime sets the "time" field.

func (*PlaybackMutation) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackMutation) SetUserID added in v0.0.2

func (m *PlaybackMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*PlaybackMutation) SetVodID added in v0.0.2

func (m *PlaybackMutation) SetVodID(u uuid.UUID)

SetVodID sets the "vod_id" field.

func (*PlaybackMutation) Status added in v0.0.2

func (m *PlaybackMutation) Status() (r utils.PlaybackStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*PlaybackMutation) StatusCleared added in v0.0.2

func (m *PlaybackMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*PlaybackMutation) Time added in v0.0.2

func (m *PlaybackMutation) Time() (r int, exists bool)

Time returns the value of the "time" field in the mutation.

func (PlaybackMutation) Tx added in v0.0.2

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

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

func (*PlaybackMutation) Type added in v0.0.2

func (m *PlaybackMutation) Type() string

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

func (*PlaybackMutation) UpdatedAt added in v0.0.2

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

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

func (*PlaybackMutation) UserID added in v0.0.2

func (m *PlaybackMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*PlaybackMutation) VodID added in v0.0.2

func (m *PlaybackMutation) VodID() (r uuid.UUID, exists bool)

VodID returns the value of the "vod_id" field in the mutation.

func (*PlaybackMutation) Where added in v0.0.2

func (m *PlaybackMutation) Where(ps ...predicate.Playback)

Where appends a list predicates to the PlaybackMutation builder.

type PlaybackQuery added in v0.0.2

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

PlaybackQuery is the builder for querying Playback entities.

func (*PlaybackQuery) All added in v0.0.2

func (pq *PlaybackQuery) All(ctx context.Context) ([]*Playback, error)

All executes the query and returns a list of Playbacks.

func (*PlaybackQuery) AllX added in v0.0.2

func (pq *PlaybackQuery) AllX(ctx context.Context) []*Playback

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

func (*PlaybackQuery) Clone added in v0.0.2

func (pq *PlaybackQuery) Clone() *PlaybackQuery

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

func (*PlaybackQuery) Count added in v0.0.2

func (pq *PlaybackQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PlaybackQuery) CountX added in v0.0.2

func (pq *PlaybackQuery) CountX(ctx context.Context) int

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

func (*PlaybackQuery) Exist added in v0.0.2

func (pq *PlaybackQuery) Exist(ctx context.Context) (bool, error)

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

func (*PlaybackQuery) ExistX added in v0.0.2

func (pq *PlaybackQuery) ExistX(ctx context.Context) bool

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

func (*PlaybackQuery) First added in v0.0.2

func (pq *PlaybackQuery) First(ctx context.Context) (*Playback, error)

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

func (*PlaybackQuery) FirstID added in v0.0.2

func (pq *PlaybackQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PlaybackQuery) FirstIDX added in v0.0.2

func (pq *PlaybackQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*PlaybackQuery) FirstX added in v0.0.2

func (pq *PlaybackQuery) FirstX(ctx context.Context) *Playback

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

func (*PlaybackQuery) GroupBy added in v0.0.2

func (pq *PlaybackQuery) GroupBy(field string, fields ...string) *PlaybackGroupBy

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 {
	VodID uuid.UUID `json:"vod_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Playback.Query().
	GroupBy(playback.FieldVodID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PlaybackQuery) IDs added in v0.0.2

func (pq *PlaybackQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*PlaybackQuery) IDsX added in v0.0.2

func (pq *PlaybackQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*PlaybackQuery) Limit added in v0.0.2

func (pq *PlaybackQuery) Limit(limit int) *PlaybackQuery

Limit adds a limit step to the query.

func (*PlaybackQuery) Offset added in v0.0.2

func (pq *PlaybackQuery) Offset(offset int) *PlaybackQuery

Offset adds an offset step to the query.

func (*PlaybackQuery) Only added in v0.0.2

func (pq *PlaybackQuery) Only(ctx context.Context) (*Playback, error)

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

func (*PlaybackQuery) OnlyID added in v0.0.2

func (pq *PlaybackQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PlaybackQuery) OnlyIDX added in v0.0.2

func (pq *PlaybackQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*PlaybackQuery) OnlyX added in v0.0.2

func (pq *PlaybackQuery) OnlyX(ctx context.Context) *Playback

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

func (*PlaybackQuery) Order added in v0.0.2

func (pq *PlaybackQuery) Order(o ...OrderFunc) *PlaybackQuery

Order adds an order step to the query.

func (*PlaybackQuery) Select added in v0.0.2

func (pq *PlaybackQuery) Select(fields ...string) *PlaybackSelect

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 {
	VodID uuid.UUID `json:"vod_id,omitempty"`
}

client.Playback.Query().
	Select(playback.FieldVodID).
	Scan(ctx, &v)

func (*PlaybackQuery) Unique added in v0.0.2

func (pq *PlaybackQuery) Unique(unique bool) *PlaybackQuery

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 (*PlaybackQuery) Where added in v0.0.2

func (pq *PlaybackQuery) Where(ps ...predicate.Playback) *PlaybackQuery

Where adds a new predicate for the PlaybackQuery builder.

type PlaybackSelect added in v0.0.2

type PlaybackSelect struct {
	*PlaybackQuery
	// contains filtered or unexported fields
}

PlaybackSelect is the builder for selecting fields of Playback entities.

func (*PlaybackSelect) Bool added in v0.0.2

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

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

func (*PlaybackSelect) BoolX added in v0.0.2

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

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

func (*PlaybackSelect) Bools added in v0.0.2

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

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

func (*PlaybackSelect) BoolsX added in v0.0.2

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

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

func (*PlaybackSelect) Float64 added in v0.0.2

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

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

func (*PlaybackSelect) Float64X added in v0.0.2

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

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

func (*PlaybackSelect) Float64s added in v0.0.2

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

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

func (*PlaybackSelect) Float64sX added in v0.0.2

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

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

func (*PlaybackSelect) Int added in v0.0.2

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

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

func (*PlaybackSelect) IntX added in v0.0.2

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

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

func (*PlaybackSelect) Ints added in v0.0.2

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

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

func (*PlaybackSelect) IntsX added in v0.0.2

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

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

func (*PlaybackSelect) Scan added in v0.0.2

func (ps *PlaybackSelect) Scan(ctx context.Context, v interface{}) error

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

func (*PlaybackSelect) ScanX added in v0.0.2

func (s *PlaybackSelect) ScanX(ctx context.Context, v interface{})

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

func (*PlaybackSelect) String added in v0.0.2

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

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

func (*PlaybackSelect) StringX added in v0.0.2

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

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

func (*PlaybackSelect) Strings added in v0.0.2

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

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

func (*PlaybackSelect) StringsX added in v0.0.2

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

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

type PlaybackUpdate added in v0.0.2

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

PlaybackUpdate is the builder for updating Playback entities.

func (*PlaybackUpdate) AddTime added in v0.0.2

func (pu *PlaybackUpdate) AddTime(i int) *PlaybackUpdate

AddTime adds i to the "time" field.

func (*PlaybackUpdate) ClearStatus added in v0.0.2

func (pu *PlaybackUpdate) ClearStatus() *PlaybackUpdate

ClearStatus clears the value of the "status" field.

func (*PlaybackUpdate) Exec added in v0.0.2

func (pu *PlaybackUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaybackUpdate) ExecX added in v0.0.2

func (pu *PlaybackUpdate) ExecX(ctx context.Context)

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

func (*PlaybackUpdate) Mutation added in v0.0.2

func (pu *PlaybackUpdate) Mutation() *PlaybackMutation

Mutation returns the PlaybackMutation object of the builder.

func (*PlaybackUpdate) Save added in v0.0.2

func (pu *PlaybackUpdate) Save(ctx context.Context) (int, error)

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

func (*PlaybackUpdate) SaveX added in v0.0.2

func (pu *PlaybackUpdate) SaveX(ctx context.Context) int

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

func (*PlaybackUpdate) SetNillableStatus added in v0.0.2

func (pu *PlaybackUpdate) SetNillableStatus(us *utils.PlaybackStatus) *PlaybackUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PlaybackUpdate) SetNillableTime added in v0.0.2

func (pu *PlaybackUpdate) SetNillableTime(i *int) *PlaybackUpdate

SetNillableTime sets the "time" field if the given value is not nil.

func (*PlaybackUpdate) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpdate) SetTime added in v0.0.2

func (pu *PlaybackUpdate) SetTime(i int) *PlaybackUpdate

SetTime sets the "time" field.

func (*PlaybackUpdate) SetUpdatedAt added in v0.0.2

func (pu *PlaybackUpdate) SetUpdatedAt(t time.Time) *PlaybackUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpdate) SetUserID added in v0.0.2

func (pu *PlaybackUpdate) SetUserID(u uuid.UUID) *PlaybackUpdate

SetUserID sets the "user_id" field.

func (*PlaybackUpdate) SetVodID added in v0.0.2

func (pu *PlaybackUpdate) SetVodID(u uuid.UUID) *PlaybackUpdate

SetVodID sets the "vod_id" field.

func (*PlaybackUpdate) Where added in v0.0.2

func (pu *PlaybackUpdate) Where(ps ...predicate.Playback) *PlaybackUpdate

Where appends a list predicates to the PlaybackUpdate builder.

type PlaybackUpdateOne added in v0.0.2

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

PlaybackUpdateOne is the builder for updating a single Playback entity.

func (*PlaybackUpdateOne) AddTime added in v0.0.2

func (puo *PlaybackUpdateOne) AddTime(i int) *PlaybackUpdateOne

AddTime adds i to the "time" field.

func (*PlaybackUpdateOne) ClearStatus added in v0.0.2

func (puo *PlaybackUpdateOne) ClearStatus() *PlaybackUpdateOne

ClearStatus clears the value of the "status" field.

func (*PlaybackUpdateOne) Exec added in v0.0.2

func (puo *PlaybackUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PlaybackUpdateOne) ExecX added in v0.0.2

func (puo *PlaybackUpdateOne) ExecX(ctx context.Context)

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

func (*PlaybackUpdateOne) Mutation added in v0.0.2

func (puo *PlaybackUpdateOne) Mutation() *PlaybackMutation

Mutation returns the PlaybackMutation object of the builder.

func (*PlaybackUpdateOne) Save added in v0.0.2

func (puo *PlaybackUpdateOne) Save(ctx context.Context) (*Playback, error)

Save executes the query and returns the updated Playback entity.

func (*PlaybackUpdateOne) SaveX added in v0.0.2

func (puo *PlaybackUpdateOne) SaveX(ctx context.Context) *Playback

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

func (*PlaybackUpdateOne) Select added in v0.0.2

func (puo *PlaybackUpdateOne) Select(field string, fields ...string) *PlaybackUpdateOne

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

func (*PlaybackUpdateOne) SetNillableStatus added in v0.0.2

func (puo *PlaybackUpdateOne) SetNillableStatus(us *utils.PlaybackStatus) *PlaybackUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PlaybackUpdateOne) SetNillableTime added in v0.0.2

func (puo *PlaybackUpdateOne) SetNillableTime(i *int) *PlaybackUpdateOne

SetNillableTime sets the "time" field if the given value is not nil.

func (*PlaybackUpdateOne) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpdateOne) SetTime added in v0.0.2

func (puo *PlaybackUpdateOne) SetTime(i int) *PlaybackUpdateOne

SetTime sets the "time" field.

func (*PlaybackUpdateOne) SetUpdatedAt added in v0.0.2

func (puo *PlaybackUpdateOne) SetUpdatedAt(t time.Time) *PlaybackUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpdateOne) SetUserID added in v0.0.2

func (puo *PlaybackUpdateOne) SetUserID(u uuid.UUID) *PlaybackUpdateOne

SetUserID sets the "user_id" field.

func (*PlaybackUpdateOne) SetVodID added in v0.0.2

func (puo *PlaybackUpdateOne) SetVodID(u uuid.UUID) *PlaybackUpdateOne

SetVodID sets the "vod_id" field.

type Playbacks added in v0.0.2

type Playbacks []*Playback

Playbacks is a parsable slice of Playback.

type Playlist added in v1.0.0

type Playlist struct {

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

Playlist is the model entity for the Playlist schema.

func (*Playlist) QueryVods added in v1.0.0

func (pl *Playlist) QueryVods() *VodQuery

QueryVods queries the "vods" edge of the Playlist entity.

func (*Playlist) String added in v1.0.0

func (pl *Playlist) String() string

String implements the fmt.Stringer.

func (*Playlist) Unwrap added in v1.0.0

func (pl *Playlist) Unwrap() *Playlist

Unwrap unwraps the Playlist 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 (*Playlist) Update added in v1.0.0

func (pl *Playlist) Update() *PlaylistUpdateOne

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

type PlaylistClient added in v1.0.0

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

PlaylistClient is a client for the Playlist schema.

func NewPlaylistClient added in v1.0.0

func NewPlaylistClient(c config) *PlaylistClient

NewPlaylistClient returns a client for the Playlist from the given config.

func (*PlaylistClient) Create added in v1.0.0

func (c *PlaylistClient) Create() *PlaylistCreate

Create returns a builder for creating a Playlist entity.

func (*PlaylistClient) CreateBulk added in v1.0.0

func (c *PlaylistClient) CreateBulk(builders ...*PlaylistCreate) *PlaylistCreateBulk

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

func (*PlaylistClient) Delete added in v1.0.0

func (c *PlaylistClient) Delete() *PlaylistDelete

Delete returns a delete builder for Playlist.

func (*PlaylistClient) DeleteOne added in v1.0.0

func (c *PlaylistClient) DeleteOne(pl *Playlist) *PlaylistDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PlaylistClient) DeleteOneID added in v1.0.0

func (c *PlaylistClient) DeleteOneID(id uuid.UUID) *PlaylistDeleteOne

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

func (*PlaylistClient) Get added in v1.0.0

func (c *PlaylistClient) Get(ctx context.Context, id uuid.UUID) (*Playlist, error)

Get returns a Playlist entity by its id.

func (*PlaylistClient) GetX added in v1.0.0

func (c *PlaylistClient) GetX(ctx context.Context, id uuid.UUID) *Playlist

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

func (*PlaylistClient) Hooks added in v1.0.0

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

Hooks returns the client hooks.

func (*PlaylistClient) Query added in v1.0.0

func (c *PlaylistClient) Query() *PlaylistQuery

Query returns a query builder for Playlist.

func (*PlaylistClient) QueryVods added in v1.0.0

func (c *PlaylistClient) QueryVods(pl *Playlist) *VodQuery

QueryVods queries the vods edge of a Playlist.

func (*PlaylistClient) Update added in v1.0.0

func (c *PlaylistClient) Update() *PlaylistUpdate

Update returns an update builder for Playlist.

func (*PlaylistClient) UpdateOne added in v1.0.0

func (c *PlaylistClient) UpdateOne(pl *Playlist) *PlaylistUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PlaylistClient) UpdateOneID added in v1.0.0

func (c *PlaylistClient) UpdateOneID(id uuid.UUID) *PlaylistUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PlaylistClient) Use added in v1.0.0

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

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

type PlaylistCreate added in v1.0.0

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

PlaylistCreate is the builder for creating a Playlist entity.

func (*PlaylistCreate) AddVodIDs added in v1.0.0

func (pc *PlaylistCreate) AddVodIDs(ids ...uuid.UUID) *PlaylistCreate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*PlaylistCreate) AddVods added in v1.0.0

func (pc *PlaylistCreate) AddVods(v ...*Vod) *PlaylistCreate

AddVods adds the "vods" edges to the Vod entity.

func (*PlaylistCreate) Exec added in v1.0.0

func (pc *PlaylistCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistCreate) ExecX added in v1.0.0

func (pc *PlaylistCreate) ExecX(ctx context.Context)

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

func (*PlaylistCreate) Mutation added in v1.0.0

func (pc *PlaylistCreate) Mutation() *PlaylistMutation

Mutation returns the PlaylistMutation object of the builder.

func (*PlaylistCreate) Save added in v1.0.0

func (pc *PlaylistCreate) Save(ctx context.Context) (*Playlist, error)

Save creates the Playlist in the database.

func (*PlaylistCreate) SaveX added in v1.0.0

func (pc *PlaylistCreate) SaveX(ctx context.Context) *Playlist

SaveX calls Save and panics if Save returns an error.

func (*PlaylistCreate) SetCreatedAt added in v1.0.0

func (pc *PlaylistCreate) SetCreatedAt(t time.Time) *PlaylistCreate

SetCreatedAt sets the "created_at" field.

func (*PlaylistCreate) SetDescription added in v1.0.0

func (pc *PlaylistCreate) SetDescription(s string) *PlaylistCreate

SetDescription sets the "description" field.

func (*PlaylistCreate) SetID added in v1.0.0

func (pc *PlaylistCreate) SetID(u uuid.UUID) *PlaylistCreate

SetID sets the "id" field.

func (*PlaylistCreate) SetName added in v1.0.0

func (pc *PlaylistCreate) SetName(s string) *PlaylistCreate

SetName sets the "name" field.

func (*PlaylistCreate) SetNillableCreatedAt added in v1.0.0

func (pc *PlaylistCreate) SetNillableCreatedAt(t *time.Time) *PlaylistCreate

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

func (*PlaylistCreate) SetNillableDescription added in v1.0.0

func (pc *PlaylistCreate) SetNillableDescription(s *string) *PlaylistCreate

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

func (*PlaylistCreate) SetNillableID added in v1.0.0

func (pc *PlaylistCreate) SetNillableID(u *uuid.UUID) *PlaylistCreate

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

func (*PlaylistCreate) SetNillableThumbnailPath added in v1.0.0

func (pc *PlaylistCreate) SetNillableThumbnailPath(s *string) *PlaylistCreate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*PlaylistCreate) SetNillableUpdatedAt added in v1.0.0

func (pc *PlaylistCreate) SetNillableUpdatedAt(t *time.Time) *PlaylistCreate

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

func (*PlaylistCreate) SetThumbnailPath added in v1.0.0

func (pc *PlaylistCreate) SetThumbnailPath(s string) *PlaylistCreate

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistCreate) SetUpdatedAt added in v1.0.0

func (pc *PlaylistCreate) SetUpdatedAt(t time.Time) *PlaylistCreate

SetUpdatedAt sets the "updated_at" field.

type PlaylistCreateBulk added in v1.0.0

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

PlaylistCreateBulk is the builder for creating many Playlist entities in bulk.

func (*PlaylistCreateBulk) Exec added in v1.0.0

func (pcb *PlaylistCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistCreateBulk) ExecX added in v1.0.0

func (pcb *PlaylistCreateBulk) ExecX(ctx context.Context)

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

func (*PlaylistCreateBulk) Save added in v1.0.0

func (pcb *PlaylistCreateBulk) Save(ctx context.Context) ([]*Playlist, error)

Save creates the Playlist entities in the database.

func (*PlaylistCreateBulk) SaveX added in v1.0.0

func (pcb *PlaylistCreateBulk) SaveX(ctx context.Context) []*Playlist

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

type PlaylistDelete added in v1.0.0

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

PlaylistDelete is the builder for deleting a Playlist entity.

func (*PlaylistDelete) Exec added in v1.0.0

func (pd *PlaylistDelete) Exec(ctx context.Context) (int, error)

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

func (*PlaylistDelete) ExecX added in v1.0.0

func (pd *PlaylistDelete) ExecX(ctx context.Context) int

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

func (*PlaylistDelete) Where added in v1.0.0

func (pd *PlaylistDelete) Where(ps ...predicate.Playlist) *PlaylistDelete

Where appends a list predicates to the PlaylistDelete builder.

type PlaylistDeleteOne added in v1.0.0

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

PlaylistDeleteOne is the builder for deleting a single Playlist entity.

func (*PlaylistDeleteOne) Exec added in v1.0.0

func (pdo *PlaylistDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PlaylistDeleteOne) ExecX added in v1.0.0

func (pdo *PlaylistDeleteOne) ExecX(ctx context.Context)

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

type PlaylistEdges added in v1.0.0

type PlaylistEdges struct {
	// Vods holds the value of the vods edge.
	Vods []*Vod `json:"vods,omitempty"`
	// contains filtered or unexported fields
}

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

func (PlaylistEdges) VodsOrErr added in v1.0.0

func (e PlaylistEdges) VodsOrErr() ([]*Vod, error)

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

type PlaylistGroupBy added in v1.0.0

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

PlaylistGroupBy is the group-by builder for Playlist entities.

func (*PlaylistGroupBy) Aggregate added in v1.0.0

func (pgb *PlaylistGroupBy) Aggregate(fns ...AggregateFunc) *PlaylistGroupBy

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

func (*PlaylistGroupBy) Bool added in v1.0.0

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

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

func (*PlaylistGroupBy) BoolX added in v1.0.0

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

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

func (*PlaylistGroupBy) Bools added in v1.0.0

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

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

func (*PlaylistGroupBy) BoolsX added in v1.0.0

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

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

func (*PlaylistGroupBy) Float64 added in v1.0.0

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

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

func (*PlaylistGroupBy) Float64X added in v1.0.0

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

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

func (*PlaylistGroupBy) Float64s added in v1.0.0

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

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

func (*PlaylistGroupBy) Float64sX added in v1.0.0

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

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

func (*PlaylistGroupBy) Int added in v1.0.0

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

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

func (*PlaylistGroupBy) IntX added in v1.0.0

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

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

func (*PlaylistGroupBy) Ints added in v1.0.0

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

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

func (*PlaylistGroupBy) IntsX added in v1.0.0

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

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

func (*PlaylistGroupBy) Scan added in v1.0.0

func (pgb *PlaylistGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*PlaylistGroupBy) ScanX added in v1.0.0

func (s *PlaylistGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*PlaylistGroupBy) String added in v1.0.0

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

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

func (*PlaylistGroupBy) StringX added in v1.0.0

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

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

func (*PlaylistGroupBy) Strings added in v1.0.0

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

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

func (*PlaylistGroupBy) StringsX added in v1.0.0

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

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

type PlaylistMutation added in v1.0.0

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

PlaylistMutation represents an operation that mutates the Playlist nodes in the graph.

func (*PlaylistMutation) AddField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) AddVodIDs added in v1.0.0

func (m *PlaylistMutation) AddVodIDs(ids ...uuid.UUID)

AddVodIDs adds the "vods" edge to the Vod entity by ids.

func (*PlaylistMutation) AddedEdges added in v1.0.0

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

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

func (*PlaylistMutation) AddedField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) AddedFields added in v1.0.0

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

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

func (*PlaylistMutation) AddedIDs added in v1.0.0

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

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

func (*PlaylistMutation) ClearDescription added in v1.0.0

func (m *PlaylistMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*PlaylistMutation) ClearEdge added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ClearField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ClearThumbnailPath added in v1.0.0

func (m *PlaylistMutation) ClearThumbnailPath()

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistMutation) ClearVods added in v1.0.0

func (m *PlaylistMutation) ClearVods()

ClearVods clears the "vods" edge to the Vod entity.

func (*PlaylistMutation) ClearedEdges added in v1.0.0

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

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

func (*PlaylistMutation) ClearedFields added in v1.0.0

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

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

func (PlaylistMutation) Client added in v1.0.0

func (m PlaylistMutation) 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 (*PlaylistMutation) CreatedAt added in v1.0.0

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

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

func (*PlaylistMutation) Description added in v1.0.0

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

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

func (*PlaylistMutation) DescriptionCleared added in v1.0.0

func (m *PlaylistMutation) DescriptionCleared() bool

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

func (*PlaylistMutation) EdgeCleared added in v1.0.0

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

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

func (*PlaylistMutation) Field added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) FieldCleared added in v1.0.0

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

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

func (*PlaylistMutation) Fields added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ID added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) IDs added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) Name added in v1.0.0

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

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

func (*PlaylistMutation) OldCreatedAt added in v1.0.0

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

OldCreatedAt returns the old "created_at" field's value of the Playlist entity. If the Playlist 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 (*PlaylistMutation) OldDescription added in v1.0.0

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

OldDescription returns the old "description" field's value of the Playlist entity. If the Playlist 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 (*PlaylistMutation) OldField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) OldName added in v1.0.0

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

OldName returns the old "name" field's value of the Playlist entity. If the Playlist 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 (*PlaylistMutation) OldThumbnailPath added in v1.0.0

func (m *PlaylistMutation) OldThumbnailPath(ctx context.Context) (v string, err error)

OldThumbnailPath returns the old "thumbnail_path" field's value of the Playlist entity. If the Playlist 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 (*PlaylistMutation) OldUpdatedAt added in v1.0.0

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

OldUpdatedAt returns the old "updated_at" field's value of the Playlist entity. If the Playlist 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 (*PlaylistMutation) Op added in v1.0.0

func (m *PlaylistMutation) Op() Op

Op returns the operation name.

func (*PlaylistMutation) RemoveVodIDs added in v1.0.0

func (m *PlaylistMutation) RemoveVodIDs(ids ...uuid.UUID)

RemoveVodIDs removes the "vods" edge to the Vod entity by IDs.

func (*PlaylistMutation) RemovedEdges added in v1.0.0

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

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

func (*PlaylistMutation) RemovedIDs added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) RemovedVodsIDs added in v1.0.0

func (m *PlaylistMutation) RemovedVodsIDs() (ids []uuid.UUID)

RemovedVods returns the removed IDs of the "vods" edge to the Vod entity.

func (*PlaylistMutation) ResetCreatedAt added in v1.0.0

func (m *PlaylistMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PlaylistMutation) ResetDescription added in v1.0.0

func (m *PlaylistMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*PlaylistMutation) ResetEdge added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ResetField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ResetName added in v1.0.0

func (m *PlaylistMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PlaylistMutation) ResetThumbnailPath added in v1.0.0

func (m *PlaylistMutation) ResetThumbnailPath()

ResetThumbnailPath resets all changes to the "thumbnail_path" field.

func (*PlaylistMutation) ResetUpdatedAt added in v1.0.0

func (m *PlaylistMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PlaylistMutation) ResetVods added in v1.0.0

func (m *PlaylistMutation) ResetVods()

ResetVods resets all changes to the "vods" edge.

func (*PlaylistMutation) SetCreatedAt added in v1.0.0

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

SetCreatedAt sets the "created_at" field.

func (*PlaylistMutation) SetDescription added in v1.0.0

func (m *PlaylistMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*PlaylistMutation) SetField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) SetID added in v1.0.0

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

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

func (*PlaylistMutation) SetName added in v1.0.0

func (m *PlaylistMutation) SetName(s string)

SetName sets the "name" field.

func (*PlaylistMutation) SetThumbnailPath added in v1.0.0

func (m *PlaylistMutation) SetThumbnailPath(s string)

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistMutation) SetUpdatedAt added in v1.0.0

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

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistMutation) ThumbnailPath added in v1.0.0

func (m *PlaylistMutation) ThumbnailPath() (r string, exists bool)

ThumbnailPath returns the value of the "thumbnail_path" field in the mutation.

func (*PlaylistMutation) ThumbnailPathCleared added in v1.0.0

func (m *PlaylistMutation) ThumbnailPathCleared() bool

ThumbnailPathCleared returns if the "thumbnail_path" field was cleared in this mutation.

func (PlaylistMutation) Tx added in v1.0.0

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

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

func (*PlaylistMutation) Type added in v1.0.0

func (m *PlaylistMutation) Type() string

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

func (*PlaylistMutation) UpdatedAt added in v1.0.0

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

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

func (*PlaylistMutation) VodsCleared added in v1.0.0

func (m *PlaylistMutation) VodsCleared() bool

VodsCleared reports if the "vods" edge to the Vod entity was cleared.

func (*PlaylistMutation) VodsIDs added in v1.0.0

func (m *PlaylistMutation) VodsIDs() (ids []uuid.UUID)

VodsIDs returns the "vods" edge IDs in the mutation.

func (*PlaylistMutation) Where added in v1.0.0

func (m *PlaylistMutation) Where(ps ...predicate.Playlist)

Where appends a list predicates to the PlaylistMutation builder.

type PlaylistQuery added in v1.0.0

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

PlaylistQuery is the builder for querying Playlist entities.

func (*PlaylistQuery) All added in v1.0.0

func (pq *PlaylistQuery) All(ctx context.Context) ([]*Playlist, error)

All executes the query and returns a list of Playlists.

func (*PlaylistQuery) AllX added in v1.0.0

func (pq *PlaylistQuery) AllX(ctx context.Context) []*Playlist

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

func (*PlaylistQuery) Clone added in v1.0.0

func (pq *PlaylistQuery) Clone() *PlaylistQuery

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

func (*PlaylistQuery) Count added in v1.0.0

func (pq *PlaylistQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PlaylistQuery) CountX added in v1.0.0

func (pq *PlaylistQuery) CountX(ctx context.Context) int

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

func (*PlaylistQuery) Exist added in v1.0.0

func (pq *PlaylistQuery) Exist(ctx context.Context) (bool, error)

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

func (*PlaylistQuery) ExistX added in v1.0.0

func (pq *PlaylistQuery) ExistX(ctx context.Context) bool

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

func (*PlaylistQuery) First added in v1.0.0

func (pq *PlaylistQuery) First(ctx context.Context) (*Playlist, error)

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

func (*PlaylistQuery) FirstID added in v1.0.0

func (pq *PlaylistQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PlaylistQuery) FirstIDX added in v1.0.0

func (pq *PlaylistQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*PlaylistQuery) FirstX added in v1.0.0

func (pq *PlaylistQuery) FirstX(ctx context.Context) *Playlist

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

func (*PlaylistQuery) GroupBy added in v1.0.0

func (pq *PlaylistQuery) GroupBy(field string, fields ...string) *PlaylistGroupBy

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

client.Playlist.Query().
	GroupBy(playlist.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PlaylistQuery) IDs added in v1.0.0

func (pq *PlaylistQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*PlaylistQuery) IDsX added in v1.0.0

func (pq *PlaylistQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*PlaylistQuery) Limit added in v1.0.0

func (pq *PlaylistQuery) Limit(limit int) *PlaylistQuery

Limit adds a limit step to the query.

func (*PlaylistQuery) Offset added in v1.0.0

func (pq *PlaylistQuery) Offset(offset int) *PlaylistQuery

Offset adds an offset step to the query.

func (*PlaylistQuery) Only added in v1.0.0

func (pq *PlaylistQuery) Only(ctx context.Context) (*Playlist, error)

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

func (*PlaylistQuery) OnlyID added in v1.0.0

func (pq *PlaylistQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PlaylistQuery) OnlyIDX added in v1.0.0

func (pq *PlaylistQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*PlaylistQuery) OnlyX added in v1.0.0

func (pq *PlaylistQuery) OnlyX(ctx context.Context) *Playlist

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

func (*PlaylistQuery) Order added in v1.0.0

func (pq *PlaylistQuery) Order(o ...OrderFunc) *PlaylistQuery

Order adds an order step to the query.

func (*PlaylistQuery) QueryVods added in v1.0.0

func (pq *PlaylistQuery) QueryVods() *VodQuery

QueryVods chains the current query on the "vods" edge.

func (*PlaylistQuery) Select added in v1.0.0

func (pq *PlaylistQuery) Select(fields ...string) *PlaylistSelect

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

client.Playlist.Query().
	Select(playlist.FieldName).
	Scan(ctx, &v)

func (*PlaylistQuery) Unique added in v1.0.0

func (pq *PlaylistQuery) Unique(unique bool) *PlaylistQuery

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 (*PlaylistQuery) Where added in v1.0.0

func (pq *PlaylistQuery) Where(ps ...predicate.Playlist) *PlaylistQuery

Where adds a new predicate for the PlaylistQuery builder.

func (*PlaylistQuery) WithVods added in v1.0.0

func (pq *PlaylistQuery) WithVods(opts ...func(*VodQuery)) *PlaylistQuery

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

type PlaylistSelect added in v1.0.0

type PlaylistSelect struct {
	*PlaylistQuery
	// contains filtered or unexported fields
}

PlaylistSelect is the builder for selecting fields of Playlist entities.

func (*PlaylistSelect) Bool added in v1.0.0

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

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

func (*PlaylistSelect) BoolX added in v1.0.0

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

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

func (*PlaylistSelect) Bools added in v1.0.0

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

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

func (*PlaylistSelect) BoolsX added in v1.0.0

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

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

func (*PlaylistSelect) Float64 added in v1.0.0

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

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

func (*PlaylistSelect) Float64X added in v1.0.0

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

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

func (*PlaylistSelect) Float64s added in v1.0.0

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

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

func (*PlaylistSelect) Float64sX added in v1.0.0

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

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

func (*PlaylistSelect) Int added in v1.0.0

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

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

func (*PlaylistSelect) IntX added in v1.0.0

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

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

func (*PlaylistSelect) Ints added in v1.0.0

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

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

func (*PlaylistSelect) IntsX added in v1.0.0

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

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

func (*PlaylistSelect) Scan added in v1.0.0

func (ps *PlaylistSelect) Scan(ctx context.Context, v interface{}) error

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

func (*PlaylistSelect) ScanX added in v1.0.0

func (s *PlaylistSelect) ScanX(ctx context.Context, v interface{})

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

func (*PlaylistSelect) String added in v1.0.0

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

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

func (*PlaylistSelect) StringX added in v1.0.0

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

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

func (*PlaylistSelect) Strings added in v1.0.0

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

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

func (*PlaylistSelect) StringsX added in v1.0.0

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

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

type PlaylistUpdate added in v1.0.0

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

PlaylistUpdate is the builder for updating Playlist entities.

func (*PlaylistUpdate) AddVodIDs added in v1.0.0

func (pu *PlaylistUpdate) AddVodIDs(ids ...uuid.UUID) *PlaylistUpdate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*PlaylistUpdate) AddVods added in v1.0.0

func (pu *PlaylistUpdate) AddVods(v ...*Vod) *PlaylistUpdate

AddVods adds the "vods" edges to the Vod entity.

func (*PlaylistUpdate) ClearDescription added in v1.0.0

func (pu *PlaylistUpdate) ClearDescription() *PlaylistUpdate

ClearDescription clears the value of the "description" field.

func (*PlaylistUpdate) ClearThumbnailPath added in v1.0.0

func (pu *PlaylistUpdate) ClearThumbnailPath() *PlaylistUpdate

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpdate) ClearVods added in v1.0.0

func (pu *PlaylistUpdate) ClearVods() *PlaylistUpdate

ClearVods clears all "vods" edges to the Vod entity.

func (*PlaylistUpdate) Exec added in v1.0.0

func (pu *PlaylistUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistUpdate) ExecX added in v1.0.0

func (pu *PlaylistUpdate) ExecX(ctx context.Context)

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

func (*PlaylistUpdate) Mutation added in v1.0.0

func (pu *PlaylistUpdate) Mutation() *PlaylistMutation

Mutation returns the PlaylistMutation object of the builder.

func (*PlaylistUpdate) RemoveVodIDs added in v1.0.0

func (pu *PlaylistUpdate) RemoveVodIDs(ids ...uuid.UUID) *PlaylistUpdate

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*PlaylistUpdate) RemoveVods added in v1.0.0

func (pu *PlaylistUpdate) RemoveVods(v ...*Vod) *PlaylistUpdate

RemoveVods removes "vods" edges to Vod entities.

func (*PlaylistUpdate) Save added in v1.0.0

func (pu *PlaylistUpdate) Save(ctx context.Context) (int, error)

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

func (*PlaylistUpdate) SaveX added in v1.0.0

func (pu *PlaylistUpdate) SaveX(ctx context.Context) int

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

func (*PlaylistUpdate) SetDescription added in v1.0.0

func (pu *PlaylistUpdate) SetDescription(s string) *PlaylistUpdate

SetDescription sets the "description" field.

func (*PlaylistUpdate) SetName added in v1.0.0

func (pu *PlaylistUpdate) SetName(s string) *PlaylistUpdate

SetName sets the "name" field.

func (*PlaylistUpdate) SetNillableDescription added in v1.0.0

func (pu *PlaylistUpdate) SetNillableDescription(s *string) *PlaylistUpdate

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

func (*PlaylistUpdate) SetNillableThumbnailPath added in v1.0.0

func (pu *PlaylistUpdate) SetNillableThumbnailPath(s *string) *PlaylistUpdate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*PlaylistUpdate) SetThumbnailPath added in v1.0.0

func (pu *PlaylistUpdate) SetThumbnailPath(s string) *PlaylistUpdate

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpdate) SetUpdatedAt added in v1.0.0

func (pu *PlaylistUpdate) SetUpdatedAt(t time.Time) *PlaylistUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistUpdate) Where added in v1.0.0

func (pu *PlaylistUpdate) Where(ps ...predicate.Playlist) *PlaylistUpdate

Where appends a list predicates to the PlaylistUpdate builder.

type PlaylistUpdateOne added in v1.0.0

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

PlaylistUpdateOne is the builder for updating a single Playlist entity.

func (*PlaylistUpdateOne) AddVodIDs added in v1.0.0

func (puo *PlaylistUpdateOne) AddVodIDs(ids ...uuid.UUID) *PlaylistUpdateOne

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*PlaylistUpdateOne) AddVods added in v1.0.0

func (puo *PlaylistUpdateOne) AddVods(v ...*Vod) *PlaylistUpdateOne

AddVods adds the "vods" edges to the Vod entity.

func (*PlaylistUpdateOne) ClearDescription added in v1.0.0

func (puo *PlaylistUpdateOne) ClearDescription() *PlaylistUpdateOne

ClearDescription clears the value of the "description" field.

func (*PlaylistUpdateOne) ClearThumbnailPath added in v1.0.0

func (puo *PlaylistUpdateOne) ClearThumbnailPath() *PlaylistUpdateOne

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpdateOne) ClearVods added in v1.0.0

func (puo *PlaylistUpdateOne) ClearVods() *PlaylistUpdateOne

ClearVods clears all "vods" edges to the Vod entity.

func (*PlaylistUpdateOne) Exec added in v1.0.0

func (puo *PlaylistUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PlaylistUpdateOne) ExecX added in v1.0.0

func (puo *PlaylistUpdateOne) ExecX(ctx context.Context)

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

func (*PlaylistUpdateOne) Mutation added in v1.0.0

func (puo *PlaylistUpdateOne) Mutation() *PlaylistMutation

Mutation returns the PlaylistMutation object of the builder.

func (*PlaylistUpdateOne) RemoveVodIDs added in v1.0.0

func (puo *PlaylistUpdateOne) RemoveVodIDs(ids ...uuid.UUID) *PlaylistUpdateOne

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*PlaylistUpdateOne) RemoveVods added in v1.0.0

func (puo *PlaylistUpdateOne) RemoveVods(v ...*Vod) *PlaylistUpdateOne

RemoveVods removes "vods" edges to Vod entities.

func (*PlaylistUpdateOne) Save added in v1.0.0

func (puo *PlaylistUpdateOne) Save(ctx context.Context) (*Playlist, error)

Save executes the query and returns the updated Playlist entity.

func (*PlaylistUpdateOne) SaveX added in v1.0.0

func (puo *PlaylistUpdateOne) SaveX(ctx context.Context) *Playlist

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

func (*PlaylistUpdateOne) Select added in v1.0.0

func (puo *PlaylistUpdateOne) Select(field string, fields ...string) *PlaylistUpdateOne

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

func (*PlaylistUpdateOne) SetDescription added in v1.0.0

func (puo *PlaylistUpdateOne) SetDescription(s string) *PlaylistUpdateOne

SetDescription sets the "description" field.

func (*PlaylistUpdateOne) SetName added in v1.0.0

func (puo *PlaylistUpdateOne) SetName(s string) *PlaylistUpdateOne

SetName sets the "name" field.

func (*PlaylistUpdateOne) SetNillableDescription added in v1.0.0

func (puo *PlaylistUpdateOne) SetNillableDescription(s *string) *PlaylistUpdateOne

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

func (*PlaylistUpdateOne) SetNillableThumbnailPath added in v1.0.0

func (puo *PlaylistUpdateOne) SetNillableThumbnailPath(s *string) *PlaylistUpdateOne

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*PlaylistUpdateOne) SetThumbnailPath added in v1.0.0

func (puo *PlaylistUpdateOne) SetThumbnailPath(s string) *PlaylistUpdateOne

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpdateOne) SetUpdatedAt added in v1.0.0

func (puo *PlaylistUpdateOne) SetUpdatedAt(t time.Time) *PlaylistUpdateOne

SetUpdatedAt sets the "updated_at" field.

type Playlists added in v1.0.0

type Playlists []*Playlist

Playlists is a parsable slice of Playlist.

type Policy

type Policy = ent.Policy

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 Queue

type Queue struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// LiveArchive holds the value of the "live_archive" field.
	LiveArchive bool `json:"live_archive,omitempty"`
	// OnHold holds the value of the "on_hold" field.
	OnHold bool `json:"on_hold,omitempty"`
	// VideoProcessing holds the value of the "video_processing" field.
	VideoProcessing bool `json:"video_processing,omitempty"`
	// ChatProcessing holds the value of the "chat_processing" field.
	ChatProcessing bool `json:"chat_processing,omitempty"`
	// Processing holds the value of the "processing" field.
	Processing bool `json:"processing,omitempty"`
	// TaskVodCreateFolder holds the value of the "task_vod_create_folder" field.
	TaskVodCreateFolder utils.TaskStatus `json:"task_vod_create_folder,omitempty"`
	// TaskVodDownloadThumbnail holds the value of the "task_vod_download_thumbnail" field.
	TaskVodDownloadThumbnail utils.TaskStatus `json:"task_vod_download_thumbnail,omitempty"`
	// TaskVodSaveInfo holds the value of the "task_vod_save_info" field.
	TaskVodSaveInfo utils.TaskStatus `json:"task_vod_save_info,omitempty"`
	// TaskVideoDownload holds the value of the "task_video_download" field.
	TaskVideoDownload utils.TaskStatus `json:"task_video_download,omitempty"`
	// TaskVideoConvert holds the value of the "task_video_convert" field.
	TaskVideoConvert utils.TaskStatus `json:"task_video_convert,omitempty"`
	// TaskVideoMove holds the value of the "task_video_move" field.
	TaskVideoMove utils.TaskStatus `json:"task_video_move,omitempty"`
	// TaskChatDownload holds the value of the "task_chat_download" field.
	TaskChatDownload utils.TaskStatus `json:"task_chat_download,omitempty"`
	// TaskChatConvert holds the value of the "task_chat_convert" field.
	TaskChatConvert utils.TaskStatus `json:"task_chat_convert,omitempty"`
	// TaskChatRender holds the value of the "task_chat_render" field.
	TaskChatRender utils.TaskStatus `json:"task_chat_render,omitempty"`
	// TaskChatMove holds the value of the "task_chat_move" field.
	TaskChatMove utils.TaskStatus `json:"task_chat_move,omitempty"`
	// ChatStart holds the value of the "chat_start" field.
	ChatStart time.Time `json:"chat_start,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the QueueQuery when eager-loading is set.
	Edges QueueEdges `json:"edges"`
	// contains filtered or unexported fields
}

Queue is the model entity for the Queue schema.

func (*Queue) QueryVod

func (q *Queue) QueryVod() *VodQuery

QueryVod queries the "vod" edge of the Queue entity.

func (*Queue) String

func (q *Queue) String() string

String implements the fmt.Stringer.

func (*Queue) Unwrap

func (q *Queue) Unwrap() *Queue

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

func (q *Queue) Update() *QueueUpdateOne

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

type QueueClient

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

QueueClient is a client for the Queue schema.

func NewQueueClient

func NewQueueClient(c config) *QueueClient

NewQueueClient returns a client for the Queue from the given config.

func (*QueueClient) Create

func (c *QueueClient) Create() *QueueCreate

Create returns a builder for creating a Queue entity.

func (*QueueClient) CreateBulk

func (c *QueueClient) CreateBulk(builders ...*QueueCreate) *QueueCreateBulk

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

func (*QueueClient) Delete

func (c *QueueClient) Delete() *QueueDelete

Delete returns a delete builder for Queue.

func (*QueueClient) DeleteOne

func (c *QueueClient) DeleteOne(q *Queue) *QueueDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*QueueClient) DeleteOneID

func (c *QueueClient) DeleteOneID(id uuid.UUID) *QueueDeleteOne

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

func (*QueueClient) Get

func (c *QueueClient) Get(ctx context.Context, id uuid.UUID) (*Queue, error)

Get returns a Queue entity by its id.

func (*QueueClient) GetX

func (c *QueueClient) GetX(ctx context.Context, id uuid.UUID) *Queue

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

func (*QueueClient) Hooks

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

Hooks returns the client hooks.

func (*QueueClient) Query

func (c *QueueClient) Query() *QueueQuery

Query returns a query builder for Queue.

func (*QueueClient) QueryVod

func (c *QueueClient) QueryVod(q *Queue) *VodQuery

QueryVod queries the vod edge of a Queue.

func (*QueueClient) Update

func (c *QueueClient) Update() *QueueUpdate

Update returns an update builder for Queue.

func (*QueueClient) UpdateOne

func (c *QueueClient) UpdateOne(q *Queue) *QueueUpdateOne

UpdateOne returns an update builder for the given entity.

func (*QueueClient) UpdateOneID

func (c *QueueClient) UpdateOneID(id uuid.UUID) *QueueUpdateOne

UpdateOneID returns an update builder for the given id.

func (*QueueClient) Use

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

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

type QueueCreate

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

QueueCreate is the builder for creating a Queue entity.

func (*QueueCreate) Exec

func (qc *QueueCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueCreate) ExecX

func (qc *QueueCreate) ExecX(ctx context.Context)

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

func (*QueueCreate) Mutation

func (qc *QueueCreate) Mutation() *QueueMutation

Mutation returns the QueueMutation object of the builder.

func (*QueueCreate) Save

func (qc *QueueCreate) Save(ctx context.Context) (*Queue, error)

Save creates the Queue in the database.

func (*QueueCreate) SaveX

func (qc *QueueCreate) SaveX(ctx context.Context) *Queue

SaveX calls Save and panics if Save returns an error.

func (*QueueCreate) SetChatProcessing

func (qc *QueueCreate) SetChatProcessing(b bool) *QueueCreate

SetChatProcessing sets the "chat_processing" field.

func (*QueueCreate) SetChatStart

func (qc *QueueCreate) SetChatStart(t time.Time) *QueueCreate

SetChatStart sets the "chat_start" field.

func (*QueueCreate) SetCreatedAt

func (qc *QueueCreate) SetCreatedAt(t time.Time) *QueueCreate

SetCreatedAt sets the "created_at" field.

func (*QueueCreate) SetID

func (qc *QueueCreate) SetID(u uuid.UUID) *QueueCreate

SetID sets the "id" field.

func (*QueueCreate) SetLiveArchive

func (qc *QueueCreate) SetLiveArchive(b bool) *QueueCreate

SetLiveArchive sets the "live_archive" field.

func (*QueueCreate) SetNillableChatProcessing

func (qc *QueueCreate) SetNillableChatProcessing(b *bool) *QueueCreate

SetNillableChatProcessing sets the "chat_processing" field if the given value is not nil.

func (*QueueCreate) SetNillableChatStart

func (qc *QueueCreate) SetNillableChatStart(t *time.Time) *QueueCreate

SetNillableChatStart sets the "chat_start" field if the given value is not nil.

func (*QueueCreate) SetNillableCreatedAt

func (qc *QueueCreate) SetNillableCreatedAt(t *time.Time) *QueueCreate

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

func (*QueueCreate) SetNillableID

func (qc *QueueCreate) SetNillableID(u *uuid.UUID) *QueueCreate

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

func (*QueueCreate) SetNillableLiveArchive

func (qc *QueueCreate) SetNillableLiveArchive(b *bool) *QueueCreate

SetNillableLiveArchive sets the "live_archive" field if the given value is not nil.

func (*QueueCreate) SetNillableOnHold

func (qc *QueueCreate) SetNillableOnHold(b *bool) *QueueCreate

SetNillableOnHold sets the "on_hold" field if the given value is not nil.

func (*QueueCreate) SetNillableProcessing

func (qc *QueueCreate) SetNillableProcessing(b *bool) *QueueCreate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatConvert

func (qc *QueueCreate) SetNillableTaskChatConvert(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatConvert sets the "task_chat_convert" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatDownload

func (qc *QueueCreate) SetNillableTaskChatDownload(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatDownload sets the "task_chat_download" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatMove

func (qc *QueueCreate) SetNillableTaskChatMove(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatMove sets the "task_chat_move" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatRender

func (qc *QueueCreate) SetNillableTaskChatRender(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatRender sets the "task_chat_render" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVideoConvert

func (qc *QueueCreate) SetNillableTaskVideoConvert(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVideoConvert sets the "task_video_convert" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVideoDownload

func (qc *QueueCreate) SetNillableTaskVideoDownload(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVideoDownload sets the "task_video_download" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVideoMove

func (qc *QueueCreate) SetNillableTaskVideoMove(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVideoMove sets the "task_video_move" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVodCreateFolder

func (qc *QueueCreate) SetNillableTaskVodCreateFolder(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVodCreateFolder sets the "task_vod_create_folder" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVodDownloadThumbnail

func (qc *QueueCreate) SetNillableTaskVodDownloadThumbnail(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVodSaveInfo

func (qc *QueueCreate) SetNillableTaskVodSaveInfo(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVodSaveInfo sets the "task_vod_save_info" field if the given value is not nil.

func (*QueueCreate) SetNillableUpdatedAt

func (qc *QueueCreate) SetNillableUpdatedAt(t *time.Time) *QueueCreate

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

func (*QueueCreate) SetNillableVideoProcessing

func (qc *QueueCreate) SetNillableVideoProcessing(b *bool) *QueueCreate

SetNillableVideoProcessing sets the "video_processing" field if the given value is not nil.

func (*QueueCreate) SetOnHold

func (qc *QueueCreate) SetOnHold(b bool) *QueueCreate

SetOnHold sets the "on_hold" field.

func (*QueueCreate) SetProcessing

func (qc *QueueCreate) SetProcessing(b bool) *QueueCreate

SetProcessing sets the "processing" field.

func (*QueueCreate) SetTaskChatConvert

func (qc *QueueCreate) SetTaskChatConvert(us utils.TaskStatus) *QueueCreate

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueCreate) SetTaskChatDownload

func (qc *QueueCreate) SetTaskChatDownload(us utils.TaskStatus) *QueueCreate

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueCreate) SetTaskChatMove

func (qc *QueueCreate) SetTaskChatMove(us utils.TaskStatus) *QueueCreate

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueCreate) SetTaskChatRender

func (qc *QueueCreate) SetTaskChatRender(us utils.TaskStatus) *QueueCreate

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueCreate) SetTaskVideoConvert

func (qc *QueueCreate) SetTaskVideoConvert(us utils.TaskStatus) *QueueCreate

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueCreate) SetTaskVideoDownload

func (qc *QueueCreate) SetTaskVideoDownload(us utils.TaskStatus) *QueueCreate

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueCreate) SetTaskVideoMove

func (qc *QueueCreate) SetTaskVideoMove(us utils.TaskStatus) *QueueCreate

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueCreate) SetTaskVodCreateFolder

func (qc *QueueCreate) SetTaskVodCreateFolder(us utils.TaskStatus) *QueueCreate

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueCreate) SetTaskVodDownloadThumbnail

func (qc *QueueCreate) SetTaskVodDownloadThumbnail(us utils.TaskStatus) *QueueCreate

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueCreate) SetTaskVodSaveInfo

func (qc *QueueCreate) SetTaskVodSaveInfo(us utils.TaskStatus) *QueueCreate

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueCreate) SetUpdatedAt

func (qc *QueueCreate) SetUpdatedAt(t time.Time) *QueueCreate

SetUpdatedAt sets the "updated_at" field.

func (*QueueCreate) SetVideoProcessing

func (qc *QueueCreate) SetVideoProcessing(b bool) *QueueCreate

SetVideoProcessing sets the "video_processing" field.

func (*QueueCreate) SetVod

func (qc *QueueCreate) SetVod(v *Vod) *QueueCreate

SetVod sets the "vod" edge to the Vod entity.

func (*QueueCreate) SetVodID

func (qc *QueueCreate) SetVodID(id uuid.UUID) *QueueCreate

SetVodID sets the "vod" edge to the Vod entity by ID.

type QueueCreateBulk

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

QueueCreateBulk is the builder for creating many Queue entities in bulk.

func (*QueueCreateBulk) Exec

func (qcb *QueueCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueCreateBulk) ExecX

func (qcb *QueueCreateBulk) ExecX(ctx context.Context)

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

func (*QueueCreateBulk) Save

func (qcb *QueueCreateBulk) Save(ctx context.Context) ([]*Queue, error)

Save creates the Queue entities in the database.

func (*QueueCreateBulk) SaveX

func (qcb *QueueCreateBulk) SaveX(ctx context.Context) []*Queue

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

type QueueDelete

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

QueueDelete is the builder for deleting a Queue entity.

func (*QueueDelete) Exec

func (qd *QueueDelete) Exec(ctx context.Context) (int, error)

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

func (*QueueDelete) ExecX

func (qd *QueueDelete) ExecX(ctx context.Context) int

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

func (*QueueDelete) Where

func (qd *QueueDelete) Where(ps ...predicate.Queue) *QueueDelete

Where appends a list predicates to the QueueDelete builder.

type QueueDeleteOne

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

QueueDeleteOne is the builder for deleting a single Queue entity.

func (*QueueDeleteOne) Exec

func (qdo *QueueDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*QueueDeleteOne) ExecX

func (qdo *QueueDeleteOne) ExecX(ctx context.Context)

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

type QueueEdges

type QueueEdges struct {
	// Vod holds the value of the vod edge.
	Vod *Vod `json:"vod,omitempty"`
	// contains filtered or unexported fields
}

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

func (QueueEdges) VodOrErr

func (e QueueEdges) VodOrErr() (*Vod, error)

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

type QueueGroupBy

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

QueueGroupBy is the group-by builder for Queue entities.

func (*QueueGroupBy) Aggregate

func (qgb *QueueGroupBy) Aggregate(fns ...AggregateFunc) *QueueGroupBy

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

func (*QueueGroupBy) Bool

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

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

func (*QueueGroupBy) BoolX

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

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

func (*QueueGroupBy) Bools

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

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

func (*QueueGroupBy) BoolsX

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

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

func (*QueueGroupBy) Float64

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

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

func (*QueueGroupBy) Float64X

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

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

func (*QueueGroupBy) Float64s

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

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

func (*QueueGroupBy) Float64sX

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

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

func (*QueueGroupBy) Int

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

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

func (*QueueGroupBy) IntX

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

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

func (*QueueGroupBy) Ints

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

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

func (*QueueGroupBy) IntsX

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

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

func (*QueueGroupBy) Scan

func (qgb *QueueGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*QueueGroupBy) ScanX

func (s *QueueGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*QueueGroupBy) String

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

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

func (*QueueGroupBy) StringX

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

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

func (*QueueGroupBy) Strings

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

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

func (*QueueGroupBy) StringsX

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

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

type QueueMutation

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

QueueMutation represents an operation that mutates the Queue nodes in the graph.

func (*QueueMutation) AddField

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

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

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

func (*QueueMutation) AddedField

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

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

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

func (*QueueMutation) AddedIDs

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

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

func (*QueueMutation) ChatProcessing

func (m *QueueMutation) ChatProcessing() (r bool, exists bool)

ChatProcessing returns the value of the "chat_processing" field in the mutation.

func (*QueueMutation) ChatStart

func (m *QueueMutation) ChatStart() (r time.Time, exists bool)

ChatStart returns the value of the "chat_start" field in the mutation.

func (*QueueMutation) ChatStartCleared

func (m *QueueMutation) ChatStartCleared() bool

ChatStartCleared returns if the "chat_start" field was cleared in this mutation.

func (*QueueMutation) ClearChatStart

func (m *QueueMutation) ClearChatStart()

ClearChatStart clears the value of the "chat_start" field.

func (*QueueMutation) ClearEdge

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

func (m *QueueMutation) 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 (*QueueMutation) ClearTaskChatConvert

func (m *QueueMutation) ClearTaskChatConvert()

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueMutation) ClearTaskChatDownload

func (m *QueueMutation) ClearTaskChatDownload()

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueMutation) ClearTaskChatMove

func (m *QueueMutation) ClearTaskChatMove()

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueMutation) ClearTaskChatRender

func (m *QueueMutation) ClearTaskChatRender()

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueMutation) ClearTaskVideoConvert

func (m *QueueMutation) ClearTaskVideoConvert()

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueMutation) ClearTaskVideoDownload

func (m *QueueMutation) ClearTaskVideoDownload()

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueMutation) ClearTaskVideoMove

func (m *QueueMutation) ClearTaskVideoMove()

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueMutation) ClearTaskVodCreateFolder

func (m *QueueMutation) ClearTaskVodCreateFolder()

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueMutation) ClearTaskVodDownloadThumbnail

func (m *QueueMutation) ClearTaskVodDownloadThumbnail()

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueMutation) ClearTaskVodSaveInfo

func (m *QueueMutation) ClearTaskVodSaveInfo()

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueMutation) ClearVod

func (m *QueueMutation) ClearVod()

ClearVod clears the "vod" edge to the Vod entity.

func (*QueueMutation) ClearedEdges

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

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

func (*QueueMutation) ClearedFields

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

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

func (QueueMutation) Client

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

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

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

func (*QueueMutation) EdgeCleared

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

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

func (*QueueMutation) Field

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

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

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

func (*QueueMutation) Fields

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

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

func (m *QueueMutation) 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 (*QueueMutation) LiveArchive

func (m *QueueMutation) LiveArchive() (r bool, exists bool)

LiveArchive returns the value of the "live_archive" field in the mutation.

func (*QueueMutation) OldChatProcessing

func (m *QueueMutation) OldChatProcessing(ctx context.Context) (v bool, err error)

OldChatProcessing returns the old "chat_processing" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldChatStart

func (m *QueueMutation) OldChatStart(ctx context.Context) (v time.Time, err error)

OldChatStart returns the old "chat_start" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldCreatedAt

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

OldCreatedAt returns the old "created_at" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldField

func (m *QueueMutation) 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 (*QueueMutation) OldLiveArchive

func (m *QueueMutation) OldLiveArchive(ctx context.Context) (v bool, err error)

OldLiveArchive returns the old "live_archive" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldOnHold

func (m *QueueMutation) OldOnHold(ctx context.Context) (v bool, err error)

OldOnHold returns the old "on_hold" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldProcessing

func (m *QueueMutation) OldProcessing(ctx context.Context) (v bool, err error)

OldProcessing returns the old "processing" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskChatConvert

func (m *QueueMutation) OldTaskChatConvert(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatConvert returns the old "task_chat_convert" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskChatDownload

func (m *QueueMutation) OldTaskChatDownload(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatDownload returns the old "task_chat_download" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskChatMove

func (m *QueueMutation) OldTaskChatMove(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatMove returns the old "task_chat_move" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskChatRender

func (m *QueueMutation) OldTaskChatRender(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatRender returns the old "task_chat_render" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskVideoConvert

func (m *QueueMutation) OldTaskVideoConvert(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVideoConvert returns the old "task_video_convert" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskVideoDownload

func (m *QueueMutation) OldTaskVideoDownload(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVideoDownload returns the old "task_video_download" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskVideoMove

func (m *QueueMutation) OldTaskVideoMove(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVideoMove returns the old "task_video_move" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskVodCreateFolder

func (m *QueueMutation) OldTaskVodCreateFolder(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVodCreateFolder returns the old "task_vod_create_folder" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskVodDownloadThumbnail

func (m *QueueMutation) OldTaskVodDownloadThumbnail(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVodDownloadThumbnail returns the old "task_vod_download_thumbnail" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldTaskVodSaveInfo

func (m *QueueMutation) OldTaskVodSaveInfo(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVodSaveInfo returns the old "task_vod_save_info" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldUpdatedAt

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

OldUpdatedAt returns the old "updated_at" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OldVideoProcessing

func (m *QueueMutation) OldVideoProcessing(ctx context.Context) (v bool, err error)

OldVideoProcessing returns the old "video_processing" field's value of the Queue entity. If the Queue 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 (*QueueMutation) OnHold

func (m *QueueMutation) OnHold() (r bool, exists bool)

OnHold returns the value of the "on_hold" field in the mutation.

func (*QueueMutation) Op

func (m *QueueMutation) Op() Op

Op returns the operation name.

func (*QueueMutation) Processing

func (m *QueueMutation) Processing() (r bool, exists bool)

Processing returns the value of the "processing" field in the mutation.

func (*QueueMutation) RemovedEdges

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

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

func (*QueueMutation) RemovedIDs

func (m *QueueMutation) 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 (*QueueMutation) ResetChatProcessing

func (m *QueueMutation) ResetChatProcessing()

ResetChatProcessing resets all changes to the "chat_processing" field.

func (*QueueMutation) ResetChatStart

func (m *QueueMutation) ResetChatStart()

ResetChatStart resets all changes to the "chat_start" field.

func (*QueueMutation) ResetCreatedAt

func (m *QueueMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*QueueMutation) ResetEdge

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

func (m *QueueMutation) 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 (*QueueMutation) ResetLiveArchive

func (m *QueueMutation) ResetLiveArchive()

ResetLiveArchive resets all changes to the "live_archive" field.

func (*QueueMutation) ResetOnHold

func (m *QueueMutation) ResetOnHold()

ResetOnHold resets all changes to the "on_hold" field.

func (*QueueMutation) ResetProcessing

func (m *QueueMutation) ResetProcessing()

ResetProcessing resets all changes to the "processing" field.

func (*QueueMutation) ResetTaskChatConvert

func (m *QueueMutation) ResetTaskChatConvert()

ResetTaskChatConvert resets all changes to the "task_chat_convert" field.

func (*QueueMutation) ResetTaskChatDownload

func (m *QueueMutation) ResetTaskChatDownload()

ResetTaskChatDownload resets all changes to the "task_chat_download" field.

func (*QueueMutation) ResetTaskChatMove

func (m *QueueMutation) ResetTaskChatMove()

ResetTaskChatMove resets all changes to the "task_chat_move" field.

func (*QueueMutation) ResetTaskChatRender

func (m *QueueMutation) ResetTaskChatRender()

ResetTaskChatRender resets all changes to the "task_chat_render" field.

func (*QueueMutation) ResetTaskVideoConvert

func (m *QueueMutation) ResetTaskVideoConvert()

ResetTaskVideoConvert resets all changes to the "task_video_convert" field.

func (*QueueMutation) ResetTaskVideoDownload

func (m *QueueMutation) ResetTaskVideoDownload()

ResetTaskVideoDownload resets all changes to the "task_video_download" field.

func (*QueueMutation) ResetTaskVideoMove

func (m *QueueMutation) ResetTaskVideoMove()

ResetTaskVideoMove resets all changes to the "task_video_move" field.

func (*QueueMutation) ResetTaskVodCreateFolder

func (m *QueueMutation) ResetTaskVodCreateFolder()

ResetTaskVodCreateFolder resets all changes to the "task_vod_create_folder" field.

func (*QueueMutation) ResetTaskVodDownloadThumbnail

func (m *QueueMutation) ResetTaskVodDownloadThumbnail()

ResetTaskVodDownloadThumbnail resets all changes to the "task_vod_download_thumbnail" field.

func (*QueueMutation) ResetTaskVodSaveInfo

func (m *QueueMutation) ResetTaskVodSaveInfo()

ResetTaskVodSaveInfo resets all changes to the "task_vod_save_info" field.

func (*QueueMutation) ResetUpdatedAt

func (m *QueueMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*QueueMutation) ResetVideoProcessing

func (m *QueueMutation) ResetVideoProcessing()

ResetVideoProcessing resets all changes to the "video_processing" field.

func (*QueueMutation) ResetVod

func (m *QueueMutation) ResetVod()

ResetVod resets all changes to the "vod" edge.

func (*QueueMutation) SetChatProcessing

func (m *QueueMutation) SetChatProcessing(b bool)

SetChatProcessing sets the "chat_processing" field.

func (*QueueMutation) SetChatStart

func (m *QueueMutation) SetChatStart(t time.Time)

SetChatStart sets the "chat_start" field.

func (*QueueMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*QueueMutation) SetField

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

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

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

func (*QueueMutation) SetLiveArchive

func (m *QueueMutation) SetLiveArchive(b bool)

SetLiveArchive sets the "live_archive" field.

func (*QueueMutation) SetOnHold

func (m *QueueMutation) SetOnHold(b bool)

SetOnHold sets the "on_hold" field.

func (*QueueMutation) SetProcessing

func (m *QueueMutation) SetProcessing(b bool)

SetProcessing sets the "processing" field.

func (*QueueMutation) SetTaskChatConvert

func (m *QueueMutation) SetTaskChatConvert(us utils.TaskStatus)

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueMutation) SetTaskChatDownload

func (m *QueueMutation) SetTaskChatDownload(us utils.TaskStatus)

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueMutation) SetTaskChatMove

func (m *QueueMutation) SetTaskChatMove(us utils.TaskStatus)

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueMutation) SetTaskChatRender

func (m *QueueMutation) SetTaskChatRender(us utils.TaskStatus)

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueMutation) SetTaskVideoConvert

func (m *QueueMutation) SetTaskVideoConvert(us utils.TaskStatus)

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueMutation) SetTaskVideoDownload

func (m *QueueMutation) SetTaskVideoDownload(us utils.TaskStatus)

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueMutation) SetTaskVideoMove

func (m *QueueMutation) SetTaskVideoMove(us utils.TaskStatus)

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueMutation) SetTaskVodCreateFolder

func (m *QueueMutation) SetTaskVodCreateFolder(us utils.TaskStatus)

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueMutation) SetTaskVodDownloadThumbnail

func (m *QueueMutation) SetTaskVodDownloadThumbnail(us utils.TaskStatus)

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueMutation) SetTaskVodSaveInfo

func (m *QueueMutation) SetTaskVodSaveInfo(us utils.TaskStatus)

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*QueueMutation) SetVideoProcessing

func (m *QueueMutation) SetVideoProcessing(b bool)

SetVideoProcessing sets the "video_processing" field.

func (*QueueMutation) SetVodID

func (m *QueueMutation) SetVodID(id uuid.UUID)

SetVodID sets the "vod" edge to the Vod entity by id.

func (*QueueMutation) TaskChatConvert

func (m *QueueMutation) TaskChatConvert() (r utils.TaskStatus, exists bool)

TaskChatConvert returns the value of the "task_chat_convert" field in the mutation.

func (*QueueMutation) TaskChatConvertCleared

func (m *QueueMutation) TaskChatConvertCleared() bool

TaskChatConvertCleared returns if the "task_chat_convert" field was cleared in this mutation.

func (*QueueMutation) TaskChatDownload

func (m *QueueMutation) TaskChatDownload() (r utils.TaskStatus, exists bool)

TaskChatDownload returns the value of the "task_chat_download" field in the mutation.

func (*QueueMutation) TaskChatDownloadCleared

func (m *QueueMutation) TaskChatDownloadCleared() bool

TaskChatDownloadCleared returns if the "task_chat_download" field was cleared in this mutation.

func (*QueueMutation) TaskChatMove

func (m *QueueMutation) TaskChatMove() (r utils.TaskStatus, exists bool)

TaskChatMove returns the value of the "task_chat_move" field in the mutation.

func (*QueueMutation) TaskChatMoveCleared

func (m *QueueMutation) TaskChatMoveCleared() bool

TaskChatMoveCleared returns if the "task_chat_move" field was cleared in this mutation.

func (*QueueMutation) TaskChatRender

func (m *QueueMutation) TaskChatRender() (r utils.TaskStatus, exists bool)

TaskChatRender returns the value of the "task_chat_render" field in the mutation.

func (*QueueMutation) TaskChatRenderCleared

func (m *QueueMutation) TaskChatRenderCleared() bool

TaskChatRenderCleared returns if the "task_chat_render" field was cleared in this mutation.

func (*QueueMutation) TaskVideoConvert

func (m *QueueMutation) TaskVideoConvert() (r utils.TaskStatus, exists bool)

TaskVideoConvert returns the value of the "task_video_convert" field in the mutation.

func (*QueueMutation) TaskVideoConvertCleared

func (m *QueueMutation) TaskVideoConvertCleared() bool

TaskVideoConvertCleared returns if the "task_video_convert" field was cleared in this mutation.

func (*QueueMutation) TaskVideoDownload

func (m *QueueMutation) TaskVideoDownload() (r utils.TaskStatus, exists bool)

TaskVideoDownload returns the value of the "task_video_download" field in the mutation.

func (*QueueMutation) TaskVideoDownloadCleared

func (m *QueueMutation) TaskVideoDownloadCleared() bool

TaskVideoDownloadCleared returns if the "task_video_download" field was cleared in this mutation.

func (*QueueMutation) TaskVideoMove

func (m *QueueMutation) TaskVideoMove() (r utils.TaskStatus, exists bool)

TaskVideoMove returns the value of the "task_video_move" field in the mutation.

func (*QueueMutation) TaskVideoMoveCleared

func (m *QueueMutation) TaskVideoMoveCleared() bool

TaskVideoMoveCleared returns if the "task_video_move" field was cleared in this mutation.

func (*QueueMutation) TaskVodCreateFolder

func (m *QueueMutation) TaskVodCreateFolder() (r utils.TaskStatus, exists bool)

TaskVodCreateFolder returns the value of the "task_vod_create_folder" field in the mutation.

func (*QueueMutation) TaskVodCreateFolderCleared

func (m *QueueMutation) TaskVodCreateFolderCleared() bool

TaskVodCreateFolderCleared returns if the "task_vod_create_folder" field was cleared in this mutation.

func (*QueueMutation) TaskVodDownloadThumbnail

func (m *QueueMutation) TaskVodDownloadThumbnail() (r utils.TaskStatus, exists bool)

TaskVodDownloadThumbnail returns the value of the "task_vod_download_thumbnail" field in the mutation.

func (*QueueMutation) TaskVodDownloadThumbnailCleared

func (m *QueueMutation) TaskVodDownloadThumbnailCleared() bool

TaskVodDownloadThumbnailCleared returns if the "task_vod_download_thumbnail" field was cleared in this mutation.

func (*QueueMutation) TaskVodSaveInfo

func (m *QueueMutation) TaskVodSaveInfo() (r utils.TaskStatus, exists bool)

TaskVodSaveInfo returns the value of the "task_vod_save_info" field in the mutation.

func (*QueueMutation) TaskVodSaveInfoCleared

func (m *QueueMutation) TaskVodSaveInfoCleared() bool

TaskVodSaveInfoCleared returns if the "task_vod_save_info" field was cleared in this mutation.

func (QueueMutation) Tx

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

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

func (*QueueMutation) Type

func (m *QueueMutation) Type() string

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

func (*QueueMutation) UpdatedAt

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

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

func (*QueueMutation) VideoProcessing

func (m *QueueMutation) VideoProcessing() (r bool, exists bool)

VideoProcessing returns the value of the "video_processing" field in the mutation.

func (*QueueMutation) VodCleared

func (m *QueueMutation) VodCleared() bool

VodCleared reports if the "vod" edge to the Vod entity was cleared.

func (*QueueMutation) VodID

func (m *QueueMutation) VodID() (id uuid.UUID, exists bool)

VodID returns the "vod" edge ID in the mutation.

func (*QueueMutation) VodIDs

func (m *QueueMutation) VodIDs() (ids []uuid.UUID)

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

func (*QueueMutation) Where

func (m *QueueMutation) Where(ps ...predicate.Queue)

Where appends a list predicates to the QueueMutation builder.

type QueueQuery

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

QueueQuery is the builder for querying Queue entities.

func (*QueueQuery) All

func (qq *QueueQuery) All(ctx context.Context) ([]*Queue, error)

All executes the query and returns a list of Queues.

func (*QueueQuery) AllX

func (qq *QueueQuery) AllX(ctx context.Context) []*Queue

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

func (*QueueQuery) Clone

func (qq *QueueQuery) Clone() *QueueQuery

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

func (*QueueQuery) Count

func (qq *QueueQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*QueueQuery) CountX

func (qq *QueueQuery) CountX(ctx context.Context) int

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

func (*QueueQuery) Exist

func (qq *QueueQuery) Exist(ctx context.Context) (bool, error)

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

func (*QueueQuery) ExistX

func (qq *QueueQuery) ExistX(ctx context.Context) bool

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

func (*QueueQuery) First

func (qq *QueueQuery) First(ctx context.Context) (*Queue, error)

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

func (*QueueQuery) FirstID

func (qq *QueueQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*QueueQuery) FirstIDX

func (qq *QueueQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*QueueQuery) FirstX

func (qq *QueueQuery) FirstX(ctx context.Context) *Queue

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

func (*QueueQuery) GroupBy

func (qq *QueueQuery) GroupBy(field string, fields ...string) *QueueGroupBy

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 {
	LiveArchive bool `json:"live_archive,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Queue.Query().
	GroupBy(queue.FieldLiveArchive).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*QueueQuery) IDs

func (qq *QueueQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*QueueQuery) IDsX

func (qq *QueueQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*QueueQuery) Limit

func (qq *QueueQuery) Limit(limit int) *QueueQuery

Limit adds a limit step to the query.

func (*QueueQuery) Offset

func (qq *QueueQuery) Offset(offset int) *QueueQuery

Offset adds an offset step to the query.

func (*QueueQuery) Only

func (qq *QueueQuery) Only(ctx context.Context) (*Queue, error)

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

func (*QueueQuery) OnlyID

func (qq *QueueQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*QueueQuery) OnlyIDX

func (qq *QueueQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*QueueQuery) OnlyX

func (qq *QueueQuery) OnlyX(ctx context.Context) *Queue

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

func (*QueueQuery) Order

func (qq *QueueQuery) Order(o ...OrderFunc) *QueueQuery

Order adds an order step to the query.

func (*QueueQuery) QueryVod

func (qq *QueueQuery) QueryVod() *VodQuery

QueryVod chains the current query on the "vod" edge.

func (*QueueQuery) Select

func (qq *QueueQuery) Select(fields ...string) *QueueSelect

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 {
	LiveArchive bool `json:"live_archive,omitempty"`
}

client.Queue.Query().
	Select(queue.FieldLiveArchive).
	Scan(ctx, &v)

func (*QueueQuery) Unique

func (qq *QueueQuery) Unique(unique bool) *QueueQuery

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

func (qq *QueueQuery) Where(ps ...predicate.Queue) *QueueQuery

Where adds a new predicate for the QueueQuery builder.

func (*QueueQuery) WithVod

func (qq *QueueQuery) WithVod(opts ...func(*VodQuery)) *QueueQuery

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

type QueueSelect

type QueueSelect struct {
	*QueueQuery
	// contains filtered or unexported fields
}

QueueSelect is the builder for selecting fields of Queue entities.

func (*QueueSelect) Bool

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

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

func (*QueueSelect) BoolX

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

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

func (*QueueSelect) Bools

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

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

func (*QueueSelect) BoolsX

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

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

func (*QueueSelect) Float64

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

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

func (*QueueSelect) Float64X

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

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

func (*QueueSelect) Float64s

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

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

func (*QueueSelect) Float64sX

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

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

func (*QueueSelect) Int

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

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

func (*QueueSelect) IntX

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

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

func (*QueueSelect) Ints

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

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

func (*QueueSelect) IntsX

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

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

func (*QueueSelect) Scan

func (qs *QueueSelect) Scan(ctx context.Context, v interface{}) error

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

func (*QueueSelect) ScanX

func (s *QueueSelect) ScanX(ctx context.Context, v interface{})

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

func (*QueueSelect) String

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

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

func (*QueueSelect) StringX

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

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

func (*QueueSelect) Strings

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

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

func (*QueueSelect) StringsX

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

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

type QueueUpdate

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

QueueUpdate is the builder for updating Queue entities.

func (*QueueUpdate) ClearChatStart

func (qu *QueueUpdate) ClearChatStart() *QueueUpdate

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpdate) ClearTaskChatConvert

func (qu *QueueUpdate) ClearTaskChatConvert() *QueueUpdate

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpdate) ClearTaskChatDownload

func (qu *QueueUpdate) ClearTaskChatDownload() *QueueUpdate

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpdate) ClearTaskChatMove

func (qu *QueueUpdate) ClearTaskChatMove() *QueueUpdate

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpdate) ClearTaskChatRender

func (qu *QueueUpdate) ClearTaskChatRender() *QueueUpdate

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpdate) ClearTaskVideoConvert

func (qu *QueueUpdate) ClearTaskVideoConvert() *QueueUpdate

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpdate) ClearTaskVideoDownload

func (qu *QueueUpdate) ClearTaskVideoDownload() *QueueUpdate

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpdate) ClearTaskVideoMove

func (qu *QueueUpdate) ClearTaskVideoMove() *QueueUpdate

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpdate) ClearTaskVodCreateFolder

func (qu *QueueUpdate) ClearTaskVodCreateFolder() *QueueUpdate

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpdate) ClearTaskVodDownloadThumbnail

func (qu *QueueUpdate) ClearTaskVodDownloadThumbnail() *QueueUpdate

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpdate) ClearTaskVodSaveInfo

func (qu *QueueUpdate) ClearTaskVodSaveInfo() *QueueUpdate

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpdate) ClearVod

func (qu *QueueUpdate) ClearVod() *QueueUpdate

ClearVod clears the "vod" edge to the Vod entity.

func (*QueueUpdate) Exec

func (qu *QueueUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueUpdate) ExecX

func (qu *QueueUpdate) ExecX(ctx context.Context)

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

func (*QueueUpdate) Mutation

func (qu *QueueUpdate) Mutation() *QueueMutation

Mutation returns the QueueMutation object of the builder.

func (*QueueUpdate) Save

func (qu *QueueUpdate) Save(ctx context.Context) (int, error)

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

func (*QueueUpdate) SaveX

func (qu *QueueUpdate) SaveX(ctx context.Context) int

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

func (*QueueUpdate) SetChatProcessing

func (qu *QueueUpdate) SetChatProcessing(b bool) *QueueUpdate

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpdate) SetChatStart

func (qu *QueueUpdate) SetChatStart(t time.Time) *QueueUpdate

SetChatStart sets the "chat_start" field.

func (*QueueUpdate) SetLiveArchive

func (qu *QueueUpdate) SetLiveArchive(b bool) *QueueUpdate

SetLiveArchive sets the "live_archive" field.

func (*QueueUpdate) SetNillableChatProcessing

func (qu *QueueUpdate) SetNillableChatProcessing(b *bool) *QueueUpdate

SetNillableChatProcessing sets the "chat_processing" field if the given value is not nil.

func (*QueueUpdate) SetNillableChatStart

func (qu *QueueUpdate) SetNillableChatStart(t *time.Time) *QueueUpdate

SetNillableChatStart sets the "chat_start" field if the given value is not nil.

func (*QueueUpdate) SetNillableLiveArchive

func (qu *QueueUpdate) SetNillableLiveArchive(b *bool) *QueueUpdate

SetNillableLiveArchive sets the "live_archive" field if the given value is not nil.

func (*QueueUpdate) SetNillableOnHold

func (qu *QueueUpdate) SetNillableOnHold(b *bool) *QueueUpdate

SetNillableOnHold sets the "on_hold" field if the given value is not nil.

func (*QueueUpdate) SetNillableProcessing

func (qu *QueueUpdate) SetNillableProcessing(b *bool) *QueueUpdate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatConvert

func (qu *QueueUpdate) SetNillableTaskChatConvert(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatConvert sets the "task_chat_convert" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatDownload

func (qu *QueueUpdate) SetNillableTaskChatDownload(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatDownload sets the "task_chat_download" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatMove

func (qu *QueueUpdate) SetNillableTaskChatMove(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatMove sets the "task_chat_move" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatRender

func (qu *QueueUpdate) SetNillableTaskChatRender(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatRender sets the "task_chat_render" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVideoConvert

func (qu *QueueUpdate) SetNillableTaskVideoConvert(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVideoConvert sets the "task_video_convert" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVideoDownload

func (qu *QueueUpdate) SetNillableTaskVideoDownload(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVideoDownload sets the "task_video_download" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVideoMove

func (qu *QueueUpdate) SetNillableTaskVideoMove(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVideoMove sets the "task_video_move" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVodCreateFolder

func (qu *QueueUpdate) SetNillableTaskVodCreateFolder(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVodCreateFolder sets the "task_vod_create_folder" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVodDownloadThumbnail

func (qu *QueueUpdate) SetNillableTaskVodDownloadThumbnail(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVodSaveInfo

func (qu *QueueUpdate) SetNillableTaskVodSaveInfo(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVodSaveInfo sets the "task_vod_save_info" field if the given value is not nil.

func (*QueueUpdate) SetNillableVideoProcessing

func (qu *QueueUpdate) SetNillableVideoProcessing(b *bool) *QueueUpdate

SetNillableVideoProcessing sets the "video_processing" field if the given value is not nil.

func (*QueueUpdate) SetOnHold

func (qu *QueueUpdate) SetOnHold(b bool) *QueueUpdate

SetOnHold sets the "on_hold" field.

func (*QueueUpdate) SetProcessing

func (qu *QueueUpdate) SetProcessing(b bool) *QueueUpdate

SetProcessing sets the "processing" field.

func (*QueueUpdate) SetTaskChatConvert

func (qu *QueueUpdate) SetTaskChatConvert(us utils.TaskStatus) *QueueUpdate

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpdate) SetTaskChatDownload

func (qu *QueueUpdate) SetTaskChatDownload(us utils.TaskStatus) *QueueUpdate

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpdate) SetTaskChatMove

func (qu *QueueUpdate) SetTaskChatMove(us utils.TaskStatus) *QueueUpdate

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpdate) SetTaskChatRender

func (qu *QueueUpdate) SetTaskChatRender(us utils.TaskStatus) *QueueUpdate

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpdate) SetTaskVideoConvert

func (qu *QueueUpdate) SetTaskVideoConvert(us utils.TaskStatus) *QueueUpdate

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpdate) SetTaskVideoDownload

func (qu *QueueUpdate) SetTaskVideoDownload(us utils.TaskStatus) *QueueUpdate

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpdate) SetTaskVideoMove

func (qu *QueueUpdate) SetTaskVideoMove(us utils.TaskStatus) *QueueUpdate

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpdate) SetTaskVodCreateFolder

func (qu *QueueUpdate) SetTaskVodCreateFolder(us utils.TaskStatus) *QueueUpdate

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpdate) SetTaskVodDownloadThumbnail

func (qu *QueueUpdate) SetTaskVodDownloadThumbnail(us utils.TaskStatus) *QueueUpdate

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpdate) SetTaskVodSaveInfo

func (qu *QueueUpdate) SetTaskVodSaveInfo(us utils.TaskStatus) *QueueUpdate

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpdate) SetUpdatedAt

func (qu *QueueUpdate) SetUpdatedAt(t time.Time) *QueueUpdate

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpdate) SetVideoProcessing

func (qu *QueueUpdate) SetVideoProcessing(b bool) *QueueUpdate

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpdate) SetVod

func (qu *QueueUpdate) SetVod(v *Vod) *QueueUpdate

SetVod sets the "vod" edge to the Vod entity.

func (*QueueUpdate) SetVodID

func (qu *QueueUpdate) SetVodID(id uuid.UUID) *QueueUpdate

SetVodID sets the "vod" edge to the Vod entity by ID.

func (*QueueUpdate) Where

func (qu *QueueUpdate) Where(ps ...predicate.Queue) *QueueUpdate

Where appends a list predicates to the QueueUpdate builder.

type QueueUpdateOne

type QueueUpdateOne struct {
	// contains filtered or unexported fields
}

QueueUpdateOne is the builder for updating a single Queue entity.

func (*QueueUpdateOne) ClearChatStart

func (quo *QueueUpdateOne) ClearChatStart() *QueueUpdateOne

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpdateOne) ClearTaskChatConvert

func (quo *QueueUpdateOne) ClearTaskChatConvert() *QueueUpdateOne

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpdateOne) ClearTaskChatDownload

func (quo *QueueUpdateOne) ClearTaskChatDownload() *QueueUpdateOne

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpdateOne) ClearTaskChatMove

func (quo *QueueUpdateOne) ClearTaskChatMove() *QueueUpdateOne

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpdateOne) ClearTaskChatRender

func (quo *QueueUpdateOne) ClearTaskChatRender() *QueueUpdateOne

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpdateOne) ClearTaskVideoConvert

func (quo *QueueUpdateOne) ClearTaskVideoConvert() *QueueUpdateOne

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpdateOne) ClearTaskVideoDownload

func (quo *QueueUpdateOne) ClearTaskVideoDownload() *QueueUpdateOne

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpdateOne) ClearTaskVideoMove

func (quo *QueueUpdateOne) ClearTaskVideoMove() *QueueUpdateOne

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpdateOne) ClearTaskVodCreateFolder

func (quo *QueueUpdateOne) ClearTaskVodCreateFolder() *QueueUpdateOne

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpdateOne) ClearTaskVodDownloadThumbnail

func (quo *QueueUpdateOne) ClearTaskVodDownloadThumbnail() *QueueUpdateOne

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpdateOne) ClearTaskVodSaveInfo

func (quo *QueueUpdateOne) ClearTaskVodSaveInfo() *QueueUpdateOne

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpdateOne) ClearVod

func (quo *QueueUpdateOne) ClearVod() *QueueUpdateOne

ClearVod clears the "vod" edge to the Vod entity.

func (*QueueUpdateOne) Exec

func (quo *QueueUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*QueueUpdateOne) ExecX

func (quo *QueueUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueUpdateOne) Mutation

func (quo *QueueUpdateOne) Mutation() *QueueMutation

Mutation returns the QueueMutation object of the builder.

func (*QueueUpdateOne) Save

func (quo *QueueUpdateOne) Save(ctx context.Context) (*Queue, error)

Save executes the query and returns the updated Queue entity.

func (*QueueUpdateOne) SaveX

func (quo *QueueUpdateOne) SaveX(ctx context.Context) *Queue

SaveX is like Save, but panics if an error occurs.

func (*QueueUpdateOne) Select

func (quo *QueueUpdateOne) Select(field string, fields ...string) *QueueUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*QueueUpdateOne) SetChatProcessing

func (quo *QueueUpdateOne) SetChatProcessing(b bool) *QueueUpdateOne

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpdateOne) SetChatStart

func (quo *QueueUpdateOne) SetChatStart(t time.Time) *QueueUpdateOne

SetChatStart sets the "chat_start" field.

func (*QueueUpdateOne) SetLiveArchive

func (quo *QueueUpdateOne) SetLiveArchive(b bool) *QueueUpdateOne

SetLiveArchive sets the "live_archive" field.

func (*QueueUpdateOne) SetNillableChatProcessing

func (quo *QueueUpdateOne) SetNillableChatProcessing(b *bool) *QueueUpdateOne

SetNillableChatProcessing sets the "chat_processing" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableChatStart

func (quo *QueueUpdateOne) SetNillableChatStart(t *time.Time) *QueueUpdateOne

SetNillableChatStart sets the "chat_start" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableLiveArchive

func (quo *QueueUpdateOne) SetNillableLiveArchive(b *bool) *QueueUpdateOne

SetNillableLiveArchive sets the "live_archive" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableOnHold

func (quo *QueueUpdateOne) SetNillableOnHold(b *bool) *QueueUpdateOne

SetNillableOnHold sets the "on_hold" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableProcessing

func (quo *QueueUpdateOne) SetNillableProcessing(b *bool) *QueueUpdateOne

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatConvert

func (quo *QueueUpdateOne) SetNillableTaskChatConvert(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatConvert sets the "task_chat_convert" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatDownload

func (quo *QueueUpdateOne) SetNillableTaskChatDownload(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatDownload sets the "task_chat_download" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatMove

func (quo *QueueUpdateOne) SetNillableTaskChatMove(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatMove sets the "task_chat_move" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatRender

func (quo *QueueUpdateOne) SetNillableTaskChatRender(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatRender sets the "task_chat_render" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVideoConvert

func (quo *QueueUpdateOne) SetNillableTaskVideoConvert(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVideoConvert sets the "task_video_convert" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVideoDownload

func (quo *QueueUpdateOne) SetNillableTaskVideoDownload(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVideoDownload sets the "task_video_download" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVideoMove

func (quo *QueueUpdateOne) SetNillableTaskVideoMove(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVideoMove sets the "task_video_move" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVodCreateFolder

func (quo *QueueUpdateOne) SetNillableTaskVodCreateFolder(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVodCreateFolder sets the "task_vod_create_folder" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVodDownloadThumbnail

func (quo *QueueUpdateOne) SetNillableTaskVodDownloadThumbnail(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVodSaveInfo

func (quo *QueueUpdateOne) SetNillableTaskVodSaveInfo(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVodSaveInfo sets the "task_vod_save_info" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableVideoProcessing

func (quo *QueueUpdateOne) SetNillableVideoProcessing(b *bool) *QueueUpdateOne

SetNillableVideoProcessing sets the "video_processing" field if the given value is not nil.

func (*QueueUpdateOne) SetOnHold

func (quo *QueueUpdateOne) SetOnHold(b bool) *QueueUpdateOne

SetOnHold sets the "on_hold" field.

func (*QueueUpdateOne) SetProcessing

func (quo *QueueUpdateOne) SetProcessing(b bool) *QueueUpdateOne

SetProcessing sets the "processing" field.

func (*QueueUpdateOne) SetTaskChatConvert

func (quo *QueueUpdateOne) SetTaskChatConvert(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpdateOne) SetTaskChatDownload

func (quo *QueueUpdateOne) SetTaskChatDownload(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpdateOne) SetTaskChatMove

func (quo *QueueUpdateOne) SetTaskChatMove(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpdateOne) SetTaskChatRender

func (quo *QueueUpdateOne) SetTaskChatRender(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpdateOne) SetTaskVideoConvert

func (quo *QueueUpdateOne) SetTaskVideoConvert(us utils.TaskStatus) *QueueUpdateOne

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpdateOne) SetTaskVideoDownload

func (quo *QueueUpdateOne) SetTaskVideoDownload(us utils.TaskStatus) *QueueUpdateOne

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpdateOne) SetTaskVideoMove

func (quo *QueueUpdateOne) SetTaskVideoMove(us utils.TaskStatus) *QueueUpdateOne

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpdateOne) SetTaskVodCreateFolder

func (quo *QueueUpdateOne) SetTaskVodCreateFolder(us utils.TaskStatus) *QueueUpdateOne

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpdateOne) SetTaskVodDownloadThumbnail

func (quo *QueueUpdateOne) SetTaskVodDownloadThumbnail(us utils.TaskStatus) *QueueUpdateOne

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpdateOne) SetTaskVodSaveInfo

func (quo *QueueUpdateOne) SetTaskVodSaveInfo(us utils.TaskStatus) *QueueUpdateOne

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpdateOne) SetUpdatedAt

func (quo *QueueUpdateOne) SetUpdatedAt(t time.Time) *QueueUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpdateOne) SetVideoProcessing

func (quo *QueueUpdateOne) SetVideoProcessing(b bool) *QueueUpdateOne

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpdateOne) SetVod

func (quo *QueueUpdateOne) SetVod(v *Vod) *QueueUpdateOne

SetVod sets the "vod" edge to the Vod entity.

func (*QueueUpdateOne) SetVodID

func (quo *QueueUpdateOne) SetVodID(id uuid.UUID) *QueueUpdateOne

SetVodID sets the "vod" edge to the Vod entity by ID.

type Queues

type Queues []*Queue

Queues is a parsable slice of Queue.

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 Tx

type Tx struct {

	// Channel is the client for interacting with the Channel builders.
	Channel *ChannelClient
	// Live is the client for interacting with the Live builders.
	Live *LiveClient
	// Playback is the client for interacting with the Playback builders.
	Playback *PlaybackClient
	// Playlist is the client for interacting with the Playlist builders.
	Playlist *PlaylistClient
	// Queue is the client for interacting with the Queue builders.
	Queue *QueueClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// Vod is the client for interacting with the Vod builders.
	Vod *VodClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Sub holds the value of the "sub" field.
	Sub string `json:"sub,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"-"`
	// Oauth holds the value of the "oauth" field.
	Oauth bool `json:"oauth,omitempty"`
	// Role holds the value of the "role" field.
	Role utils.Role `json:"role,omitempty"`
	// Webhook holds the value of the "webhook" field.
	Webhook string `json:"webhook,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UserCreate) SetNillableOauth added in v1.0.8

func (uc *UserCreate) SetNillableOauth(b *bool) *UserCreate

SetNillableOauth sets the "oauth" field if the given value is not nil.

func (*UserCreate) SetNillablePassword added in v1.0.8

func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserCreate) SetNillableRole

func (uc *UserCreate) SetNillableRole(u *utils.Role) *UserCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserCreate) SetNillableSub added in v1.0.8

func (uc *UserCreate) SetNillableSub(s *string) *UserCreate

SetNillableSub sets the "sub" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetNillableWebhook

func (uc *UserCreate) SetNillableWebhook(s *string) *UserCreate

SetNillableWebhook sets the "webhook" field if the given value is not nil.

func (*UserCreate) SetOauth added in v1.0.8

func (uc *UserCreate) SetOauth(b bool) *UserCreate

SetOauth sets the "oauth" field.

func (*UserCreate) SetPassword

func (uc *UserCreate) SetPassword(s string) *UserCreate

SetPassword sets the "password" field.

func (*UserCreate) SetRole

func (uc *UserCreate) SetRole(u utils.Role) *UserCreate

SetRole sets the "role" field.

func (*UserCreate) SetSub added in v1.0.8

func (uc *UserCreate) SetSub(s string) *UserCreate

SetSub sets the "sub" field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

func (*UserCreate) SetWebhook

func (uc *UserCreate) SetWebhook(s string) *UserCreate

SetWebhook sets the "webhook" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearPassword added in v1.0.8

func (m *UserMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*UserMutation) ClearSub added in v1.0.8

func (m *UserMutation) ClearSub()

ClearSub clears the value of the "sub" field.

func (*UserMutation) ClearWebhook

func (m *UserMutation) ClearWebhook()

ClearWebhook clears the value of the "webhook" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) Oauth added in v1.0.8

func (m *UserMutation) Oauth() (r bool, exists bool)

Oauth returns the value of the "oauth" field in the mutation.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldOauth added in v1.0.8

func (m *UserMutation) OldOauth(ctx context.Context) (v bool, err error)

OldOauth returns the old "oauth" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPassword

func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldRole

func (m *UserMutation) OldRole(ctx context.Context) (v utils.Role, err error)

OldRole returns the old "role" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldSub added in v1.0.8

func (m *UserMutation) OldSub(ctx context.Context) (v string, err error)

OldSub returns the old "sub" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldWebhook

func (m *UserMutation) OldWebhook(ctx context.Context) (v string, err error)

OldWebhook returns the old "webhook" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) Password

func (m *UserMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*UserMutation) PasswordCleared added in v1.0.8

func (m *UserMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetOauth added in v1.0.8

func (m *UserMutation) ResetOauth()

ResetOauth resets all changes to the "oauth" field.

func (*UserMutation) ResetPassword

func (m *UserMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*UserMutation) ResetRole

func (m *UserMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*UserMutation) ResetSub added in v1.0.8

func (m *UserMutation) ResetSub()

ResetSub resets all changes to the "sub" field.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) ResetWebhook

func (m *UserMutation) ResetWebhook()

ResetWebhook resets all changes to the "webhook" field.

func (*UserMutation) Role

func (m *UserMutation) Role() (r utils.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetOauth added in v1.0.8

func (m *UserMutation) SetOauth(b bool)

SetOauth sets the "oauth" field.

func (*UserMutation) SetPassword

func (m *UserMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*UserMutation) SetRole

func (m *UserMutation) SetRole(u utils.Role)

SetRole sets the "role" field.

func (*UserMutation) SetSub added in v1.0.8

func (m *UserMutation) SetSub(s string)

SetSub sets the "sub" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*UserMutation) SetWebhook

func (m *UserMutation) SetWebhook(s string)

SetWebhook sets the "webhook" field.

func (*UserMutation) Sub added in v1.0.8

func (m *UserMutation) Sub() (r string, exists bool)

Sub returns the value of the "sub" field in the mutation.

func (*UserMutation) SubCleared added in v1.0.8

func (m *UserMutation) SubCleared() bool

SubCleared returns if the "sub" field was cleared in this mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) Webhook

func (m *UserMutation) Webhook() (r string, exists bool)

Webhook returns the value of the "webhook" field in the mutation.

func (*UserMutation) WebhookCleared

func (m *UserMutation) WebhookCleared() bool

WebhookCleared returns if the "webhook" field was cleared in this mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Sub string `json:"sub,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldSub).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit adds a limit step to the query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset adds an offset step to the query.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order adds an order step to the query.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Sub string `json:"sub,omitempty"`
}

client.User.Query().
	Select(user.FieldSub).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) ClearPassword added in v1.0.8

func (uu *UserUpdate) ClearPassword() *UserUpdate

ClearPassword clears the value of the "password" field.

func (*UserUpdate) ClearSub added in v1.0.8

func (uu *UserUpdate) ClearSub() *UserUpdate

ClearSub clears the value of the "sub" field.

func (*UserUpdate) ClearWebhook

func (uu *UserUpdate) ClearWebhook() *UserUpdate

ClearWebhook clears the value of the "webhook" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetNillableOauth added in v1.0.8

func (uu *UserUpdate) SetNillableOauth(b *bool) *UserUpdate

SetNillableOauth sets the "oauth" field if the given value is not nil.

func (*UserUpdate) SetNillablePassword added in v1.0.8

func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserUpdate) SetNillableRole

func (uu *UserUpdate) SetNillableRole(u *utils.Role) *UserUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdate) SetNillableSub added in v1.0.8

func (uu *UserUpdate) SetNillableSub(s *string) *UserUpdate

SetNillableSub sets the "sub" field if the given value is not nil.

func (*UserUpdate) SetNillableWebhook

func (uu *UserUpdate) SetNillableWebhook(s *string) *UserUpdate

SetNillableWebhook sets the "webhook" field if the given value is not nil.

func (*UserUpdate) SetOauth added in v1.0.8

func (uu *UserUpdate) SetOauth(b bool) *UserUpdate

SetOauth sets the "oauth" field.

func (*UserUpdate) SetPassword

func (uu *UserUpdate) SetPassword(s string) *UserUpdate

SetPassword sets the "password" field.

func (*UserUpdate) SetRole

func (uu *UserUpdate) SetRole(u utils.Role) *UserUpdate

SetRole sets the "role" field.

func (*UserUpdate) SetSub added in v1.0.8

func (uu *UserUpdate) SetSub(s string) *UserUpdate

SetSub sets the "sub" field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) SetWebhook

func (uu *UserUpdate) SetWebhook(s string) *UserUpdate

SetWebhook sets the "webhook" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) ClearPassword added in v1.0.8

func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne

ClearPassword clears the value of the "password" field.

func (*UserUpdateOne) ClearSub added in v1.0.8

func (uuo *UserUpdateOne) ClearSub() *UserUpdateOne

ClearSub clears the value of the "sub" field.

func (*UserUpdateOne) ClearWebhook

func (uuo *UserUpdateOne) ClearWebhook() *UserUpdateOne

ClearWebhook clears the value of the "webhook" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetNillableOauth added in v1.0.8

func (uuo *UserUpdateOne) SetNillableOauth(b *bool) *UserUpdateOne

SetNillableOauth sets the "oauth" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePassword added in v1.0.8

func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserUpdateOne) SetNillableRole

func (uuo *UserUpdateOne) SetNillableRole(u *utils.Role) *UserUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdateOne) SetNillableSub added in v1.0.8

func (uuo *UserUpdateOne) SetNillableSub(s *string) *UserUpdateOne

SetNillableSub sets the "sub" field if the given value is not nil.

func (*UserUpdateOne) SetNillableWebhook

func (uuo *UserUpdateOne) SetNillableWebhook(s *string) *UserUpdateOne

SetNillableWebhook sets the "webhook" field if the given value is not nil.

func (*UserUpdateOne) SetOauth added in v1.0.8

func (uuo *UserUpdateOne) SetOauth(b bool) *UserUpdateOne

SetOauth sets the "oauth" field.

func (*UserUpdateOne) SetPassword

func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne

SetPassword sets the "password" field.

func (*UserUpdateOne) SetRole

func (uuo *UserUpdateOne) SetRole(u utils.Role) *UserUpdateOne

SetRole sets the "role" field.

func (*UserUpdateOne) SetSub added in v1.0.8

func (uuo *UserUpdateOne) SetSub(s string) *UserUpdateOne

SetSub sets the "sub" field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) SetWebhook

func (uuo *UserUpdateOne) SetWebhook(s string) *UserUpdateOne

SetWebhook sets the "webhook" field.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type Vod

type Vod struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ExtID holds the value of the "ext_id" field.
	ExtID string `json:"ext_id,omitempty"`
	// The platform the VOD is from, takes an enum.
	Platform utils.VodPlatform `json:"platform,omitempty"`
	// The type of VOD, takes an enum.
	Type utils.VodType `json:"type,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Duration holds the value of the "duration" field.
	Duration int `json:"duration,omitempty"`
	// Views holds the value of the "views" field.
	Views int `json:"views,omitempty"`
	// Resolution holds the value of the "resolution" field.
	Resolution string `json:"resolution,omitempty"`
	// Whether the VOD is currently processing.
	Processing bool `json:"processing,omitempty"`
	// ThumbnailPath holds the value of the "thumbnail_path" field.
	ThumbnailPath string `json:"thumbnail_path,omitempty"`
	// WebThumbnailPath holds the value of the "web_thumbnail_path" field.
	WebThumbnailPath string `json:"web_thumbnail_path,omitempty"`
	// VideoPath holds the value of the "video_path" field.
	VideoPath string `json:"video_path,omitempty"`
	// ChatPath holds the value of the "chat_path" field.
	ChatPath string `json:"chat_path,omitempty"`
	// ChatVideoPath holds the value of the "chat_video_path" field.
	ChatVideoPath string `json:"chat_video_path,omitempty"`
	// InfoPath holds the value of the "info_path" field.
	InfoPath string `json:"info_path,omitempty"`
	// The time the VOD was streamed.
	StreamedAt time.Time `json:"streamed_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VodQuery when eager-loading is set.
	Edges VodEdges `json:"edges"`
	// contains filtered or unexported fields
}

Vod is the model entity for the Vod schema.

func (*Vod) QueryChannel

func (v *Vod) QueryChannel() *ChannelQuery

QueryChannel queries the "channel" edge of the Vod entity.

func (*Vod) QueryPlaylists added in v1.0.0

func (v *Vod) QueryPlaylists() *PlaylistQuery

QueryPlaylists queries the "playlists" edge of the Vod entity.

func (*Vod) QueryQueue

func (v *Vod) QueryQueue() *QueueQuery

QueryQueue queries the "queue" edge of the Vod entity.

func (*Vod) String

func (v *Vod) String() string

String implements the fmt.Stringer.

func (*Vod) Unwrap

func (v *Vod) Unwrap() *Vod

Unwrap unwraps the Vod 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 (*Vod) Update

func (v *Vod) Update() *VodUpdateOne

Update returns a builder for updating this Vod. Note that you need to call Vod.Unwrap() before calling this method if this Vod was returned from a transaction, and the transaction was committed or rolled back.

type VodClient

type VodClient struct {
	// contains filtered or unexported fields
}

VodClient is a client for the Vod schema.

func NewVodClient

func NewVodClient(c config) *VodClient

NewVodClient returns a client for the Vod from the given config.

func (*VodClient) Create

func (c *VodClient) Create() *VodCreate

Create returns a builder for creating a Vod entity.

func (*VodClient) CreateBulk

func (c *VodClient) CreateBulk(builders ...*VodCreate) *VodCreateBulk

CreateBulk returns a builder for creating a bulk of Vod entities.

func (*VodClient) Delete

func (c *VodClient) Delete() *VodDelete

Delete returns a delete builder for Vod.

func (*VodClient) DeleteOne

func (c *VodClient) DeleteOne(v *Vod) *VodDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VodClient) DeleteOneID

func (c *VodClient) DeleteOneID(id uuid.UUID) *VodDeleteOne

DeleteOne returns a builder for deleting the given entity by its id.

func (*VodClient) Get

func (c *VodClient) Get(ctx context.Context, id uuid.UUID) (*Vod, error)

Get returns a Vod entity by its id.

func (*VodClient) GetX

func (c *VodClient) GetX(ctx context.Context, id uuid.UUID) *Vod

GetX is like Get, but panics if an error occurs.

func (*VodClient) Hooks

func (c *VodClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VodClient) Query

func (c *VodClient) Query() *VodQuery

Query returns a query builder for Vod.

func (*VodClient) QueryChannel

func (c *VodClient) QueryChannel(v *Vod) *ChannelQuery

QueryChannel queries the channel edge of a Vod.

func (*VodClient) QueryPlaylists added in v1.0.0

func (c *VodClient) QueryPlaylists(v *Vod) *PlaylistQuery

QueryPlaylists queries the playlists edge of a Vod.

func (*VodClient) QueryQueue

func (c *VodClient) QueryQueue(v *Vod) *QueueQuery

QueryQueue queries the queue edge of a Vod.

func (*VodClient) Update

func (c *VodClient) Update() *VodUpdate

Update returns an update builder for Vod.

func (*VodClient) UpdateOne

func (c *VodClient) UpdateOne(v *Vod) *VodUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VodClient) UpdateOneID

func (c *VodClient) UpdateOneID(id uuid.UUID) *VodUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VodClient) Use

func (c *VodClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vod.Hooks(f(g(h())))`.

type VodCreate

type VodCreate struct {
	// contains filtered or unexported fields
}

VodCreate is the builder for creating a Vod entity.

func (*VodCreate) AddPlaylistIDs added in v1.0.0

func (vc *VodCreate) AddPlaylistIDs(ids ...uuid.UUID) *VodCreate

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by IDs.

func (*VodCreate) AddPlaylists added in v1.0.0

func (vc *VodCreate) AddPlaylists(p ...*Playlist) *VodCreate

AddPlaylists adds the "playlists" edges to the Playlist entity.

func (*VodCreate) Exec

func (vc *VodCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VodCreate) ExecX

func (vc *VodCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodCreate) Mutation

func (vc *VodCreate) Mutation() *VodMutation

Mutation returns the VodMutation object of the builder.

func (*VodCreate) Save

func (vc *VodCreate) Save(ctx context.Context) (*Vod, error)

Save creates the Vod in the database.

func (*VodCreate) SaveX

func (vc *VodCreate) SaveX(ctx context.Context) *Vod

SaveX calls Save and panics if Save returns an error.

func (*VodCreate) SetChannel

func (vc *VodCreate) SetChannel(c *Channel) *VodCreate

SetChannel sets the "channel" edge to the Channel entity.

func (*VodCreate) SetChannelID

func (vc *VodCreate) SetChannelID(id uuid.UUID) *VodCreate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*VodCreate) SetChatPath

func (vc *VodCreate) SetChatPath(s string) *VodCreate

SetChatPath sets the "chat_path" field.

func (*VodCreate) SetChatVideoPath

func (vc *VodCreate) SetChatVideoPath(s string) *VodCreate

SetChatVideoPath sets the "chat_video_path" field.

func (*VodCreate) SetCreatedAt

func (vc *VodCreate) SetCreatedAt(t time.Time) *VodCreate

SetCreatedAt sets the "created_at" field.

func (*VodCreate) SetDuration

func (vc *VodCreate) SetDuration(i int) *VodCreate

SetDuration sets the "duration" field.

func (*VodCreate) SetExtID

func (vc *VodCreate) SetExtID(s string) *VodCreate

SetExtID sets the "ext_id" field.

func (*VodCreate) SetID

func (vc *VodCreate) SetID(u uuid.UUID) *VodCreate

SetID sets the "id" field.

func (*VodCreate) SetInfoPath

func (vc *VodCreate) SetInfoPath(s string) *VodCreate

SetInfoPath sets the "info_path" field.

func (*VodCreate) SetNillableChatPath

func (vc *VodCreate) SetNillableChatPath(s *string) *VodCreate

SetNillableChatPath sets the "chat_path" field if the given value is not nil.

func (*VodCreate) SetNillableChatVideoPath

func (vc *VodCreate) SetNillableChatVideoPath(s *string) *VodCreate

SetNillableChatVideoPath sets the "chat_video_path" field if the given value is not nil.

func (*VodCreate) SetNillableCreatedAt

func (vc *VodCreate) SetNillableCreatedAt(t *time.Time) *VodCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*VodCreate) SetNillableDuration

func (vc *VodCreate) SetNillableDuration(i *int) *VodCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*VodCreate) SetNillableID

func (vc *VodCreate) SetNillableID(u *uuid.UUID) *VodCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VodCreate) SetNillableInfoPath

func (vc *VodCreate) SetNillableInfoPath(s *string) *VodCreate

SetNillableInfoPath sets the "info_path" field if the given value is not nil.

func (*VodCreate) SetNillablePlatform

func (vc *VodCreate) SetNillablePlatform(up *utils.VodPlatform) *VodCreate

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*VodCreate) SetNillableProcessing

func (vc *VodCreate) SetNillableProcessing(b *bool) *VodCreate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*VodCreate) SetNillableQueueID

func (vc *VodCreate) SetNillableQueueID(id *uuid.UUID) *VodCreate

SetNillableQueueID sets the "queue" edge to the Queue entity by ID if the given value is not nil.

func (*VodCreate) SetNillableResolution

func (vc *VodCreate) SetNillableResolution(s *string) *VodCreate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*VodCreate) SetNillableStreamedAt

func (vc *VodCreate) SetNillableStreamedAt(t *time.Time) *VodCreate

SetNillableStreamedAt sets the "streamed_at" field if the given value is not nil.

func (*VodCreate) SetNillableThumbnailPath

func (vc *VodCreate) SetNillableThumbnailPath(s *string) *VodCreate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*VodCreate) SetNillableType

func (vc *VodCreate) SetNillableType(ut *utils.VodType) *VodCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*VodCreate) SetNillableUpdatedAt

func (vc *VodCreate) SetNillableUpdatedAt(t *time.Time) *VodCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*VodCreate) SetNillableViews

func (vc *VodCreate) SetNillableViews(i *int) *VodCreate

SetNillableViews sets the "views" field if the given value is not nil.

func (*VodCreate) SetPlatform

func (vc *VodCreate) SetPlatform(up utils.VodPlatform) *VodCreate

SetPlatform sets the "platform" field.

func (*VodCreate) SetProcessing

func (vc *VodCreate) SetProcessing(b bool) *VodCreate

SetProcessing sets the "processing" field.

func (*VodCreate) SetQueue

func (vc *VodCreate) SetQueue(q *Queue) *VodCreate

SetQueue sets the "queue" edge to the Queue entity.

func (*VodCreate) SetQueueID

func (vc *VodCreate) SetQueueID(id uuid.UUID) *VodCreate

SetQueueID sets the "queue" edge to the Queue entity by ID.

func (*VodCreate) SetResolution

func (vc *VodCreate) SetResolution(s string) *VodCreate

SetResolution sets the "resolution" field.

func (*VodCreate) SetStreamedAt

func (vc *VodCreate) SetStreamedAt(t time.Time) *VodCreate

SetStreamedAt sets the "streamed_at" field.

func (*VodCreate) SetThumbnailPath

func (vc *VodCreate) SetThumbnailPath(s string) *VodCreate

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodCreate) SetTitle

func (vc *VodCreate) SetTitle(s string) *VodCreate

SetTitle sets the "title" field.

func (*VodCreate) SetType

func (vc *VodCreate) SetType(ut utils.VodType) *VodCreate

SetType sets the "type" field.

func (*VodCreate) SetUpdatedAt

func (vc *VodCreate) SetUpdatedAt(t time.Time) *VodCreate

SetUpdatedAt sets the "updated_at" field.

func (*VodCreate) SetVideoPath

func (vc *VodCreate) SetVideoPath(s string) *VodCreate

SetVideoPath sets the "video_path" field.

func (*VodCreate) SetViews

func (vc *VodCreate) SetViews(i int) *VodCreate

SetViews sets the "views" field.

func (*VodCreate) SetWebThumbnailPath

func (vc *VodCreate) SetWebThumbnailPath(s string) *VodCreate

SetWebThumbnailPath sets the "web_thumbnail_path" field.

type VodCreateBulk

type VodCreateBulk struct {
	// contains filtered or unexported fields
}

VodCreateBulk is the builder for creating many Vod entities in bulk.

func (*VodCreateBulk) Exec

func (vcb *VodCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VodCreateBulk) ExecX

func (vcb *VodCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodCreateBulk) Save

func (vcb *VodCreateBulk) Save(ctx context.Context) ([]*Vod, error)

Save creates the Vod entities in the database.

func (*VodCreateBulk) SaveX

func (vcb *VodCreateBulk) SaveX(ctx context.Context) []*Vod

SaveX is like Save, but panics if an error occurs.

type VodDelete

type VodDelete struct {
	// contains filtered or unexported fields
}

VodDelete is the builder for deleting a Vod entity.

func (*VodDelete) Exec

func (vd *VodDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VodDelete) ExecX

func (vd *VodDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VodDelete) Where

func (vd *VodDelete) Where(ps ...predicate.Vod) *VodDelete

Where appends a list predicates to the VodDelete builder.

type VodDeleteOne

type VodDeleteOne struct {
	// contains filtered or unexported fields
}

VodDeleteOne is the builder for deleting a single Vod entity.

func (*VodDeleteOne) Exec

func (vdo *VodDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VodDeleteOne) ExecX

func (vdo *VodDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type VodEdges

type VodEdges struct {
	// Channel holds the value of the channel edge.
	Channel *Channel `json:"channel,omitempty"`
	// Queue holds the value of the queue edge.
	Queue *Queue `json:"queue,omitempty"`
	// Playlists holds the value of the playlists edge.
	Playlists []*Playlist `json:"playlists,omitempty"`
	// contains filtered or unexported fields
}

VodEdges holds the relations/edges for other nodes in the graph.

func (VodEdges) ChannelOrErr

func (e VodEdges) ChannelOrErr() (*Channel, error)

ChannelOrErr returns the Channel value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VodEdges) PlaylistsOrErr added in v1.0.0

func (e VodEdges) PlaylistsOrErr() ([]*Playlist, error)

PlaylistsOrErr returns the Playlists value or an error if the edge was not loaded in eager-loading.

func (VodEdges) QueueOrErr

func (e VodEdges) QueueOrErr() (*Queue, error)

QueueOrErr returns the Queue value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VodGroupBy

type VodGroupBy struct {
	// contains filtered or unexported fields
}

VodGroupBy is the group-by builder for Vod entities.

func (*VodGroupBy) Aggregate

func (vgb *VodGroupBy) Aggregate(fns ...AggregateFunc) *VodGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VodGroupBy) Bool

func (s *VodGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) BoolX

func (s *VodGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VodGroupBy) Bools

func (s *VodGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) BoolsX

func (s *VodGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VodGroupBy) Float64

func (s *VodGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) Float64X

func (s *VodGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VodGroupBy) Float64s

func (s *VodGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) Float64sX

func (s *VodGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VodGroupBy) Int

func (s *VodGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) IntX

func (s *VodGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VodGroupBy) Ints

func (s *VodGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) IntsX

func (s *VodGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VodGroupBy) Scan

func (vgb *VodGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*VodGroupBy) ScanX

func (s *VodGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*VodGroupBy) String

func (s *VodGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) StringX

func (s *VodGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VodGroupBy) Strings

func (s *VodGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) StringsX

func (s *VodGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VodMutation

type VodMutation struct {
	// contains filtered or unexported fields
}

VodMutation represents an operation that mutates the Vod nodes in the graph.

func (*VodMutation) AddDuration

func (m *VodMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*VodMutation) AddField

func (m *VodMutation) 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 (*VodMutation) AddPlaylistIDs added in v1.0.0

func (m *VodMutation) AddPlaylistIDs(ids ...uuid.UUID)

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by ids.

func (*VodMutation) AddViews

func (m *VodMutation) AddViews(i int)

AddViews adds i to the "views" field.

func (*VodMutation) AddedDuration

func (m *VodMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*VodMutation) AddedEdges

func (m *VodMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VodMutation) AddedField

func (m *VodMutation) 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 (*VodMutation) AddedFields

func (m *VodMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VodMutation) AddedIDs

func (m *VodMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VodMutation) AddedViews

func (m *VodMutation) AddedViews() (r int, exists bool)

AddedViews returns the value that was added to the "views" field in this mutation.

func (*VodMutation) ChannelCleared

func (m *VodMutation) ChannelCleared() bool

ChannelCleared reports if the "channel" edge to the Channel entity was cleared.

func (*VodMutation) ChannelID

func (m *VodMutation) ChannelID() (id uuid.UUID, exists bool)

ChannelID returns the "channel" edge ID in the mutation.

func (*VodMutation) ChannelIDs

func (m *VodMutation) ChannelIDs() (ids []uuid.UUID)

ChannelIDs returns the "channel" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ChannelID instead. It exists only for internal usage by the builders.

func (*VodMutation) ChatPath

func (m *VodMutation) ChatPath() (r string, exists bool)

ChatPath returns the value of the "chat_path" field in the mutation.

func (*VodMutation) ChatPathCleared

func (m *VodMutation) ChatPathCleared() bool

ChatPathCleared returns if the "chat_path" field was cleared in this mutation.

func (*VodMutation) ChatVideoPath

func (m *VodMutation) ChatVideoPath() (r string, exists bool)

ChatVideoPath returns the value of the "chat_video_path" field in the mutation.

func (*VodMutation) ChatVideoPathCleared

func (m *VodMutation) ChatVideoPathCleared() bool

ChatVideoPathCleared returns if the "chat_video_path" field was cleared in this mutation.

func (*VodMutation) ClearChannel

func (m *VodMutation) ClearChannel()

ClearChannel clears the "channel" edge to the Channel entity.

func (*VodMutation) ClearChatPath

func (m *VodMutation) ClearChatPath()

ClearChatPath clears the value of the "chat_path" field.

func (*VodMutation) ClearChatVideoPath

func (m *VodMutation) ClearChatVideoPath()

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodMutation) ClearEdge

func (m *VodMutation) 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 (*VodMutation) ClearField

func (m *VodMutation) 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 (*VodMutation) ClearInfoPath

func (m *VodMutation) ClearInfoPath()

ClearInfoPath clears the value of the "info_path" field.

func (*VodMutation) ClearPlaylists added in v1.0.0

func (m *VodMutation) ClearPlaylists()

ClearPlaylists clears the "playlists" edge to the Playlist entity.

func (*VodMutation) ClearQueue

func (m *VodMutation) ClearQueue()

ClearQueue clears the "queue" edge to the Queue entity.

func (*VodMutation) ClearResolution

func (m *VodMutation) ClearResolution()

ClearResolution clears the value of the "resolution" field.

func (*VodMutation) ClearThumbnailPath

func (m *VodMutation) ClearThumbnailPath()

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodMutation) ClearedEdges

func (m *VodMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VodMutation) ClearedFields

func (m *VodMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VodMutation) Client

func (m VodMutation) 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 (*VodMutation) CreatedAt

func (m *VodMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*VodMutation) Duration

func (m *VodMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*VodMutation) EdgeCleared

func (m *VodMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VodMutation) ExtID

func (m *VodMutation) ExtID() (r string, exists bool)

ExtID returns the value of the "ext_id" field in the mutation.

func (*VodMutation) Field

func (m *VodMutation) 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 (*VodMutation) FieldCleared

func (m *VodMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VodMutation) Fields

func (m *VodMutation) 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 (*VodMutation) GetType

func (m *VodMutation) GetType() (r utils.VodType, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*VodMutation) ID

func (m *VodMutation) 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 (*VodMutation) IDs

func (m *VodMutation) 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 (*VodMutation) InfoPath

func (m *VodMutation) InfoPath() (r string, exists bool)

InfoPath returns the value of the "info_path" field in the mutation.

func (*VodMutation) InfoPathCleared

func (m *VodMutation) InfoPathCleared() bool

InfoPathCleared returns if the "info_path" field was cleared in this mutation.

func (*VodMutation) OldChatPath

func (m *VodMutation) OldChatPath(ctx context.Context) (v string, err error)

OldChatPath returns the old "chat_path" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldChatVideoPath

func (m *VodMutation) OldChatVideoPath(ctx context.Context) (v string, err error)

OldChatVideoPath returns the old "chat_video_path" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldCreatedAt

func (m *VodMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldDuration

func (m *VodMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldExtID

func (m *VodMutation) OldExtID(ctx context.Context) (v string, err error)

OldExtID returns the old "ext_id" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldField

func (m *VodMutation) 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 (*VodMutation) OldInfoPath

func (m *VodMutation) OldInfoPath(ctx context.Context) (v string, err error)

OldInfoPath returns the old "info_path" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldPlatform

func (m *VodMutation) OldPlatform(ctx context.Context) (v utils.VodPlatform, err error)

OldPlatform returns the old "platform" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldProcessing

func (m *VodMutation) OldProcessing(ctx context.Context) (v bool, err error)

OldProcessing returns the old "processing" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldResolution

func (m *VodMutation) OldResolution(ctx context.Context) (v string, err error)

OldResolution returns the old "resolution" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldStreamedAt

func (m *VodMutation) OldStreamedAt(ctx context.Context) (v time.Time, err error)

OldStreamedAt returns the old "streamed_at" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldThumbnailPath

func (m *VodMutation) OldThumbnailPath(ctx context.Context) (v string, err error)

OldThumbnailPath returns the old "thumbnail_path" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldTitle

func (m *VodMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldType

func (m *VodMutation) OldType(ctx context.Context) (v utils.VodType, err error)

OldType returns the old "type" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldUpdatedAt

func (m *VodMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldVideoPath

func (m *VodMutation) OldVideoPath(ctx context.Context) (v string, err error)

OldVideoPath returns the old "video_path" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldViews

func (m *VodMutation) OldViews(ctx context.Context) (v int, err error)

OldViews returns the old "views" field's value of the Vod entity. If the Vod 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 (*VodMutation) OldWebThumbnailPath

func (m *VodMutation) OldWebThumbnailPath(ctx context.Context) (v string, err error)

OldWebThumbnailPath returns the old "web_thumbnail_path" field's value of the Vod entity. If the Vod 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 (*VodMutation) Op

func (m *VodMutation) Op() Op

Op returns the operation name.

func (*VodMutation) Platform

func (m *VodMutation) Platform() (r utils.VodPlatform, exists bool)

Platform returns the value of the "platform" field in the mutation.

func (*VodMutation) PlaylistsCleared added in v1.0.0

func (m *VodMutation) PlaylistsCleared() bool

PlaylistsCleared reports if the "playlists" edge to the Playlist entity was cleared.

func (*VodMutation) PlaylistsIDs added in v1.0.0

func (m *VodMutation) PlaylistsIDs() (ids []uuid.UUID)

PlaylistsIDs returns the "playlists" edge IDs in the mutation.

func (*VodMutation) Processing

func (m *VodMutation) Processing() (r bool, exists bool)

Processing returns the value of the "processing" field in the mutation.

func (*VodMutation) QueueCleared

func (m *VodMutation) QueueCleared() bool

QueueCleared reports if the "queue" edge to the Queue entity was cleared.

func (*VodMutation) QueueID

func (m *VodMutation) QueueID() (id uuid.UUID, exists bool)

QueueID returns the "queue" edge ID in the mutation.

func (*VodMutation) QueueIDs

func (m *VodMutation) QueueIDs() (ids []uuid.UUID)

QueueIDs returns the "queue" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QueueID instead. It exists only for internal usage by the builders.

func (*VodMutation) RemovePlaylistIDs added in v1.0.0

func (m *VodMutation) RemovePlaylistIDs(ids ...uuid.UUID)

RemovePlaylistIDs removes the "playlists" edge to the Playlist entity by IDs.

func (*VodMutation) RemovedEdges

func (m *VodMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VodMutation) RemovedIDs

func (m *VodMutation) 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 (*VodMutation) RemovedPlaylistsIDs added in v1.0.0

func (m *VodMutation) RemovedPlaylistsIDs() (ids []uuid.UUID)

RemovedPlaylists returns the removed IDs of the "playlists" edge to the Playlist entity.

func (*VodMutation) ResetChannel

func (m *VodMutation) ResetChannel()

ResetChannel resets all changes to the "channel" edge.

func (*VodMutation) ResetChatPath

func (m *VodMutation) ResetChatPath()

ResetChatPath resets all changes to the "chat_path" field.

func (*VodMutation) ResetChatVideoPath

func (m *VodMutation) ResetChatVideoPath()

ResetChatVideoPath resets all changes to the "chat_video_path" field.

func (*VodMutation) ResetCreatedAt

func (m *VodMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VodMutation) ResetDuration

func (m *VodMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*VodMutation) ResetEdge

func (m *VodMutation) 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 (*VodMutation) ResetExtID

func (m *VodMutation) ResetExtID()

ResetExtID resets all changes to the "ext_id" field.

func (*VodMutation) ResetField

func (m *VodMutation) 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 (*VodMutation) ResetInfoPath

func (m *VodMutation) ResetInfoPath()

ResetInfoPath resets all changes to the "info_path" field.

func (*VodMutation) ResetPlatform

func (m *VodMutation) ResetPlatform()

ResetPlatform resets all changes to the "platform" field.

func (*VodMutation) ResetPlaylists added in v1.0.0

func (m *VodMutation) ResetPlaylists()

ResetPlaylists resets all changes to the "playlists" edge.

func (*VodMutation) ResetProcessing

func (m *VodMutation) ResetProcessing()

ResetProcessing resets all changes to the "processing" field.

func (*VodMutation) ResetQueue

func (m *VodMutation) ResetQueue()

ResetQueue resets all changes to the "queue" edge.

func (*VodMutation) ResetResolution

func (m *VodMutation) ResetResolution()

ResetResolution resets all changes to the "resolution" field.

func (*VodMutation) ResetStreamedAt

func (m *VodMutation) ResetStreamedAt()

ResetStreamedAt resets all changes to the "streamed_at" field.

func (*VodMutation) ResetThumbnailPath

func (m *VodMutation) ResetThumbnailPath()

ResetThumbnailPath resets all changes to the "thumbnail_path" field.

func (*VodMutation) ResetTitle

func (m *VodMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*VodMutation) ResetType

func (m *VodMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*VodMutation) ResetUpdatedAt

func (m *VodMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*VodMutation) ResetVideoPath

func (m *VodMutation) ResetVideoPath()

ResetVideoPath resets all changes to the "video_path" field.

func (*VodMutation) ResetViews

func (m *VodMutation) ResetViews()

ResetViews resets all changes to the "views" field.

func (*VodMutation) ResetWebThumbnailPath

func (m *VodMutation) ResetWebThumbnailPath()

ResetWebThumbnailPath resets all changes to the "web_thumbnail_path" field.

func (*VodMutation) Resolution

func (m *VodMutation) Resolution() (r string, exists bool)

Resolution returns the value of the "resolution" field in the mutation.

func (*VodMutation) ResolutionCleared

func (m *VodMutation) ResolutionCleared() bool

ResolutionCleared returns if the "resolution" field was cleared in this mutation.

func (*VodMutation) SetChannelID

func (m *VodMutation) SetChannelID(id uuid.UUID)

SetChannelID sets the "channel" edge to the Channel entity by id.

func (*VodMutation) SetChatPath

func (m *VodMutation) SetChatPath(s string)

SetChatPath sets the "chat_path" field.

func (*VodMutation) SetChatVideoPath

func (m *VodMutation) SetChatVideoPath(s string)

SetChatVideoPath sets the "chat_video_path" field.

func (*VodMutation) SetCreatedAt

func (m *VodMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*VodMutation) SetDuration

func (m *VodMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*VodMutation) SetExtID

func (m *VodMutation) SetExtID(s string)

SetExtID sets the "ext_id" field.

func (*VodMutation) SetField

func (m *VodMutation) 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 (*VodMutation) SetID

func (m *VodMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Vod entities.

func (*VodMutation) SetInfoPath

func (m *VodMutation) SetInfoPath(s string)

SetInfoPath sets the "info_path" field.

func (*VodMutation) SetPlatform

func (m *VodMutation) SetPlatform(up utils.VodPlatform)

SetPlatform sets the "platform" field.

func (*VodMutation) SetProcessing

func (m *VodMutation) SetProcessing(b bool)

SetProcessing sets the "processing" field.

func (*VodMutation) SetQueueID

func (m *VodMutation) SetQueueID(id uuid.UUID)

SetQueueID sets the "queue" edge to the Queue entity by id.

func (*VodMutation) SetResolution

func (m *VodMutation) SetResolution(s string)

SetResolution sets the "resolution" field.

func (*VodMutation) SetStreamedAt

func (m *VodMutation) SetStreamedAt(t time.Time)

SetStreamedAt sets the "streamed_at" field.

func (*VodMutation) SetThumbnailPath

func (m *VodMutation) SetThumbnailPath(s string)

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodMutation) SetTitle

func (m *VodMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*VodMutation) SetType

func (m *VodMutation) SetType(ut utils.VodType)

SetType sets the "type" field.

func (*VodMutation) SetUpdatedAt

func (m *VodMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*VodMutation) SetVideoPath

func (m *VodMutation) SetVideoPath(s string)

SetVideoPath sets the "video_path" field.

func (*VodMutation) SetViews

func (m *VodMutation) SetViews(i int)

SetViews sets the "views" field.

func (*VodMutation) SetWebThumbnailPath

func (m *VodMutation) SetWebThumbnailPath(s string)

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodMutation) StreamedAt

func (m *VodMutation) StreamedAt() (r time.Time, exists bool)

StreamedAt returns the value of the "streamed_at" field in the mutation.

func (*VodMutation) ThumbnailPath

func (m *VodMutation) ThumbnailPath() (r string, exists bool)

ThumbnailPath returns the value of the "thumbnail_path" field in the mutation.

func (*VodMutation) ThumbnailPathCleared

func (m *VodMutation) ThumbnailPathCleared() bool

ThumbnailPathCleared returns if the "thumbnail_path" field was cleared in this mutation.

func (*VodMutation) Title

func (m *VodMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (VodMutation) Tx

func (m VodMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VodMutation) Type

func (m *VodMutation) Type() string

Type returns the node type of this mutation (Vod).

func (*VodMutation) UpdatedAt

func (m *VodMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*VodMutation) VideoPath

func (m *VodMutation) VideoPath() (r string, exists bool)

VideoPath returns the value of the "video_path" field in the mutation.

func (*VodMutation) Views

func (m *VodMutation) Views() (r int, exists bool)

Views returns the value of the "views" field in the mutation.

func (*VodMutation) WebThumbnailPath

func (m *VodMutation) WebThumbnailPath() (r string, exists bool)

WebThumbnailPath returns the value of the "web_thumbnail_path" field in the mutation.

func (*VodMutation) Where

func (m *VodMutation) Where(ps ...predicate.Vod)

Where appends a list predicates to the VodMutation builder.

type VodQuery

type VodQuery struct {
	// contains filtered or unexported fields
}

VodQuery is the builder for querying Vod entities.

func (*VodQuery) All

func (vq *VodQuery) All(ctx context.Context) ([]*Vod, error)

All executes the query and returns a list of Vods.

func (*VodQuery) AllX

func (vq *VodQuery) AllX(ctx context.Context) []*Vod

AllX is like All, but panics if an error occurs.

func (*VodQuery) Clone

func (vq *VodQuery) Clone() *VodQuery

Clone returns a duplicate of the VodQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VodQuery) Count

func (vq *VodQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VodQuery) CountX

func (vq *VodQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VodQuery) Exist

func (vq *VodQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VodQuery) ExistX

func (vq *VodQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VodQuery) First

func (vq *VodQuery) First(ctx context.Context) (*Vod, error)

First returns the first Vod entity from the query. Returns a *NotFoundError when no Vod was found.

func (*VodQuery) FirstID

func (vq *VodQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Vod ID from the query. Returns a *NotFoundError when no Vod ID was found.

func (*VodQuery) FirstIDX

func (vq *VodQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VodQuery) FirstX

func (vq *VodQuery) FirstX(ctx context.Context) *Vod

FirstX is like First, but panics if an error occurs.

func (*VodQuery) GroupBy

func (vq *VodQuery) GroupBy(field string, fields ...string) *VodGroupBy

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 {
	ExtID string `json:"ext_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Vod.Query().
	GroupBy(vod.FieldExtID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VodQuery) IDs

func (vq *VodQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Vod IDs.

func (*VodQuery) IDsX

func (vq *VodQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VodQuery) Limit

func (vq *VodQuery) Limit(limit int) *VodQuery

Limit adds a limit step to the query.

func (*VodQuery) Offset

func (vq *VodQuery) Offset(offset int) *VodQuery

Offset adds an offset step to the query.

func (*VodQuery) Only

func (vq *VodQuery) Only(ctx context.Context) (*Vod, error)

Only returns a single Vod entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Vod entity is found. Returns a *NotFoundError when no Vod entities are found.

func (*VodQuery) OnlyID

func (vq *VodQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Vod ID in the query. Returns a *NotSingularError when more than one Vod ID is found. Returns a *NotFoundError when no entities are found.

func (*VodQuery) OnlyIDX

func (vq *VodQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VodQuery) OnlyX

func (vq *VodQuery) OnlyX(ctx context.Context) *Vod

OnlyX is like Only, but panics if an error occurs.

func (*VodQuery) Order

func (vq *VodQuery) Order(o ...OrderFunc) *VodQuery

Order adds an order step to the query.

func (*VodQuery) QueryChannel

func (vq *VodQuery) QueryChannel() *ChannelQuery

QueryChannel chains the current query on the "channel" edge.

func (*VodQuery) QueryPlaylists added in v1.0.0

func (vq *VodQuery) QueryPlaylists() *PlaylistQuery

QueryPlaylists chains the current query on the "playlists" edge.

func (*VodQuery) QueryQueue

func (vq *VodQuery) QueryQueue() *QueueQuery

QueryQueue chains the current query on the "queue" edge.

func (*VodQuery) Select

func (vq *VodQuery) Select(fields ...string) *VodSelect

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 {
	ExtID string `json:"ext_id,omitempty"`
}

client.Vod.Query().
	Select(vod.FieldExtID).
	Scan(ctx, &v)

func (*VodQuery) Unique

func (vq *VodQuery) Unique(unique bool) *VodQuery

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 (*VodQuery) Where

func (vq *VodQuery) Where(ps ...predicate.Vod) *VodQuery

Where adds a new predicate for the VodQuery builder.

func (*VodQuery) WithChannel

func (vq *VodQuery) WithChannel(opts ...func(*ChannelQuery)) *VodQuery

WithChannel tells the query-builder to eager-load the nodes that are connected to the "channel" edge. The optional arguments are used to configure the query builder of the edge.

func (*VodQuery) WithPlaylists added in v1.0.0

func (vq *VodQuery) WithPlaylists(opts ...func(*PlaylistQuery)) *VodQuery

WithPlaylists tells the query-builder to eager-load the nodes that are connected to the "playlists" edge. The optional arguments are used to configure the query builder of the edge.

func (*VodQuery) WithQueue

func (vq *VodQuery) WithQueue(opts ...func(*QueueQuery)) *VodQuery

WithQueue tells the query-builder to eager-load the nodes that are connected to the "queue" edge. The optional arguments are used to configure the query builder of the edge.

type VodSelect

type VodSelect struct {
	*VodQuery
	// contains filtered or unexported fields
}

VodSelect is the builder for selecting fields of Vod entities.

func (*VodSelect) Bool

func (s *VodSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VodSelect) BoolX

func (s *VodSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VodSelect) Bools

func (s *VodSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VodSelect) BoolsX

func (s *VodSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VodSelect) Float64

func (s *VodSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VodSelect) Float64X

func (s *VodSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VodSelect) Float64s

func (s *VodSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VodSelect) Float64sX

func (s *VodSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VodSelect) Int

func (s *VodSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VodSelect) IntX

func (s *VodSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VodSelect) Ints

func (s *VodSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VodSelect) IntsX

func (s *VodSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VodSelect) Scan

func (vs *VodSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*VodSelect) ScanX

func (s *VodSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*VodSelect) String

func (s *VodSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VodSelect) StringX

func (s *VodSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VodSelect) Strings

func (s *VodSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VodSelect) StringsX

func (s *VodSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VodUpdate

type VodUpdate struct {
	// contains filtered or unexported fields
}

VodUpdate is the builder for updating Vod entities.

func (*VodUpdate) AddDuration

func (vu *VodUpdate) AddDuration(i int) *VodUpdate

AddDuration adds i to the "duration" field.

func (*VodUpdate) AddPlaylistIDs added in v1.0.0

func (vu *VodUpdate) AddPlaylistIDs(ids ...uuid.UUID) *VodUpdate

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by IDs.

func (*VodUpdate) AddPlaylists added in v1.0.0

func (vu *VodUpdate) AddPlaylists(p ...*Playlist) *VodUpdate

AddPlaylists adds the "playlists" edges to the Playlist entity.

func (*VodUpdate) AddViews

func (vu *VodUpdate) AddViews(i int) *VodUpdate

AddViews adds i to the "views" field.

func (*VodUpdate) ClearChannel

func (vu *VodUpdate) ClearChannel() *VodUpdate

ClearChannel clears the "channel" edge to the Channel entity.

func (*VodUpdate) ClearChatPath

func (vu *VodUpdate) ClearChatPath() *VodUpdate

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpdate) ClearChatVideoPath

func (vu *VodUpdate) ClearChatVideoPath() *VodUpdate

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpdate) ClearInfoPath

func (vu *VodUpdate) ClearInfoPath() *VodUpdate

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpdate) ClearPlaylists added in v1.0.0

func (vu *VodUpdate) ClearPlaylists() *VodUpdate

ClearPlaylists clears all "playlists" edges to the Playlist entity.

func (*VodUpdate) ClearQueue

func (vu *VodUpdate) ClearQueue() *VodUpdate

ClearQueue clears the "queue" edge to the Queue entity.

func (*VodUpdate) ClearResolution

func (vu *VodUpdate) ClearResolution() *VodUpdate

ClearResolution clears the value of the "resolution" field.

func (*VodUpdate) ClearThumbnailPath

func (vu *VodUpdate) ClearThumbnailPath() *VodUpdate

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpdate) Exec

func (vu *VodUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VodUpdate) ExecX

func (vu *VodUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodUpdate) Mutation

func (vu *VodUpdate) Mutation() *VodMutation

Mutation returns the VodMutation object of the builder.

func (*VodUpdate) RemovePlaylistIDs added in v1.0.0

func (vu *VodUpdate) RemovePlaylistIDs(ids ...uuid.UUID) *VodUpdate

RemovePlaylistIDs removes the "playlists" edge to Playlist entities by IDs.

func (*VodUpdate) RemovePlaylists added in v1.0.0

func (vu *VodUpdate) RemovePlaylists(p ...*Playlist) *VodUpdate

RemovePlaylists removes "playlists" edges to Playlist entities.

func (*VodUpdate) Save

func (vu *VodUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VodUpdate) SaveX

func (vu *VodUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VodUpdate) SetChannel

func (vu *VodUpdate) SetChannel(c *Channel) *VodUpdate

SetChannel sets the "channel" edge to the Channel entity.

func (*VodUpdate) SetChannelID

func (vu *VodUpdate) SetChannelID(id uuid.UUID) *VodUpdate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*VodUpdate) SetChatPath

func (vu *VodUpdate) SetChatPath(s string) *VodUpdate

SetChatPath sets the "chat_path" field.

func (*VodUpdate) SetChatVideoPath

func (vu *VodUpdate) SetChatVideoPath(s string) *VodUpdate

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpdate) SetDuration

func (vu *VodUpdate) SetDuration(i int) *VodUpdate

SetDuration sets the "duration" field.

func (*VodUpdate) SetExtID

func (vu *VodUpdate) SetExtID(s string) *VodUpdate

SetExtID sets the "ext_id" field.

func (*VodUpdate) SetInfoPath

func (vu *VodUpdate) SetInfoPath(s string) *VodUpdate

SetInfoPath sets the "info_path" field.

func (*VodUpdate) SetNillableChatPath

func (vu *VodUpdate) SetNillableChatPath(s *string) *VodUpdate

SetNillableChatPath sets the "chat_path" field if the given value is not nil.

func (*VodUpdate) SetNillableChatVideoPath

func (vu *VodUpdate) SetNillableChatVideoPath(s *string) *VodUpdate

SetNillableChatVideoPath sets the "chat_video_path" field if the given value is not nil.

func (*VodUpdate) SetNillableDuration

func (vu *VodUpdate) SetNillableDuration(i *int) *VodUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*VodUpdate) SetNillableInfoPath

func (vu *VodUpdate) SetNillableInfoPath(s *string) *VodUpdate

SetNillableInfoPath sets the "info_path" field if the given value is not nil.

func (*VodUpdate) SetNillablePlatform

func (vu *VodUpdate) SetNillablePlatform(up *utils.VodPlatform) *VodUpdate

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*VodUpdate) SetNillableProcessing

func (vu *VodUpdate) SetNillableProcessing(b *bool) *VodUpdate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*VodUpdate) SetNillableQueueID

func (vu *VodUpdate) SetNillableQueueID(id *uuid.UUID) *VodUpdate

SetNillableQueueID sets the "queue" edge to the Queue entity by ID if the given value is not nil.

func (*VodUpdate) SetNillableResolution

func (vu *VodUpdate) SetNillableResolution(s *string) *VodUpdate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*VodUpdate) SetNillableStreamedAt

func (vu *VodUpdate) SetNillableStreamedAt(t *time.Time) *VodUpdate

SetNillableStreamedAt sets the "streamed_at" field if the given value is not nil.

func (*VodUpdate) SetNillableThumbnailPath

func (vu *VodUpdate) SetNillableThumbnailPath(s *string) *VodUpdate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*VodUpdate) SetNillableType

func (vu *VodUpdate) SetNillableType(ut *utils.VodType) *VodUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*VodUpdate) SetNillableViews

func (vu *VodUpdate) SetNillableViews(i *int) *VodUpdate

SetNillableViews sets the "views" field if the given value is not nil.

func (*VodUpdate) SetPlatform

func (vu *VodUpdate) SetPlatform(up utils.VodPlatform) *VodUpdate

SetPlatform sets the "platform" field.

func (*VodUpdate) SetProcessing

func (vu *VodUpdate) SetProcessing(b bool) *VodUpdate

SetProcessing sets the "processing" field.

func (*VodUpdate) SetQueue

func (vu *VodUpdate) SetQueue(q *Queue) *VodUpdate

SetQueue sets the "queue" edge to the Queue entity.

func (*VodUpdate) SetQueueID

func (vu *VodUpdate) SetQueueID(id uuid.UUID) *VodUpdate

SetQueueID sets the "queue" edge to the Queue entity by ID.

func (*VodUpdate) SetResolution

func (vu *VodUpdate) SetResolution(s string) *VodUpdate

SetResolution sets the "resolution" field.

func (*VodUpdate) SetStreamedAt

func (vu *VodUpdate) SetStreamedAt(t time.Time) *VodUpdate

SetStreamedAt sets the "streamed_at" field.

func (*VodUpdate) SetThumbnailPath

func (vu *VodUpdate) SetThumbnailPath(s string) *VodUpdate

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpdate) SetTitle

func (vu *VodUpdate) SetTitle(s string) *VodUpdate

SetTitle sets the "title" field.

func (*VodUpdate) SetType

func (vu *VodUpdate) SetType(ut utils.VodType) *VodUpdate

SetType sets the "type" field.

func (*VodUpdate) SetUpdatedAt

func (vu *VodUpdate) SetUpdatedAt(t time.Time) *VodUpdate

SetUpdatedAt sets the "updated_at" field.

func (*VodUpdate) SetVideoPath

func (vu *VodUpdate) SetVideoPath(s string) *VodUpdate

SetVideoPath sets the "video_path" field.

func (*VodUpdate) SetViews

func (vu *VodUpdate) SetViews(i int) *VodUpdate

SetViews sets the "views" field.

func (*VodUpdate) SetWebThumbnailPath

func (vu *VodUpdate) SetWebThumbnailPath(s string) *VodUpdate

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodUpdate) Where

func (vu *VodUpdate) Where(ps ...predicate.Vod) *VodUpdate

Where appends a list predicates to the VodUpdate builder.

type VodUpdateOne

type VodUpdateOne struct {
	// contains filtered or unexported fields
}

VodUpdateOne is the builder for updating a single Vod entity.

func (*VodUpdateOne) AddDuration

func (vuo *VodUpdateOne) AddDuration(i int) *VodUpdateOne

AddDuration adds i to the "duration" field.

func (*VodUpdateOne) AddPlaylistIDs added in v1.0.0

func (vuo *VodUpdateOne) AddPlaylistIDs(ids ...uuid.UUID) *VodUpdateOne

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by IDs.

func (*VodUpdateOne) AddPlaylists added in v1.0.0

func (vuo *VodUpdateOne) AddPlaylists(p ...*Playlist) *VodUpdateOne

AddPlaylists adds the "playlists" edges to the Playlist entity.

func (*VodUpdateOne) AddViews

func (vuo *VodUpdateOne) AddViews(i int) *VodUpdateOne

AddViews adds i to the "views" field.

func (*VodUpdateOne) ClearChannel

func (vuo *VodUpdateOne) ClearChannel() *VodUpdateOne

ClearChannel clears the "channel" edge to the Channel entity.

func (*VodUpdateOne) ClearChatPath

func (vuo *VodUpdateOne) ClearChatPath() *VodUpdateOne

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpdateOne) ClearChatVideoPath

func (vuo *VodUpdateOne) ClearChatVideoPath() *VodUpdateOne

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpdateOne) ClearInfoPath

func (vuo *VodUpdateOne) ClearInfoPath() *VodUpdateOne

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpdateOne) ClearPlaylists added in v1.0.0

func (vuo *VodUpdateOne) ClearPlaylists() *VodUpdateOne

ClearPlaylists clears all "playlists" edges to the Playlist entity.

func (*VodUpdateOne) ClearQueue

func (vuo *VodUpdateOne) ClearQueue() *VodUpdateOne

ClearQueue clears the "queue" edge to the Queue entity.

func (*VodUpdateOne) ClearResolution

func (vuo *VodUpdateOne) ClearResolution() *VodUpdateOne

ClearResolution clears the value of the "resolution" field.

func (*VodUpdateOne) ClearThumbnailPath

func (vuo *VodUpdateOne) ClearThumbnailPath() *VodUpdateOne

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpdateOne) Exec

func (vuo *VodUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VodUpdateOne) ExecX

func (vuo *VodUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodUpdateOne) Mutation

func (vuo *VodUpdateOne) Mutation() *VodMutation

Mutation returns the VodMutation object of the builder.

func (*VodUpdateOne) RemovePlaylistIDs added in v1.0.0

func (vuo *VodUpdateOne) RemovePlaylistIDs(ids ...uuid.UUID) *VodUpdateOne

RemovePlaylistIDs removes the "playlists" edge to Playlist entities by IDs.

func (*VodUpdateOne) RemovePlaylists added in v1.0.0

func (vuo *VodUpdateOne) RemovePlaylists(p ...*Playlist) *VodUpdateOne

RemovePlaylists removes "playlists" edges to Playlist entities.

func (*VodUpdateOne) Save

func (vuo *VodUpdateOne) Save(ctx context.Context) (*Vod, error)

Save executes the query and returns the updated Vod entity.

func (*VodUpdateOne) SaveX

func (vuo *VodUpdateOne) SaveX(ctx context.Context) *Vod

SaveX is like Save, but panics if an error occurs.

func (*VodUpdateOne) Select

func (vuo *VodUpdateOne) Select(field string, fields ...string) *VodUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VodUpdateOne) SetChannel

func (vuo *VodUpdateOne) SetChannel(c *Channel) *VodUpdateOne

SetChannel sets the "channel" edge to the Channel entity.

func (*VodUpdateOne) SetChannelID

func (vuo *VodUpdateOne) SetChannelID(id uuid.UUID) *VodUpdateOne

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*VodUpdateOne) SetChatPath

func (vuo *VodUpdateOne) SetChatPath(s string) *VodUpdateOne

SetChatPath sets the "chat_path" field.

func (*VodUpdateOne) SetChatVideoPath

func (vuo *VodUpdateOne) SetChatVideoPath(s string) *VodUpdateOne

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpdateOne) SetDuration

func (vuo *VodUpdateOne) SetDuration(i int) *VodUpdateOne

SetDuration sets the "duration" field.

func (*VodUpdateOne) SetExtID

func (vuo *VodUpdateOne) SetExtID(s string) *VodUpdateOne

SetExtID sets the "ext_id" field.

func (*VodUpdateOne) SetInfoPath

func (vuo *VodUpdateOne) SetInfoPath(s string) *VodUpdateOne

SetInfoPath sets the "info_path" field.

func (*VodUpdateOne) SetNillableChatPath

func (vuo *VodUpdateOne) SetNillableChatPath(s *string) *VodUpdateOne

SetNillableChatPath sets the "chat_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableChatVideoPath

func (vuo *VodUpdateOne) SetNillableChatVideoPath(s *string) *VodUpdateOne

SetNillableChatVideoPath sets the "chat_video_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableDuration

func (vuo *VodUpdateOne) SetNillableDuration(i *int) *VodUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*VodUpdateOne) SetNillableInfoPath

func (vuo *VodUpdateOne) SetNillableInfoPath(s *string) *VodUpdateOne

SetNillableInfoPath sets the "info_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillablePlatform

func (vuo *VodUpdateOne) SetNillablePlatform(up *utils.VodPlatform) *VodUpdateOne

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*VodUpdateOne) SetNillableProcessing

func (vuo *VodUpdateOne) SetNillableProcessing(b *bool) *VodUpdateOne

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*VodUpdateOne) SetNillableQueueID

func (vuo *VodUpdateOne) SetNillableQueueID(id *uuid.UUID) *VodUpdateOne

SetNillableQueueID sets the "queue" edge to the Queue entity by ID if the given value is not nil.

func (*VodUpdateOne) SetNillableResolution

func (vuo *VodUpdateOne) SetNillableResolution(s *string) *VodUpdateOne

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*VodUpdateOne) SetNillableStreamedAt

func (vuo *VodUpdateOne) SetNillableStreamedAt(t *time.Time) *VodUpdateOne

SetNillableStreamedAt sets the "streamed_at" field if the given value is not nil.

func (*VodUpdateOne) SetNillableThumbnailPath

func (vuo *VodUpdateOne) SetNillableThumbnailPath(s *string) *VodUpdateOne

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableType

func (vuo *VodUpdateOne) SetNillableType(ut *utils.VodType) *VodUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*VodUpdateOne) SetNillableViews

func (vuo *VodUpdateOne) SetNillableViews(i *int) *VodUpdateOne

SetNillableViews sets the "views" field if the given value is not nil.

func (*VodUpdateOne) SetPlatform

func (vuo *VodUpdateOne) SetPlatform(up utils.VodPlatform) *VodUpdateOne

SetPlatform sets the "platform" field.

func (*VodUpdateOne) SetProcessing

func (vuo *VodUpdateOne) SetProcessing(b bool) *VodUpdateOne

SetProcessing sets the "processing" field.

func (*VodUpdateOne) SetQueue

func (vuo *VodUpdateOne) SetQueue(q *Queue) *VodUpdateOne

SetQueue sets the "queue" edge to the Queue entity.

func (*VodUpdateOne) SetQueueID

func (vuo *VodUpdateOne) SetQueueID(id uuid.UUID) *VodUpdateOne

SetQueueID sets the "queue" edge to the Queue entity by ID.

func (*VodUpdateOne) SetResolution

func (vuo *VodUpdateOne) SetResolution(s string) *VodUpdateOne

SetResolution sets the "resolution" field.

func (*VodUpdateOne) SetStreamedAt

func (vuo *VodUpdateOne) SetStreamedAt(t time.Time) *VodUpdateOne

SetStreamedAt sets the "streamed_at" field.

func (*VodUpdateOne) SetThumbnailPath

func (vuo *VodUpdateOne) SetThumbnailPath(s string) *VodUpdateOne

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpdateOne) SetTitle

func (vuo *VodUpdateOne) SetTitle(s string) *VodUpdateOne

SetTitle sets the "title" field.

func (*VodUpdateOne) SetType

func (vuo *VodUpdateOne) SetType(ut utils.VodType) *VodUpdateOne

SetType sets the "type" field.

func (*VodUpdateOne) SetUpdatedAt

func (vuo *VodUpdateOne) SetUpdatedAt(t time.Time) *VodUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*VodUpdateOne) SetVideoPath

func (vuo *VodUpdateOne) SetVideoPath(s string) *VodUpdateOne

SetVideoPath sets the "video_path" field.

func (*VodUpdateOne) SetViews

func (vuo *VodUpdateOne) SetViews(i int) *VodUpdateOne

SetViews sets the "views" field.

func (*VodUpdateOne) SetWebThumbnailPath

func (vuo *VodUpdateOne) SetWebThumbnailPath(s string) *VodUpdateOne

SetWebThumbnailPath sets the "web_thumbnail_path" field.

type Vods

type Vods []*Vod

Vods is a parsable slice of Vod.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL