Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func CiynvC() error
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CloudFile
- func (c *CloudFile) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *CloudFile) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cf *CloudFile) QueryStorageProviders() *StorageProviderQuery
- func (cf *CloudFile) QueryTags() *CloudFileTagQuery
- func (cf *CloudFile) String() string
- func (cf *CloudFile) Unwrap() *CloudFile
- func (cf *CloudFile) Update() *CloudFileUpdateOne
- func (cf *CloudFile) Value(name string) (ent.Value, error)
- type CloudFileClient
- func (c *CloudFileClient) Create() *CloudFileCreate
- func (c *CloudFileClient) CreateBulk(builders ...*CloudFileCreate) *CloudFileCreateBulk
- func (c *CloudFileClient) Delete() *CloudFileDelete
- func (c *CloudFileClient) DeleteOne(cf *CloudFile) *CloudFileDeleteOne
- func (c *CloudFileClient) DeleteOneID(id uuid.UUID) *CloudFileDeleteOne
- func (c *CloudFileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *CloudFileClient) Get(ctx context.Context, id uuid.UUID) (*CloudFile, error)
- func (c *CloudFileClient) GetX(ctx context.Context, id uuid.UUID) *CloudFile
- func (c *CloudFileClient) Hooks() []Hook
- func (c *CloudFileClient) Intercept(interceptors ...Interceptor)
- func (c *CloudFileClient) Interceptors() []Interceptor
- func (c *CloudFileClient) MapCreateBulk(slice any, setFunc func(*CloudFileCreate, int)) *CloudFileCreateBulk
- func (c *CloudFileClient) Query() *CloudFileQuery
- func (c *CloudFileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *CloudFileClient) QueryStorageProviders(cf *CloudFile) *StorageProviderQuery
- func (c *CloudFileClient) QueryTags(cf *CloudFile) *CloudFileTagQuery
- func (c *CloudFileClient) Update() *CloudFileUpdate
- func (c *CloudFileClient) UpdateOne(cf *CloudFile) *CloudFileUpdateOne
- func (c *CloudFileClient) UpdateOneID(id uuid.UUID) *CloudFileUpdateOne
- func (c *CloudFileClient) Use(hooks ...Hook)
- type CloudFileCreate
- func (cfc *CloudFileCreate) AddTagIDs(ids ...uint64) *CloudFileCreate
- func (cfc *CloudFileCreate) AddTags(c ...*CloudFileTag) *CloudFileCreate
- func (cfc *CloudFileCreate) Exec(ctx context.Context) error
- func (c *CloudFileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cfc *CloudFileCreate) ExecX(ctx context.Context)
- func (cfc *CloudFileCreate) Mutation() *CloudFileMutation
- func (c *CloudFileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfc *CloudFileCreate) Save(ctx context.Context) (*CloudFile, error)
- func (cfc *CloudFileCreate) SaveX(ctx context.Context) *CloudFile
- func (cfc *CloudFileCreate) SetCreatedAt(t time.Time) *CloudFileCreate
- func (cfc *CloudFileCreate) SetFileType(u uint8) *CloudFileCreate
- func (cfc *CloudFileCreate) SetID(u uuid.UUID) *CloudFileCreate
- func (cfc *CloudFileCreate) SetName(s string) *CloudFileCreate
- func (cfc *CloudFileCreate) SetNillableCreatedAt(t *time.Time) *CloudFileCreate
- func (cfc *CloudFileCreate) SetNillableID(u *uuid.UUID) *CloudFileCreate
- func (cfc *CloudFileCreate) SetNillableState(b *bool) *CloudFileCreate
- func (cfc *CloudFileCreate) SetNillableStorageProvidersID(id *uint64) *CloudFileCreate
- func (cfc *CloudFileCreate) SetNillableUpdatedAt(t *time.Time) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilFileType(value *uint8) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilName(value *string) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilSize(value *uint64) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilState(value *bool) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilURL(value *string) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilUpdatedAt(value *time.Time) *CloudFileCreate
- func (cf *CloudFileCreate) SetNotNilUserID(value *string) *CloudFileCreate
- func (cfc *CloudFileCreate) SetSize(u uint64) *CloudFileCreate
- func (cfc *CloudFileCreate) SetState(b bool) *CloudFileCreate
- func (cfc *CloudFileCreate) SetStorageProviders(s *StorageProvider) *CloudFileCreate
- func (cfc *CloudFileCreate) SetStorageProvidersID(id uint64) *CloudFileCreate
- func (cfc *CloudFileCreate) SetURL(s string) *CloudFileCreate
- func (cfc *CloudFileCreate) SetUpdatedAt(t time.Time) *CloudFileCreate
- func (cfc *CloudFileCreate) SetUserID(s string) *CloudFileCreate
- type CloudFileCreateBulk
- func (cfcb *CloudFileCreateBulk) Exec(ctx context.Context) error
- func (c *CloudFileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cfcb *CloudFileCreateBulk) ExecX(ctx context.Context)
- func (c *CloudFileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfcb *CloudFileCreateBulk) Save(ctx context.Context) ([]*CloudFile, error)
- func (cfcb *CloudFileCreateBulk) SaveX(ctx context.Context) []*CloudFile
- type CloudFileDelete
- func (cfd *CloudFileDelete) Exec(ctx context.Context) (int, error)
- func (c *CloudFileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cfd *CloudFileDelete) ExecX(ctx context.Context) int
- func (c *CloudFileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfd *CloudFileDelete) Where(ps ...predicate.CloudFile) *CloudFileDelete
- type CloudFileDeleteOne
- type CloudFileEdges
- type CloudFileGroupBy
- func (cfgb *CloudFileGroupBy) Aggregate(fns ...AggregateFunc) *CloudFileGroupBy
- func (s *CloudFileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CloudFileGroupBy) BoolX(ctx context.Context) bool
- func (s *CloudFileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CloudFileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CloudFileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CloudFileGroupBy) Float64X(ctx context.Context) float64
- func (s *CloudFileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CloudFileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CloudFileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CloudFileGroupBy) IntX(ctx context.Context) int
- func (s *CloudFileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CloudFileGroupBy) IntsX(ctx context.Context) []int
- func (cfgb *CloudFileGroupBy) Scan(ctx context.Context, v any) error
- func (s *CloudFileGroupBy) ScanX(ctx context.Context, v any)
- func (s *CloudFileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CloudFileGroupBy) StringX(ctx context.Context) string
- func (s *CloudFileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CloudFileGroupBy) StringsX(ctx context.Context) []string
- type CloudFileMutation
- func (m *CloudFileMutation) AddField(name string, value ent.Value) error
- func (m *CloudFileMutation) AddFileType(u int8)
- func (m *CloudFileMutation) AddSize(u int64)
- func (m *CloudFileMutation) AddTagIDs(ids ...uint64)
- func (m *CloudFileMutation) AddedEdges() []string
- func (m *CloudFileMutation) AddedField(name string) (ent.Value, bool)
- func (m *CloudFileMutation) AddedFields() []string
- func (m *CloudFileMutation) AddedFileType() (r int8, exists bool)
- func (m *CloudFileMutation) AddedIDs(name string) []ent.Value
- func (m *CloudFileMutation) AddedSize() (r int64, exists bool)
- func (m *CloudFileMutation) ClearEdge(name string) error
- func (m *CloudFileMutation) ClearField(name string) error
- func (m *CloudFileMutation) ClearState()
- func (m *CloudFileMutation) ClearStorageProviders()
- func (m *CloudFileMutation) ClearTags()
- func (m *CloudFileMutation) ClearedEdges() []string
- func (m *CloudFileMutation) ClearedFields() []string
- func (m CloudFileMutation) Client() *Client
- func (m *CloudFileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CloudFileMutation) EdgeCleared(name string) bool
- func (c *CloudFileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *CloudFileMutation) Field(name string) (ent.Value, bool)
- func (m *CloudFileMutation) FieldCleared(name string) bool
- func (m *CloudFileMutation) Fields() []string
- func (m *CloudFileMutation) FileType() (r uint8, exists bool)
- func (m *CloudFileMutation) ID() (id uuid.UUID, exists bool)
- func (m *CloudFileMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CloudFileMutation) Name() (r string, exists bool)
- func (m *CloudFileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CloudFileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CloudFileMutation) OldFileType(ctx context.Context) (v uint8, err error)
- func (m *CloudFileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CloudFileMutation) OldSize(ctx context.Context) (v uint64, err error)
- func (m *CloudFileMutation) OldState(ctx context.Context) (v bool, err error)
- func (m *CloudFileMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *CloudFileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CloudFileMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *CloudFileMutation) Op() Op
- func (c *CloudFileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *CloudFileMutation) RemoveTagIDs(ids ...uint64)
- func (m *CloudFileMutation) RemovedEdges() []string
- func (m *CloudFileMutation) RemovedIDs(name string) []ent.Value
- func (m *CloudFileMutation) RemovedTagsIDs() (ids []uint64)
- func (m *CloudFileMutation) ResetCreatedAt()
- func (m *CloudFileMutation) ResetEdge(name string) error
- func (m *CloudFileMutation) ResetField(name string) error
- func (m *CloudFileMutation) ResetFileType()
- func (m *CloudFileMutation) ResetName()
- func (m *CloudFileMutation) ResetSize()
- func (m *CloudFileMutation) ResetState()
- func (m *CloudFileMutation) ResetStorageProviders()
- func (m *CloudFileMutation) ResetTags()
- func (m *CloudFileMutation) ResetURL()
- func (m *CloudFileMutation) ResetUpdatedAt()
- func (m *CloudFileMutation) ResetUserID()
- func (m *CloudFileMutation) SetCreatedAt(t time.Time)
- func (m *CloudFileMutation) SetField(name string, value ent.Value) error
- func (m *CloudFileMutation) SetFileType(u uint8)
- func (m *CloudFileMutation) SetID(id uuid.UUID)
- func (m *CloudFileMutation) SetName(s string)
- func (m *CloudFileMutation) SetOp(op Op)
- func (m *CloudFileMutation) SetSize(u uint64)
- func (m *CloudFileMutation) SetState(b bool)
- func (m *CloudFileMutation) SetStorageProvidersID(id uint64)
- func (m *CloudFileMutation) SetURL(s string)
- func (m *CloudFileMutation) SetUpdatedAt(t time.Time)
- func (m *CloudFileMutation) SetUserID(s string)
- func (m *CloudFileMutation) Size() (r uint64, exists bool)
- func (m *CloudFileMutation) State() (r bool, exists bool)
- func (m *CloudFileMutation) StateCleared() bool
- func (m *CloudFileMutation) StorageProvidersCleared() bool
- func (m *CloudFileMutation) StorageProvidersID() (id uint64, exists bool)
- func (m *CloudFileMutation) StorageProvidersIDs() (ids []uint64)
- func (m *CloudFileMutation) TagsCleared() bool
- func (m *CloudFileMutation) TagsIDs() (ids []uint64)
- func (m CloudFileMutation) Tx() (*Tx, error)
- func (m *CloudFileMutation) Type() string
- func (m *CloudFileMutation) URL() (r string, exists bool)
- func (m *CloudFileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CloudFileMutation) UserID() (r string, exists bool)
- func (m *CloudFileMutation) Where(ps ...predicate.CloudFile)
- func (m *CloudFileMutation) WhereP(ps ...func(*sql.Selector))
- type CloudFilePageList
- type CloudFilePager
- type CloudFilePaginateOption
- type CloudFileQuery
- func (cfq *CloudFileQuery) Aggregate(fns ...AggregateFunc) *CloudFileSelect
- func (cfq *CloudFileQuery) All(ctx context.Context) ([]*CloudFile, error)
- func (cfq *CloudFileQuery) AllX(ctx context.Context) []*CloudFile
- func (cfq *CloudFileQuery) Clone() *CloudFileQuery
- func (cfq *CloudFileQuery) Count(ctx context.Context) (int, error)
- func (cfq *CloudFileQuery) CountX(ctx context.Context) int
- func (c *CloudFileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cfq *CloudFileQuery) Exist(ctx context.Context) (bool, error)
- func (cfq *CloudFileQuery) ExistX(ctx context.Context) bool
- func (cfq *CloudFileQuery) First(ctx context.Context) (*CloudFile, error)
- func (cfq *CloudFileQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cfq *CloudFileQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cfq *CloudFileQuery) FirstX(ctx context.Context) *CloudFile
- func (cfq *CloudFileQuery) GroupBy(field string, fields ...string) *CloudFileGroupBy
- func (cfq *CloudFileQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cfq *CloudFileQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cfq *CloudFileQuery) Limit(limit int) *CloudFileQuery
- func (cfq *CloudFileQuery) Offset(offset int) *CloudFileQuery
- func (cfq *CloudFileQuery) Only(ctx context.Context) (*CloudFile, error)
- func (cfq *CloudFileQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cfq *CloudFileQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cfq *CloudFileQuery) OnlyX(ctx context.Context) *CloudFile
- func (cfq *CloudFileQuery) Order(o ...cloudfile.OrderOption) *CloudFileQuery
- func (cf *CloudFileQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*CloudFilePageList, error)
- func (c *CloudFileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfq *CloudFileQuery) QueryStorageProviders() *StorageProviderQuery
- func (cfq *CloudFileQuery) QueryTags() *CloudFileTagQuery
- func (cfq *CloudFileQuery) Select(fields ...string) *CloudFileSelect
- func (cfq *CloudFileQuery) Unique(unique bool) *CloudFileQuery
- func (cfq *CloudFileQuery) Where(ps ...predicate.CloudFile) *CloudFileQuery
- func (cfq *CloudFileQuery) WithStorageProviders(opts ...func(*StorageProviderQuery)) *CloudFileQuery
- func (cfq *CloudFileQuery) WithTags(opts ...func(*CloudFileTagQuery)) *CloudFileQuery
- type CloudFileSelect
- func (cfs *CloudFileSelect) Aggregate(fns ...AggregateFunc) *CloudFileSelect
- func (s *CloudFileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CloudFileSelect) BoolX(ctx context.Context) bool
- func (s *CloudFileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CloudFileSelect) BoolsX(ctx context.Context) []bool
- func (c CloudFileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *CloudFileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CloudFileSelect) Float64X(ctx context.Context) float64
- func (s *CloudFileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CloudFileSelect) Float64sX(ctx context.Context) []float64
- func (s *CloudFileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CloudFileSelect) IntX(ctx context.Context) int
- func (s *CloudFileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CloudFileSelect) IntsX(ctx context.Context) []int
- func (c CloudFileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfs *CloudFileSelect) Scan(ctx context.Context, v any) error
- func (s *CloudFileSelect) ScanX(ctx context.Context, v any)
- func (s *CloudFileSelect) String(ctx context.Context) (_ string, err error)
- func (s *CloudFileSelect) StringX(ctx context.Context) string
- func (s *CloudFileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CloudFileSelect) StringsX(ctx context.Context) []string
- type CloudFileTag
- func (c *CloudFileTag) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cft *CloudFileTag) QueryCloudFiles() *CloudFileQuery
- func (c *CloudFileTag) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cft *CloudFileTag) String() string
- func (cft *CloudFileTag) Unwrap() *CloudFileTag
- func (cft *CloudFileTag) Update() *CloudFileTagUpdateOne
- func (cft *CloudFileTag) Value(name string) (ent.Value, error)
- type CloudFileTagClient
- func (c *CloudFileTagClient) Create() *CloudFileTagCreate
- func (c *CloudFileTagClient) CreateBulk(builders ...*CloudFileTagCreate) *CloudFileTagCreateBulk
- func (c *CloudFileTagClient) Delete() *CloudFileTagDelete
- func (c *CloudFileTagClient) DeleteOne(cft *CloudFileTag) *CloudFileTagDeleteOne
- func (c *CloudFileTagClient) DeleteOneID(id uint64) *CloudFileTagDeleteOne
- func (c *CloudFileTagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *CloudFileTagClient) Get(ctx context.Context, id uint64) (*CloudFileTag, error)
- func (c *CloudFileTagClient) GetX(ctx context.Context, id uint64) *CloudFileTag
- func (c *CloudFileTagClient) Hooks() []Hook
- func (c *CloudFileTagClient) Intercept(interceptors ...Interceptor)
- func (c *CloudFileTagClient) Interceptors() []Interceptor
- func (c *CloudFileTagClient) MapCreateBulk(slice any, setFunc func(*CloudFileTagCreate, int)) *CloudFileTagCreateBulk
- func (c *CloudFileTagClient) Query() *CloudFileTagQuery
- func (c *CloudFileTagClient) QueryCloudFiles(cft *CloudFileTag) *CloudFileQuery
- func (c *CloudFileTagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *CloudFileTagClient) Update() *CloudFileTagUpdate
- func (c *CloudFileTagClient) UpdateOne(cft *CloudFileTag) *CloudFileTagUpdateOne
- func (c *CloudFileTagClient) UpdateOneID(id uint64) *CloudFileTagUpdateOne
- func (c *CloudFileTagClient) Use(hooks ...Hook)
- type CloudFileTagCreate
- func (cftc *CloudFileTagCreate) AddCloudFileIDs(ids ...uuid.UUID) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) AddCloudFiles(c ...*CloudFile) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) Exec(ctx context.Context) error
- func (c *CloudFileTagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cftc *CloudFileTagCreate) ExecX(ctx context.Context)
- func (cftc *CloudFileTagCreate) Mutation() *CloudFileTagMutation
- func (c *CloudFileTagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cftc *CloudFileTagCreate) Save(ctx context.Context) (*CloudFileTag, error)
- func (cftc *CloudFileTagCreate) SaveX(ctx context.Context) *CloudFileTag
- func (cftc *CloudFileTagCreate) SetCreatedAt(t time.Time) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetID(u uint64) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetName(s string) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetNillableCreatedAt(t *time.Time) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetNillableRemark(s *string) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetNillableStatus(u *uint8) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetNillableUpdatedAt(t *time.Time) *CloudFileTagCreate
- func (cft *CloudFileTagCreate) SetNotNilName(value *string) *CloudFileTagCreate
- func (cft *CloudFileTagCreate) SetNotNilRemark(value *string) *CloudFileTagCreate
- func (cft *CloudFileTagCreate) SetNotNilStatus(value *uint8) *CloudFileTagCreate
- func (cft *CloudFileTagCreate) SetNotNilUpdatedAt(value *time.Time) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetRemark(s string) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetStatus(u uint8) *CloudFileTagCreate
- func (cftc *CloudFileTagCreate) SetUpdatedAt(t time.Time) *CloudFileTagCreate
- type CloudFileTagCreateBulk
- func (cftcb *CloudFileTagCreateBulk) Exec(ctx context.Context) error
- func (c *CloudFileTagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cftcb *CloudFileTagCreateBulk) ExecX(ctx context.Context)
- func (c *CloudFileTagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cftcb *CloudFileTagCreateBulk) Save(ctx context.Context) ([]*CloudFileTag, error)
- func (cftcb *CloudFileTagCreateBulk) SaveX(ctx context.Context) []*CloudFileTag
- type CloudFileTagDelete
- func (cftd *CloudFileTagDelete) Exec(ctx context.Context) (int, error)
- func (c *CloudFileTagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cftd *CloudFileTagDelete) ExecX(ctx context.Context) int
- func (c *CloudFileTagDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cftd *CloudFileTagDelete) Where(ps ...predicate.CloudFileTag) *CloudFileTagDelete
- type CloudFileTagDeleteOne
- type CloudFileTagEdges
- type CloudFileTagGroupBy
- func (cftgb *CloudFileTagGroupBy) Aggregate(fns ...AggregateFunc) *CloudFileTagGroupBy
- func (s *CloudFileTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CloudFileTagGroupBy) BoolX(ctx context.Context) bool
- func (s *CloudFileTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CloudFileTagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CloudFileTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CloudFileTagGroupBy) Float64X(ctx context.Context) float64
- func (s *CloudFileTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CloudFileTagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CloudFileTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CloudFileTagGroupBy) IntX(ctx context.Context) int
- func (s *CloudFileTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CloudFileTagGroupBy) IntsX(ctx context.Context) []int
- func (cftgb *CloudFileTagGroupBy) Scan(ctx context.Context, v any) error
- func (s *CloudFileTagGroupBy) ScanX(ctx context.Context, v any)
- func (s *CloudFileTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CloudFileTagGroupBy) StringX(ctx context.Context) string
- func (s *CloudFileTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CloudFileTagGroupBy) StringsX(ctx context.Context) []string
- type CloudFileTagMutation
- func (m *CloudFileTagMutation) AddCloudFileIDs(ids ...uuid.UUID)
- func (m *CloudFileTagMutation) AddField(name string, value ent.Value) error
- func (m *CloudFileTagMutation) AddStatus(u int8)
- func (m *CloudFileTagMutation) AddedEdges() []string
- func (m *CloudFileTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *CloudFileTagMutation) AddedFields() []string
- func (m *CloudFileTagMutation) AddedIDs(name string) []ent.Value
- func (m *CloudFileTagMutation) AddedStatus() (r int8, exists bool)
- func (m *CloudFileTagMutation) ClearCloudFiles()
- func (m *CloudFileTagMutation) ClearEdge(name string) error
- func (m *CloudFileTagMutation) ClearField(name string) error
- func (m *CloudFileTagMutation) ClearRemark()
- func (m *CloudFileTagMutation) ClearStatus()
- func (m *CloudFileTagMutation) ClearedEdges() []string
- func (m *CloudFileTagMutation) ClearedFields() []string
- func (m CloudFileTagMutation) Client() *Client
- func (m *CloudFileTagMutation) CloudFilesCleared() bool
- func (m *CloudFileTagMutation) CloudFilesIDs() (ids []uuid.UUID)
- func (m *CloudFileTagMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CloudFileTagMutation) EdgeCleared(name string) bool
- func (c *CloudFileTagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *CloudFileTagMutation) Field(name string) (ent.Value, bool)
- func (m *CloudFileTagMutation) FieldCleared(name string) bool
- func (m *CloudFileTagMutation) Fields() []string
- func (m *CloudFileTagMutation) ID() (id uint64, exists bool)
- func (m *CloudFileTagMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *CloudFileTagMutation) Name() (r string, exists bool)
- func (m *CloudFileTagMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CloudFileTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CloudFileTagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CloudFileTagMutation) OldRemark(ctx context.Context) (v string, err error)
- func (m *CloudFileTagMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *CloudFileTagMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CloudFileTagMutation) Op() Op
- func (c *CloudFileTagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *CloudFileTagMutation) Remark() (r string, exists bool)
- func (m *CloudFileTagMutation) RemarkCleared() bool
- func (m *CloudFileTagMutation) RemoveCloudFileIDs(ids ...uuid.UUID)
- func (m *CloudFileTagMutation) RemovedCloudFilesIDs() (ids []uuid.UUID)
- func (m *CloudFileTagMutation) RemovedEdges() []string
- func (m *CloudFileTagMutation) RemovedIDs(name string) []ent.Value
- func (m *CloudFileTagMutation) ResetCloudFiles()
- func (m *CloudFileTagMutation) ResetCreatedAt()
- func (m *CloudFileTagMutation) ResetEdge(name string) error
- func (m *CloudFileTagMutation) ResetField(name string) error
- func (m *CloudFileTagMutation) ResetName()
- func (m *CloudFileTagMutation) ResetRemark()
- func (m *CloudFileTagMutation) ResetStatus()
- func (m *CloudFileTagMutation) ResetUpdatedAt()
- func (m *CloudFileTagMutation) SetCreatedAt(t time.Time)
- func (m *CloudFileTagMutation) SetField(name string, value ent.Value) error
- func (m *CloudFileTagMutation) SetID(id uint64)
- func (m *CloudFileTagMutation) SetName(s string)
- func (m *CloudFileTagMutation) SetOp(op Op)
- func (m *CloudFileTagMutation) SetRemark(s string)
- func (m *CloudFileTagMutation) SetStatus(u uint8)
- func (m *CloudFileTagMutation) SetUpdatedAt(t time.Time)
- func (m *CloudFileTagMutation) Status() (r uint8, exists bool)
- func (m *CloudFileTagMutation) StatusCleared() bool
- func (m CloudFileTagMutation) Tx() (*Tx, error)
- func (m *CloudFileTagMutation) Type() string
- func (m *CloudFileTagMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CloudFileTagMutation) Where(ps ...predicate.CloudFileTag)
- func (m *CloudFileTagMutation) WhereP(ps ...func(*sql.Selector))
- type CloudFileTagPageList
- type CloudFileTagPager
- type CloudFileTagPaginateOption
- type CloudFileTagQuery
- func (cftq *CloudFileTagQuery) Aggregate(fns ...AggregateFunc) *CloudFileTagSelect
- func (cftq *CloudFileTagQuery) All(ctx context.Context) ([]*CloudFileTag, error)
- func (cftq *CloudFileTagQuery) AllX(ctx context.Context) []*CloudFileTag
- func (cftq *CloudFileTagQuery) Clone() *CloudFileTagQuery
- func (cftq *CloudFileTagQuery) Count(ctx context.Context) (int, error)
- func (cftq *CloudFileTagQuery) CountX(ctx context.Context) int
- func (c *CloudFileTagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cftq *CloudFileTagQuery) Exist(ctx context.Context) (bool, error)
- func (cftq *CloudFileTagQuery) ExistX(ctx context.Context) bool
- func (cftq *CloudFileTagQuery) First(ctx context.Context) (*CloudFileTag, error)
- func (cftq *CloudFileTagQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (cftq *CloudFileTagQuery) FirstIDX(ctx context.Context) uint64
- func (cftq *CloudFileTagQuery) FirstX(ctx context.Context) *CloudFileTag
- func (cftq *CloudFileTagQuery) GroupBy(field string, fields ...string) *CloudFileTagGroupBy
- func (cftq *CloudFileTagQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (cftq *CloudFileTagQuery) IDsX(ctx context.Context) []uint64
- func (cftq *CloudFileTagQuery) Limit(limit int) *CloudFileTagQuery
- func (cftq *CloudFileTagQuery) Offset(offset int) *CloudFileTagQuery
- func (cftq *CloudFileTagQuery) Only(ctx context.Context) (*CloudFileTag, error)
- func (cftq *CloudFileTagQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (cftq *CloudFileTagQuery) OnlyIDX(ctx context.Context) uint64
- func (cftq *CloudFileTagQuery) OnlyX(ctx context.Context) *CloudFileTag
- func (cftq *CloudFileTagQuery) Order(o ...cloudfiletag.OrderOption) *CloudFileTagQuery
- func (cft *CloudFileTagQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*CloudFileTagPageList, error)
- func (cftq *CloudFileTagQuery) QueryCloudFiles() *CloudFileQuery
- func (c *CloudFileTagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cftq *CloudFileTagQuery) Select(fields ...string) *CloudFileTagSelect
- func (cftq *CloudFileTagQuery) Unique(unique bool) *CloudFileTagQuery
- func (cftq *CloudFileTagQuery) Where(ps ...predicate.CloudFileTag) *CloudFileTagQuery
- func (cftq *CloudFileTagQuery) WithCloudFiles(opts ...func(*CloudFileQuery)) *CloudFileTagQuery
- type CloudFileTagSelect
- func (cfts *CloudFileTagSelect) Aggregate(fns ...AggregateFunc) *CloudFileTagSelect
- func (s *CloudFileTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CloudFileTagSelect) BoolX(ctx context.Context) bool
- func (s *CloudFileTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CloudFileTagSelect) BoolsX(ctx context.Context) []bool
- func (c CloudFileTagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *CloudFileTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CloudFileTagSelect) Float64X(ctx context.Context) float64
- func (s *CloudFileTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CloudFileTagSelect) Float64sX(ctx context.Context) []float64
- func (s *CloudFileTagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CloudFileTagSelect) IntX(ctx context.Context) int
- func (s *CloudFileTagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CloudFileTagSelect) IntsX(ctx context.Context) []int
- func (c CloudFileTagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfts *CloudFileTagSelect) Scan(ctx context.Context, v any) error
- func (s *CloudFileTagSelect) ScanX(ctx context.Context, v any)
- func (s *CloudFileTagSelect) String(ctx context.Context) (_ string, err error)
- func (s *CloudFileTagSelect) StringX(ctx context.Context) string
- func (s *CloudFileTagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CloudFileTagSelect) StringsX(ctx context.Context) []string
- type CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) AddCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) AddCloudFiles(c ...*CloudFile) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) AddStatus(u int8) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) ClearCloudFiles() *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) ClearRemark() *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) ClearStatus() *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) Exec(ctx context.Context) error
- func (c *CloudFileTagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cftu *CloudFileTagUpdate) ExecX(ctx context.Context)
- func (cftu *CloudFileTagUpdate) Mutation() *CloudFileTagMutation
- func (c *CloudFileTagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cftu *CloudFileTagUpdate) RemoveCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) RemoveCloudFiles(c ...*CloudFile) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) Save(ctx context.Context) (int, error)
- func (cftu *CloudFileTagUpdate) SaveX(ctx context.Context) int
- func (cftu *CloudFileTagUpdate) SetName(s string) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) SetNillableName(s *string) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) SetNillableRemark(s *string) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) SetNillableStatus(u *uint8) *CloudFileTagUpdate
- func (cft *CloudFileTagUpdate) SetNotNilName(value *string) *CloudFileTagUpdate
- func (cft *CloudFileTagUpdate) SetNotNilRemark(value *string) *CloudFileTagUpdate
- func (cft *CloudFileTagUpdate) SetNotNilStatus(value *uint8) *CloudFileTagUpdate
- func (cft *CloudFileTagUpdate) SetNotNilUpdatedAt(value *time.Time) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) SetRemark(s string) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) SetStatus(u uint8) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) SetUpdatedAt(t time.Time) *CloudFileTagUpdate
- func (cftu *CloudFileTagUpdate) Where(ps ...predicate.CloudFileTag) *CloudFileTagUpdate
- type CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) AddCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) AddCloudFiles(c ...*CloudFile) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) AddStatus(u int8) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) ClearCloudFiles() *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) ClearRemark() *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) ClearStatus() *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) Exec(ctx context.Context) error
- func (c *CloudFileTagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cftuo *CloudFileTagUpdateOne) ExecX(ctx context.Context)
- func (cftuo *CloudFileTagUpdateOne) Mutation() *CloudFileTagMutation
- func (c *CloudFileTagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cftuo *CloudFileTagUpdateOne) RemoveCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) RemoveCloudFiles(c ...*CloudFile) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) Save(ctx context.Context) (*CloudFileTag, error)
- func (cftuo *CloudFileTagUpdateOne) SaveX(ctx context.Context) *CloudFileTag
- func (cftuo *CloudFileTagUpdateOne) Select(field string, fields ...string) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetName(s string) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetNillableName(s *string) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetNillableRemark(s *string) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetNillableStatus(u *uint8) *CloudFileTagUpdateOne
- func (cft *CloudFileTagUpdateOne) SetNotNilName(value *string) *CloudFileTagUpdateOne
- func (cft *CloudFileTagUpdateOne) SetNotNilRemark(value *string) *CloudFileTagUpdateOne
- func (cft *CloudFileTagUpdateOne) SetNotNilStatus(value *uint8) *CloudFileTagUpdateOne
- func (cft *CloudFileTagUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetRemark(s string) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetStatus(u uint8) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) SetUpdatedAt(t time.Time) *CloudFileTagUpdateOne
- func (cftuo *CloudFileTagUpdateOne) Where(ps ...predicate.CloudFileTag) *CloudFileTagUpdateOne
- type CloudFileTags
- type CloudFileUpdate
- func (cfu *CloudFileUpdate) AddFileType(u int8) *CloudFileUpdate
- func (cfu *CloudFileUpdate) AddSize(u int64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) AddTagIDs(ids ...uint64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) AddTags(c ...*CloudFileTag) *CloudFileUpdate
- func (cfu *CloudFileUpdate) ClearState() *CloudFileUpdate
- func (cfu *CloudFileUpdate) ClearStorageProviders() *CloudFileUpdate
- func (cfu *CloudFileUpdate) ClearTags() *CloudFileUpdate
- func (cfu *CloudFileUpdate) Exec(ctx context.Context) error
- func (c *CloudFileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cfu *CloudFileUpdate) ExecX(ctx context.Context)
- func (cfu *CloudFileUpdate) Mutation() *CloudFileMutation
- func (c *CloudFileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfu *CloudFileUpdate) RemoveTagIDs(ids ...uint64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) RemoveTags(c ...*CloudFileTag) *CloudFileUpdate
- func (cfu *CloudFileUpdate) Save(ctx context.Context) (int, error)
- func (cfu *CloudFileUpdate) SaveX(ctx context.Context) int
- func (cfu *CloudFileUpdate) SetFileType(u uint8) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetName(s string) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableFileType(u *uint8) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableName(s *string) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableSize(u *uint64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableState(b *bool) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableStorageProvidersID(id *uint64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableURL(s *string) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetNillableUserID(s *string) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilFileType(value *uint8) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilName(value *string) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilSize(value *uint64) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilState(value *bool) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilURL(value *string) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilUpdatedAt(value *time.Time) *CloudFileUpdate
- func (cf *CloudFileUpdate) SetNotNilUserID(value *string) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetSize(u uint64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetState(b bool) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetStorageProviders(s *StorageProvider) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetStorageProvidersID(id uint64) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetURL(s string) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetUpdatedAt(t time.Time) *CloudFileUpdate
- func (cfu *CloudFileUpdate) SetUserID(s string) *CloudFileUpdate
- func (cfu *CloudFileUpdate) Where(ps ...predicate.CloudFile) *CloudFileUpdate
- type CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) AddFileType(u int8) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) AddSize(u int64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) AddTagIDs(ids ...uint64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) AddTags(c ...*CloudFileTag) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) ClearState() *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) ClearStorageProviders() *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) ClearTags() *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) Exec(ctx context.Context) error
- func (c *CloudFileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cfuo *CloudFileUpdateOne) ExecX(ctx context.Context)
- func (cfuo *CloudFileUpdateOne) Mutation() *CloudFileMutation
- func (c *CloudFileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cfuo *CloudFileUpdateOne) RemoveTagIDs(ids ...uint64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) RemoveTags(c ...*CloudFileTag) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) Save(ctx context.Context) (*CloudFile, error)
- func (cfuo *CloudFileUpdateOne) SaveX(ctx context.Context) *CloudFile
- func (cfuo *CloudFileUpdateOne) Select(field string, fields ...string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetFileType(u uint8) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetName(s string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableFileType(u *uint8) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableName(s *string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableSize(u *uint64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableState(b *bool) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableStorageProvidersID(id *uint64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableURL(s *string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetNillableUserID(s *string) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilFileType(value *uint8) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilName(value *string) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilSize(value *uint64) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilState(value *bool) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilURL(value *string) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CloudFileUpdateOne
- func (cf *CloudFileUpdateOne) SetNotNilUserID(value *string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetSize(u uint64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetState(b bool) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetStorageProviders(s *StorageProvider) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetStorageProvidersID(id uint64) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetURL(s string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetUpdatedAt(t time.Time) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) SetUserID(s string) *CloudFileUpdateOne
- func (cfuo *CloudFileUpdateOne) Where(ps ...predicate.CloudFile) *CloudFileUpdateOne
- type CloudFiles
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type File
- func (c *File) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *File) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (f *File) QueryTags() *FileTagQuery
- func (f *File) String() string
- func (f *File) Unwrap() *File
- func (f *File) Update() *FileUpdateOne
- func (f *File) Value(name string) (ent.Value, error)
- type FileClient
- func (c *FileClient) Create() *FileCreate
- func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
- func (c *FileClient) Delete() *FileDelete
- func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
- func (c *FileClient) DeleteOneID(id uuid.UUID) *FileDeleteOne
- func (c *FileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *FileClient) Get(ctx context.Context, id uuid.UUID) (*File, error)
- func (c *FileClient) GetX(ctx context.Context, id uuid.UUID) *File
- func (c *FileClient) Hooks() []Hook
- func (c *FileClient) Intercept(interceptors ...Interceptor)
- func (c *FileClient) Interceptors() []Interceptor
- func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *FileClient) QueryTags(f *File) *FileTagQuery
- func (c *FileClient) Update() *FileUpdate
- func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id uuid.UUID) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileCreate
- func (fc *FileCreate) AddTagIDs(ids ...uint64) *FileCreate
- func (fc *FileCreate) AddTags(f ...*FileTag) *FileCreate
- func (fc *FileCreate) Exec(ctx context.Context) error
- func (c *FileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fc *FileCreate) ExecX(ctx context.Context)
- func (fc *FileCreate) Mutation() *FileMutation
- func (c *FileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fc *FileCreate) Save(ctx context.Context) (*File, error)
- func (fc *FileCreate) SaveX(ctx context.Context) *File
- func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetFileType(u uint8) *FileCreate
- func (fc *FileCreate) SetID(u uuid.UUID) *FileCreate
- func (fc *FileCreate) SetMd5(s string) *FileCreate
- func (fc *FileCreate) SetName(s string) *FileCreate
- func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableID(u *uuid.UUID) *FileCreate
- func (fc *FileCreate) SetNillableStatus(u *uint8) *FileCreate
- func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
- func (f *FileCreate) SetNotNilFileType(value *uint8) *FileCreate
- func (f *FileCreate) SetNotNilMd5(value *string) *FileCreate
- func (f *FileCreate) SetNotNilName(value *string) *FileCreate
- func (f *FileCreate) SetNotNilPath(value *string) *FileCreate
- func (f *FileCreate) SetNotNilSize(value *uint64) *FileCreate
- func (f *FileCreate) SetNotNilStatus(value *uint8) *FileCreate
- func (f *FileCreate) SetNotNilUpdatedAt(value *time.Time) *FileCreate
- func (f *FileCreate) SetNotNilUserID(value *string) *FileCreate
- func (fc *FileCreate) SetPath(s string) *FileCreate
- func (fc *FileCreate) SetSize(u uint64) *FileCreate
- func (fc *FileCreate) SetStatus(u uint8) *FileCreate
- func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetUserID(s string) *FileCreate
- type FileCreateBulk
- func (fcb *FileCreateBulk) Exec(ctx context.Context) error
- func (c *FileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fcb *FileCreateBulk) ExecX(ctx context.Context)
- func (c *FileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)
- func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File
- type FileDelete
- func (fd *FileDelete) Exec(ctx context.Context) (int, error)
- func (c *FileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fd *FileDelete) ExecX(ctx context.Context) int
- func (c *FileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
- type FileDeleteOne
- type FileEdges
- type FileGroupBy
- func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
- func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileGroupBy) BoolX(ctx context.Context) bool
- func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileGroupBy) Float64X(ctx context.Context) float64
- func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileGroupBy) IntX(ctx context.Context) int
- func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileGroupBy) StringX(ctx context.Context) string
- func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileGroupBy) StringsX(ctx context.Context) []string
- type FileMutation
- func (m *FileMutation) AddField(name string, value ent.Value) error
- func (m *FileMutation) AddFileType(u int8)
- func (m *FileMutation) AddSize(u int64)
- func (m *FileMutation) AddStatus(u int8)
- func (m *FileMutation) AddTagIDs(ids ...uint64)
- func (m *FileMutation) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedFileType() (r int8, exists bool)
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) AddedSize() (r int64, exists bool)
- func (m *FileMutation) AddedStatus() (r int8, exists bool)
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearStatus()
- func (m *FileMutation) ClearTags()
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FileMutation) EdgeCleared(name string) bool
- func (c *FileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) FileType() (r uint8, exists bool)
- func (m *FileMutation) ID() (id uuid.UUID, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *FileMutation) Md5() (r string, exists bool)
- func (m *FileMutation) Name() (r string, exists bool)
- func (m *FileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) OldFileType(ctx context.Context) (v uint8, err error)
- func (m *FileMutation) OldMd5(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldSize(ctx context.Context) (v uint64, err error)
- func (m *FileMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *FileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) Path() (r string, exists bool)
- func (c *FileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *FileMutation) RemoveTagIDs(ids ...uint64)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) RemovedTagsIDs() (ids []uint64)
- func (m *FileMutation) ResetCreatedAt()
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetFileType()
- func (m *FileMutation) ResetMd5()
- func (m *FileMutation) ResetName()
- func (m *FileMutation) ResetPath()
- func (m *FileMutation) ResetSize()
- func (m *FileMutation) ResetStatus()
- func (m *FileMutation) ResetTags()
- func (m *FileMutation) ResetUpdatedAt()
- func (m *FileMutation) ResetUserID()
- func (m *FileMutation) SetCreatedAt(t time.Time)
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetFileType(u uint8)
- func (m *FileMutation) SetID(id uuid.UUID)
- func (m *FileMutation) SetMd5(s string)
- func (m *FileMutation) SetName(s string)
- func (m *FileMutation) SetOp(op Op)
- func (m *FileMutation) SetPath(s string)
- func (m *FileMutation) SetSize(u uint64)
- func (m *FileMutation) SetStatus(u uint8)
- func (m *FileMutation) SetUpdatedAt(t time.Time)
- func (m *FileMutation) SetUserID(s string)
- func (m *FileMutation) Size() (r uint64, exists bool)
- func (m *FileMutation) Status() (r uint8, exists bool)
- func (m *FileMutation) StatusCleared() bool
- func (m *FileMutation) TagsCleared() bool
- func (m *FileMutation) TagsIDs() (ids []uint64)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FileMutation) UserID() (r string, exists bool)
- func (m *FileMutation) Where(ps ...predicate.File)
- func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
- type FilePageList
- type FilePager
- type FilePaginateOption
- type FileQuery
- func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
- func (fq *FileQuery) All(ctx context.Context) ([]*File, error)
- func (fq *FileQuery) AllX(ctx context.Context) []*File
- func (fq *FileQuery) Clone() *FileQuery
- func (fq *FileQuery) Count(ctx context.Context) (int, error)
- func (fq *FileQuery) CountX(ctx context.Context) int
- func (c *FileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fq *FileQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FileQuery) ExistX(ctx context.Context) bool
- func (fq *FileQuery) First(ctx context.Context) (*File, error)
- func (fq *FileQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FileQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (fq *FileQuery) FirstX(ctx context.Context) *File
- func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (fq *FileQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (fq *FileQuery) IDsX(ctx context.Context) []uuid.UUID
- func (fq *FileQuery) Limit(limit int) *FileQuery
- func (fq *FileQuery) Offset(offset int) *FileQuery
- func (fq *FileQuery) Only(ctx context.Context) (*File, error)
- func (fq *FileQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (fq *FileQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (fq *FileQuery) OnlyX(ctx context.Context) *File
- func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
- func (f *FileQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*FilePageList, error)
- func (c *FileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fq *FileQuery) QueryTags() *FileTagQuery
- func (fq *FileQuery) Select(fields ...string) *FileSelect
- func (fq *FileQuery) Unique(unique bool) *FileQuery
- func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery
- func (fq *FileQuery) WithTags(opts ...func(*FileTagQuery)) *FileQuery
- type FileSelect
- func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
- func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileSelect) BoolX(ctx context.Context) bool
- func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileSelect) BoolsX(ctx context.Context) []bool
- func (c FileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileSelect) Float64X(ctx context.Context) float64
- func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileSelect) Float64sX(ctx context.Context) []float64
- func (s *FileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileSelect) IntX(ctx context.Context) int
- func (s *FileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileSelect) IntsX(ctx context.Context) []int
- func (c FileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fs *FileSelect) Scan(ctx context.Context, v any) error
- func (s *FileSelect) ScanX(ctx context.Context, v any)
- func (s *FileSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileSelect) StringX(ctx context.Context) string
- func (s *FileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileSelect) StringsX(ctx context.Context) []string
- type FileTag
- func (c *FileTag) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *FileTag) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ft *FileTag) QueryFiles() *FileQuery
- func (ft *FileTag) String() string
- func (ft *FileTag) Unwrap() *FileTag
- func (ft *FileTag) Update() *FileTagUpdateOne
- func (ft *FileTag) Value(name string) (ent.Value, error)
- type FileTagClient
- func (c *FileTagClient) Create() *FileTagCreate
- func (c *FileTagClient) CreateBulk(builders ...*FileTagCreate) *FileTagCreateBulk
- func (c *FileTagClient) Delete() *FileTagDelete
- func (c *FileTagClient) DeleteOne(ft *FileTag) *FileTagDeleteOne
- func (c *FileTagClient) DeleteOneID(id uint64) *FileTagDeleteOne
- func (c *FileTagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *FileTagClient) Get(ctx context.Context, id uint64) (*FileTag, error)
- func (c *FileTagClient) GetX(ctx context.Context, id uint64) *FileTag
- func (c *FileTagClient) Hooks() []Hook
- func (c *FileTagClient) Intercept(interceptors ...Interceptor)
- func (c *FileTagClient) Interceptors() []Interceptor
- func (c *FileTagClient) MapCreateBulk(slice any, setFunc func(*FileTagCreate, int)) *FileTagCreateBulk
- func (c *FileTagClient) Query() *FileTagQuery
- func (c *FileTagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *FileTagClient) QueryFiles(ft *FileTag) *FileQuery
- func (c *FileTagClient) Update() *FileTagUpdate
- func (c *FileTagClient) UpdateOne(ft *FileTag) *FileTagUpdateOne
- func (c *FileTagClient) UpdateOneID(id uint64) *FileTagUpdateOne
- func (c *FileTagClient) Use(hooks ...Hook)
- type FileTagCreate
- func (ftc *FileTagCreate) AddFileIDs(ids ...uuid.UUID) *FileTagCreate
- func (ftc *FileTagCreate) AddFiles(f ...*File) *FileTagCreate
- func (ftc *FileTagCreate) Exec(ctx context.Context) error
- func (c *FileTagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ftc *FileTagCreate) ExecX(ctx context.Context)
- func (ftc *FileTagCreate) Mutation() *FileTagMutation
- func (c *FileTagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ftc *FileTagCreate) Save(ctx context.Context) (*FileTag, error)
- func (ftc *FileTagCreate) SaveX(ctx context.Context) *FileTag
- func (ftc *FileTagCreate) SetCreatedAt(t time.Time) *FileTagCreate
- func (ftc *FileTagCreate) SetID(u uint64) *FileTagCreate
- func (ftc *FileTagCreate) SetName(s string) *FileTagCreate
- func (ftc *FileTagCreate) SetNillableCreatedAt(t *time.Time) *FileTagCreate
- func (ftc *FileTagCreate) SetNillableRemark(s *string) *FileTagCreate
- func (ftc *FileTagCreate) SetNillableStatus(u *uint8) *FileTagCreate
- func (ftc *FileTagCreate) SetNillableUpdatedAt(t *time.Time) *FileTagCreate
- func (ft *FileTagCreate) SetNotNilName(value *string) *FileTagCreate
- func (ft *FileTagCreate) SetNotNilRemark(value *string) *FileTagCreate
- func (ft *FileTagCreate) SetNotNilStatus(value *uint8) *FileTagCreate
- func (ft *FileTagCreate) SetNotNilUpdatedAt(value *time.Time) *FileTagCreate
- func (ftc *FileTagCreate) SetRemark(s string) *FileTagCreate
- func (ftc *FileTagCreate) SetStatus(u uint8) *FileTagCreate
- func (ftc *FileTagCreate) SetUpdatedAt(t time.Time) *FileTagCreate
- type FileTagCreateBulk
- func (ftcb *FileTagCreateBulk) Exec(ctx context.Context) error
- func (c *FileTagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ftcb *FileTagCreateBulk) ExecX(ctx context.Context)
- func (c *FileTagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ftcb *FileTagCreateBulk) Save(ctx context.Context) ([]*FileTag, error)
- func (ftcb *FileTagCreateBulk) SaveX(ctx context.Context) []*FileTag
- type FileTagDelete
- func (ftd *FileTagDelete) Exec(ctx context.Context) (int, error)
- func (c *FileTagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ftd *FileTagDelete) ExecX(ctx context.Context) int
- func (c *FileTagDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ftd *FileTagDelete) Where(ps ...predicate.FileTag) *FileTagDelete
- type FileTagDeleteOne
- type FileTagEdges
- type FileTagGroupBy
- func (ftgb *FileTagGroupBy) Aggregate(fns ...AggregateFunc) *FileTagGroupBy
- func (s *FileTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileTagGroupBy) BoolX(ctx context.Context) bool
- func (s *FileTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileTagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileTagGroupBy) Float64X(ctx context.Context) float64
- func (s *FileTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileTagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileTagGroupBy) IntX(ctx context.Context) int
- func (s *FileTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileTagGroupBy) IntsX(ctx context.Context) []int
- func (ftgb *FileTagGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileTagGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileTagGroupBy) StringX(ctx context.Context) string
- func (s *FileTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileTagGroupBy) StringsX(ctx context.Context) []string
- type FileTagMutation
- func (m *FileTagMutation) AddField(name string, value ent.Value) error
- func (m *FileTagMutation) AddFileIDs(ids ...uuid.UUID)
- func (m *FileTagMutation) AddStatus(u int8)
- func (m *FileTagMutation) AddedEdges() []string
- func (m *FileTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileTagMutation) AddedFields() []string
- func (m *FileTagMutation) AddedIDs(name string) []ent.Value
- func (m *FileTagMutation) AddedStatus() (r int8, exists bool)
- func (m *FileTagMutation) ClearEdge(name string) error
- func (m *FileTagMutation) ClearField(name string) error
- func (m *FileTagMutation) ClearFiles()
- func (m *FileTagMutation) ClearRemark()
- func (m *FileTagMutation) ClearStatus()
- func (m *FileTagMutation) ClearedEdges() []string
- func (m *FileTagMutation) ClearedFields() []string
- func (m FileTagMutation) Client() *Client
- func (m *FileTagMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FileTagMutation) EdgeCleared(name string) bool
- func (c *FileTagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *FileTagMutation) Field(name string) (ent.Value, bool)
- func (m *FileTagMutation) FieldCleared(name string) bool
- func (m *FileTagMutation) Fields() []string
- func (m *FileTagMutation) FilesCleared() bool
- func (m *FileTagMutation) FilesIDs() (ids []uuid.UUID)
- func (m *FileTagMutation) ID() (id uint64, exists bool)
- func (m *FileTagMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *FileTagMutation) Name() (r string, exists bool)
- func (m *FileTagMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileTagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FileTagMutation) OldRemark(ctx context.Context) (v string, err error)
- func (m *FileTagMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *FileTagMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileTagMutation) Op() Op
- func (c *FileTagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *FileTagMutation) Remark() (r string, exists bool)
- func (m *FileTagMutation) RemarkCleared() bool
- func (m *FileTagMutation) RemoveFileIDs(ids ...uuid.UUID)
- func (m *FileTagMutation) RemovedEdges() []string
- func (m *FileTagMutation) RemovedFilesIDs() (ids []uuid.UUID)
- func (m *FileTagMutation) RemovedIDs(name string) []ent.Value
- func (m *FileTagMutation) ResetCreatedAt()
- func (m *FileTagMutation) ResetEdge(name string) error
- func (m *FileTagMutation) ResetField(name string) error
- func (m *FileTagMutation) ResetFiles()
- func (m *FileTagMutation) ResetName()
- func (m *FileTagMutation) ResetRemark()
- func (m *FileTagMutation) ResetStatus()
- func (m *FileTagMutation) ResetUpdatedAt()
- func (m *FileTagMutation) SetCreatedAt(t time.Time)
- func (m *FileTagMutation) SetField(name string, value ent.Value) error
- func (m *FileTagMutation) SetID(id uint64)
- func (m *FileTagMutation) SetName(s string)
- func (m *FileTagMutation) SetOp(op Op)
- func (m *FileTagMutation) SetRemark(s string)
- func (m *FileTagMutation) SetStatus(u uint8)
- func (m *FileTagMutation) SetUpdatedAt(t time.Time)
- func (m *FileTagMutation) Status() (r uint8, exists bool)
- func (m *FileTagMutation) StatusCleared() bool
- func (m FileTagMutation) Tx() (*Tx, error)
- func (m *FileTagMutation) Type() string
- func (m *FileTagMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FileTagMutation) Where(ps ...predicate.FileTag)
- func (m *FileTagMutation) WhereP(ps ...func(*sql.Selector))
- type FileTagPageList
- type FileTagPager
- type FileTagPaginateOption
- type FileTagQuery
- func (ftq *FileTagQuery) Aggregate(fns ...AggregateFunc) *FileTagSelect
- func (ftq *FileTagQuery) All(ctx context.Context) ([]*FileTag, error)
- func (ftq *FileTagQuery) AllX(ctx context.Context) []*FileTag
- func (ftq *FileTagQuery) Clone() *FileTagQuery
- func (ftq *FileTagQuery) Count(ctx context.Context) (int, error)
- func (ftq *FileTagQuery) CountX(ctx context.Context) int
- func (c *FileTagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ftq *FileTagQuery) Exist(ctx context.Context) (bool, error)
- func (ftq *FileTagQuery) ExistX(ctx context.Context) bool
- func (ftq *FileTagQuery) First(ctx context.Context) (*FileTag, error)
- func (ftq *FileTagQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (ftq *FileTagQuery) FirstIDX(ctx context.Context) uint64
- func (ftq *FileTagQuery) FirstX(ctx context.Context) *FileTag
- func (ftq *FileTagQuery) GroupBy(field string, fields ...string) *FileTagGroupBy
- func (ftq *FileTagQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (ftq *FileTagQuery) IDsX(ctx context.Context) []uint64
- func (ftq *FileTagQuery) Limit(limit int) *FileTagQuery
- func (ftq *FileTagQuery) Offset(offset int) *FileTagQuery
- func (ftq *FileTagQuery) Only(ctx context.Context) (*FileTag, error)
- func (ftq *FileTagQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (ftq *FileTagQuery) OnlyIDX(ctx context.Context) uint64
- func (ftq *FileTagQuery) OnlyX(ctx context.Context) *FileTag
- func (ftq *FileTagQuery) Order(o ...filetag.OrderOption) *FileTagQuery
- func (ft *FileTagQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*FileTagPageList, error)
- func (c *FileTagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ftq *FileTagQuery) QueryFiles() *FileQuery
- func (ftq *FileTagQuery) Select(fields ...string) *FileTagSelect
- func (ftq *FileTagQuery) Unique(unique bool) *FileTagQuery
- func (ftq *FileTagQuery) Where(ps ...predicate.FileTag) *FileTagQuery
- func (ftq *FileTagQuery) WithFiles(opts ...func(*FileQuery)) *FileTagQuery
- type FileTagSelect
- func (fts *FileTagSelect) Aggregate(fns ...AggregateFunc) *FileTagSelect
- func (s *FileTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileTagSelect) BoolX(ctx context.Context) bool
- func (s *FileTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileTagSelect) BoolsX(ctx context.Context) []bool
- func (c FileTagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *FileTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileTagSelect) Float64X(ctx context.Context) float64
- func (s *FileTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileTagSelect) Float64sX(ctx context.Context) []float64
- func (s *FileTagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileTagSelect) IntX(ctx context.Context) int
- func (s *FileTagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileTagSelect) IntsX(ctx context.Context) []int
- func (c FileTagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fts *FileTagSelect) Scan(ctx context.Context, v any) error
- func (s *FileTagSelect) ScanX(ctx context.Context, v any)
- func (s *FileTagSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileTagSelect) StringX(ctx context.Context) string
- func (s *FileTagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileTagSelect) StringsX(ctx context.Context) []string
- type FileTagUpdate
- func (ftu *FileTagUpdate) AddFileIDs(ids ...uuid.UUID) *FileTagUpdate
- func (ftu *FileTagUpdate) AddFiles(f ...*File) *FileTagUpdate
- func (ftu *FileTagUpdate) AddStatus(u int8) *FileTagUpdate
- func (ftu *FileTagUpdate) ClearFiles() *FileTagUpdate
- func (ftu *FileTagUpdate) ClearRemark() *FileTagUpdate
- func (ftu *FileTagUpdate) ClearStatus() *FileTagUpdate
- func (ftu *FileTagUpdate) Exec(ctx context.Context) error
- func (c *FileTagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ftu *FileTagUpdate) ExecX(ctx context.Context)
- func (ftu *FileTagUpdate) Mutation() *FileTagMutation
- func (c *FileTagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ftu *FileTagUpdate) RemoveFileIDs(ids ...uuid.UUID) *FileTagUpdate
- func (ftu *FileTagUpdate) RemoveFiles(f ...*File) *FileTagUpdate
- func (ftu *FileTagUpdate) Save(ctx context.Context) (int, error)
- func (ftu *FileTagUpdate) SaveX(ctx context.Context) int
- func (ftu *FileTagUpdate) SetName(s string) *FileTagUpdate
- func (ftu *FileTagUpdate) SetNillableName(s *string) *FileTagUpdate
- func (ftu *FileTagUpdate) SetNillableRemark(s *string) *FileTagUpdate
- func (ftu *FileTagUpdate) SetNillableStatus(u *uint8) *FileTagUpdate
- func (ft *FileTagUpdate) SetNotNilName(value *string) *FileTagUpdate
- func (ft *FileTagUpdate) SetNotNilRemark(value *string) *FileTagUpdate
- func (ft *FileTagUpdate) SetNotNilStatus(value *uint8) *FileTagUpdate
- func (ft *FileTagUpdate) SetNotNilUpdatedAt(value *time.Time) *FileTagUpdate
- func (ftu *FileTagUpdate) SetRemark(s string) *FileTagUpdate
- func (ftu *FileTagUpdate) SetStatus(u uint8) *FileTagUpdate
- func (ftu *FileTagUpdate) SetUpdatedAt(t time.Time) *FileTagUpdate
- func (ftu *FileTagUpdate) Where(ps ...predicate.FileTag) *FileTagUpdate
- type FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) AddFileIDs(ids ...uuid.UUID) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) AddFiles(f ...*File) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) AddStatus(u int8) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) ClearFiles() *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) ClearRemark() *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) ClearStatus() *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) Exec(ctx context.Context) error
- func (c *FileTagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ftuo *FileTagUpdateOne) ExecX(ctx context.Context)
- func (ftuo *FileTagUpdateOne) Mutation() *FileTagMutation
- func (c *FileTagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ftuo *FileTagUpdateOne) RemoveFileIDs(ids ...uuid.UUID) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) RemoveFiles(f ...*File) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) Save(ctx context.Context) (*FileTag, error)
- func (ftuo *FileTagUpdateOne) SaveX(ctx context.Context) *FileTag
- func (ftuo *FileTagUpdateOne) Select(field string, fields ...string) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetName(s string) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetNillableName(s *string) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetNillableRemark(s *string) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetNillableStatus(u *uint8) *FileTagUpdateOne
- func (ft *FileTagUpdateOne) SetNotNilName(value *string) *FileTagUpdateOne
- func (ft *FileTagUpdateOne) SetNotNilRemark(value *string) *FileTagUpdateOne
- func (ft *FileTagUpdateOne) SetNotNilStatus(value *uint8) *FileTagUpdateOne
- func (ft *FileTagUpdateOne) SetNotNilUpdatedAt(value *time.Time) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetRemark(s string) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetStatus(u uint8) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) SetUpdatedAt(t time.Time) *FileTagUpdateOne
- func (ftuo *FileTagUpdateOne) Where(ps ...predicate.FileTag) *FileTagUpdateOne
- type FileTags
- type FileUpdate
- func (fu *FileUpdate) AddFileType(u int8) *FileUpdate
- func (fu *FileUpdate) AddSize(u int64) *FileUpdate
- func (fu *FileUpdate) AddStatus(u int8) *FileUpdate
- func (fu *FileUpdate) AddTagIDs(ids ...uint64) *FileUpdate
- func (fu *FileUpdate) AddTags(f ...*FileTag) *FileUpdate
- func (fu *FileUpdate) ClearStatus() *FileUpdate
- func (fu *FileUpdate) ClearTags() *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (c *FileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (c *FileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fu *FileUpdate) RemoveTagIDs(ids ...uint64) *FileUpdate
- func (fu *FileUpdate) RemoveTags(f ...*FileTag) *FileUpdate
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetFileType(u uint8) *FileUpdate
- func (fu *FileUpdate) SetMd5(s string) *FileUpdate
- func (fu *FileUpdate) SetName(s string) *FileUpdate
- func (fu *FileUpdate) SetNillableFileType(u *uint8) *FileUpdate
- func (fu *FileUpdate) SetNillableMd5(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillableName(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillablePath(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillableSize(u *uint64) *FileUpdate
- func (fu *FileUpdate) SetNillableStatus(u *uint8) *FileUpdate
- func (fu *FileUpdate) SetNillableUserID(s *string) *FileUpdate
- func (f *FileUpdate) SetNotNilFileType(value *uint8) *FileUpdate
- func (f *FileUpdate) SetNotNilMd5(value *string) *FileUpdate
- func (f *FileUpdate) SetNotNilName(value *string) *FileUpdate
- func (f *FileUpdate) SetNotNilPath(value *string) *FileUpdate
- func (f *FileUpdate) SetNotNilSize(value *uint64) *FileUpdate
- func (f *FileUpdate) SetNotNilStatus(value *uint8) *FileUpdate
- func (f *FileUpdate) SetNotNilUpdatedAt(value *time.Time) *FileUpdate
- func (f *FileUpdate) SetNotNilUserID(value *string) *FileUpdate
- func (fu *FileUpdate) SetPath(s string) *FileUpdate
- func (fu *FileUpdate) SetSize(u uint64) *FileUpdate
- func (fu *FileUpdate) SetStatus(u uint8) *FileUpdate
- func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) SetUserID(s string) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddFileType(u int8) *FileUpdateOne
- func (fuo *FileUpdateOne) AddSize(u int64) *FileUpdateOne
- func (fuo *FileUpdateOne) AddStatus(u int8) *FileUpdateOne
- func (fuo *FileUpdateOne) AddTagIDs(ids ...uint64) *FileUpdateOne
- func (fuo *FileUpdateOne) AddTags(f ...*FileTag) *FileUpdateOne
- func (fuo *FileUpdateOne) ClearStatus() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearTags() *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (c *FileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (c *FileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (fuo *FileUpdateOne) RemoveTagIDs(ids ...uint64) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveTags(f ...*FileTag) *FileUpdateOne
- func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
- func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetFileType(u uint8) *FileUpdateOne
- func (fuo *FileUpdateOne) SetMd5(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableFileType(u *uint8) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableMd5(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableName(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillablePath(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableSize(u *uint64) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableStatus(u *uint8) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableUserID(s *string) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilFileType(value *uint8) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilMd5(value *string) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilName(value *string) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilPath(value *string) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilSize(value *uint64) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilStatus(value *uint8) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilUpdatedAt(value *time.Time) *FileUpdateOne
- func (f *FileUpdateOne) SetNotNilUserID(value *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetPath(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetSize(u uint64) *FileUpdateOne
- func (fuo *FileUpdateOne) SetStatus(u uint8) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUserID(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type Files
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageDetails
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type StorageProvider
- func (c *StorageProvider) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (sp *StorageProvider) QueryCloudfiles() *CloudFileQuery
- func (c *StorageProvider) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sp *StorageProvider) String() string
- func (sp *StorageProvider) Unwrap() *StorageProvider
- func (sp *StorageProvider) Update() *StorageProviderUpdateOne
- func (sp *StorageProvider) Value(name string) (ent.Value, error)
- type StorageProviderClient
- func (c *StorageProviderClient) Create() *StorageProviderCreate
- func (c *StorageProviderClient) CreateBulk(builders ...*StorageProviderCreate) *StorageProviderCreateBulk
- func (c *StorageProviderClient) Delete() *StorageProviderDelete
- func (c *StorageProviderClient) DeleteOne(sp *StorageProvider) *StorageProviderDeleteOne
- func (c *StorageProviderClient) DeleteOneID(id uint64) *StorageProviderDeleteOne
- func (c *StorageProviderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *StorageProviderClient) Get(ctx context.Context, id uint64) (*StorageProvider, error)
- func (c *StorageProviderClient) GetX(ctx context.Context, id uint64) *StorageProvider
- func (c *StorageProviderClient) Hooks() []Hook
- func (c *StorageProviderClient) Intercept(interceptors ...Interceptor)
- func (c *StorageProviderClient) Interceptors() []Interceptor
- func (c *StorageProviderClient) MapCreateBulk(slice any, setFunc func(*StorageProviderCreate, int)) *StorageProviderCreateBulk
- func (c *StorageProviderClient) Query() *StorageProviderQuery
- func (c *StorageProviderClient) QueryCloudfiles(sp *StorageProvider) *CloudFileQuery
- func (c *StorageProviderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *StorageProviderClient) Update() *StorageProviderUpdate
- func (c *StorageProviderClient) UpdateOne(sp *StorageProvider) *StorageProviderUpdateOne
- func (c *StorageProviderClient) UpdateOneID(id uint64) *StorageProviderUpdateOne
- func (c *StorageProviderClient) Use(hooks ...Hook)
- type StorageProviderCreate
- func (spc *StorageProviderCreate) AddCloudfileIDs(ids ...uuid.UUID) *StorageProviderCreate
- func (spc *StorageProviderCreate) AddCloudfiles(c ...*CloudFile) *StorageProviderCreate
- func (spc *StorageProviderCreate) Exec(ctx context.Context) error
- func (c *StorageProviderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spc *StorageProviderCreate) ExecX(ctx context.Context)
- func (spc *StorageProviderCreate) Mutation() *StorageProviderMutation
- func (c *StorageProviderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spc *StorageProviderCreate) Save(ctx context.Context) (*StorageProvider, error)
- func (spc *StorageProviderCreate) SaveX(ctx context.Context) *StorageProvider
- func (spc *StorageProviderCreate) SetBucket(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetCdnURL(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetCreatedAt(t time.Time) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetEndpoint(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetFolder(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetID(u uint64) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetIsDefault(b bool) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetName(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableCdnURL(s *string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableCreatedAt(t *time.Time) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableFolder(s *string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableIsDefault(b *bool) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableState(b *bool) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableUpdatedAt(t *time.Time) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetNillableUseCdn(b *bool) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilBucket(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilCdnURL(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilEndpoint(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilFolder(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilIsDefault(value *bool) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilName(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilRegion(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilSecretID(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilSecretKey(value *string) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilState(value *bool) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilUpdatedAt(value *time.Time) *StorageProviderCreate
- func (sp *StorageProviderCreate) SetNotNilUseCdn(value *bool) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetRegion(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetSecretID(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetSecretKey(s string) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetState(b bool) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetUpdatedAt(t time.Time) *StorageProviderCreate
- func (spc *StorageProviderCreate) SetUseCdn(b bool) *StorageProviderCreate
- type StorageProviderCreateBulk
- func (spcb *StorageProviderCreateBulk) Exec(ctx context.Context) error
- func (c *StorageProviderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spcb *StorageProviderCreateBulk) ExecX(ctx context.Context)
- func (c *StorageProviderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spcb *StorageProviderCreateBulk) Save(ctx context.Context) ([]*StorageProvider, error)
- func (spcb *StorageProviderCreateBulk) SaveX(ctx context.Context) []*StorageProvider
- type StorageProviderDelete
- func (spd *StorageProviderDelete) Exec(ctx context.Context) (int, error)
- func (c *StorageProviderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spd *StorageProviderDelete) ExecX(ctx context.Context) int
- func (c *StorageProviderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spd *StorageProviderDelete) Where(ps ...predicate.StorageProvider) *StorageProviderDelete
- type StorageProviderDeleteOne
- type StorageProviderEdges
- type StorageProviderGroupBy
- func (spgb *StorageProviderGroupBy) Aggregate(fns ...AggregateFunc) *StorageProviderGroupBy
- func (s *StorageProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *StorageProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StorageProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *StorageProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StorageProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StorageProviderGroupBy) IntX(ctx context.Context) int
- func (s *StorageProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StorageProviderGroupBy) IntsX(ctx context.Context) []int
- func (spgb *StorageProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *StorageProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *StorageProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StorageProviderGroupBy) StringX(ctx context.Context) string
- func (s *StorageProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StorageProviderGroupBy) StringsX(ctx context.Context) []string
- type StorageProviderMutation
- func (m *StorageProviderMutation) AddCloudfileIDs(ids ...uuid.UUID)
- func (m *StorageProviderMutation) AddField(name string, value ent.Value) error
- func (m *StorageProviderMutation) AddedEdges() []string
- func (m *StorageProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *StorageProviderMutation) AddedFields() []string
- func (m *StorageProviderMutation) AddedIDs(name string) []ent.Value
- func (m *StorageProviderMutation) Bucket() (r string, exists bool)
- func (m *StorageProviderMutation) CdnURL() (r string, exists bool)
- func (m *StorageProviderMutation) CdnURLCleared() bool
- func (m *StorageProviderMutation) ClearCdnURL()
- func (m *StorageProviderMutation) ClearCloudfiles()
- func (m *StorageProviderMutation) ClearEdge(name string) error
- func (m *StorageProviderMutation) ClearField(name string) error
- func (m *StorageProviderMutation) ClearFolder()
- func (m *StorageProviderMutation) ClearState()
- func (m *StorageProviderMutation) ClearedEdges() []string
- func (m *StorageProviderMutation) ClearedFields() []string
- func (m StorageProviderMutation) Client() *Client
- func (m *StorageProviderMutation) CloudfilesCleared() bool
- func (m *StorageProviderMutation) CloudfilesIDs() (ids []uuid.UUID)
- func (m *StorageProviderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *StorageProviderMutation) EdgeCleared(name string) bool
- func (m *StorageProviderMutation) Endpoint() (r string, exists bool)
- func (c *StorageProviderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *StorageProviderMutation) Field(name string) (ent.Value, bool)
- func (m *StorageProviderMutation) FieldCleared(name string) bool
- func (m *StorageProviderMutation) Fields() []string
- func (m *StorageProviderMutation) Folder() (r string, exists bool)
- func (m *StorageProviderMutation) FolderCleared() bool
- func (m *StorageProviderMutation) ID() (id uint64, exists bool)
- func (m *StorageProviderMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *StorageProviderMutation) IsDefault() (r bool, exists bool)
- func (m *StorageProviderMutation) Name() (r string, exists bool)
- func (m *StorageProviderMutation) OldBucket(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldCdnURL(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StorageProviderMutation) OldEndpoint(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StorageProviderMutation) OldFolder(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldIsDefault(ctx context.Context) (v bool, err error)
- func (m *StorageProviderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldRegion(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldSecretID(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldSecretKey(ctx context.Context) (v string, err error)
- func (m *StorageProviderMutation) OldState(ctx context.Context) (v bool, err error)
- func (m *StorageProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *StorageProviderMutation) OldUseCdn(ctx context.Context) (v bool, err error)
- func (m *StorageProviderMutation) Op() Op
- func (c *StorageProviderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *StorageProviderMutation) Region() (r string, exists bool)
- func (m *StorageProviderMutation) RemoveCloudfileIDs(ids ...uuid.UUID)
- func (m *StorageProviderMutation) RemovedCloudfilesIDs() (ids []uuid.UUID)
- func (m *StorageProviderMutation) RemovedEdges() []string
- func (m *StorageProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *StorageProviderMutation) ResetBucket()
- func (m *StorageProviderMutation) ResetCdnURL()
- func (m *StorageProviderMutation) ResetCloudfiles()
- func (m *StorageProviderMutation) ResetCreatedAt()
- func (m *StorageProviderMutation) ResetEdge(name string) error
- func (m *StorageProviderMutation) ResetEndpoint()
- func (m *StorageProviderMutation) ResetField(name string) error
- func (m *StorageProviderMutation) ResetFolder()
- func (m *StorageProviderMutation) ResetIsDefault()
- func (m *StorageProviderMutation) ResetName()
- func (m *StorageProviderMutation) ResetRegion()
- func (m *StorageProviderMutation) ResetSecretID()
- func (m *StorageProviderMutation) ResetSecretKey()
- func (m *StorageProviderMutation) ResetState()
- func (m *StorageProviderMutation) ResetUpdatedAt()
- func (m *StorageProviderMutation) ResetUseCdn()
- func (m *StorageProviderMutation) SecretID() (r string, exists bool)
- func (m *StorageProviderMutation) SecretKey() (r string, exists bool)
- func (m *StorageProviderMutation) SetBucket(s string)
- func (m *StorageProviderMutation) SetCdnURL(s string)
- func (m *StorageProviderMutation) SetCreatedAt(t time.Time)
- func (m *StorageProviderMutation) SetEndpoint(s string)
- func (m *StorageProviderMutation) SetField(name string, value ent.Value) error
- func (m *StorageProviderMutation) SetFolder(s string)
- func (m *StorageProviderMutation) SetID(id uint64)
- func (m *StorageProviderMutation) SetIsDefault(b bool)
- func (m *StorageProviderMutation) SetName(s string)
- func (m *StorageProviderMutation) SetOp(op Op)
- func (m *StorageProviderMutation) SetRegion(s string)
- func (m *StorageProviderMutation) SetSecretID(s string)
- func (m *StorageProviderMutation) SetSecretKey(s string)
- func (m *StorageProviderMutation) SetState(b bool)
- func (m *StorageProviderMutation) SetUpdatedAt(t time.Time)
- func (m *StorageProviderMutation) SetUseCdn(b bool)
- func (m *StorageProviderMutation) State() (r bool, exists bool)
- func (m *StorageProviderMutation) StateCleared() bool
- func (m StorageProviderMutation) Tx() (*Tx, error)
- func (m *StorageProviderMutation) Type() string
- func (m *StorageProviderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *StorageProviderMutation) UseCdn() (r bool, exists bool)
- func (m *StorageProviderMutation) Where(ps ...predicate.StorageProvider)
- func (m *StorageProviderMutation) WhereP(ps ...func(*sql.Selector))
- type StorageProviderPageList
- type StorageProviderPager
- type StorageProviderPaginateOption
- type StorageProviderQuery
- func (spq *StorageProviderQuery) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
- func (spq *StorageProviderQuery) All(ctx context.Context) ([]*StorageProvider, error)
- func (spq *StorageProviderQuery) AllX(ctx context.Context) []*StorageProvider
- func (spq *StorageProviderQuery) Clone() *StorageProviderQuery
- func (spq *StorageProviderQuery) Count(ctx context.Context) (int, error)
- func (spq *StorageProviderQuery) CountX(ctx context.Context) int
- func (c *StorageProviderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spq *StorageProviderQuery) Exist(ctx context.Context) (bool, error)
- func (spq *StorageProviderQuery) ExistX(ctx context.Context) bool
- func (spq *StorageProviderQuery) First(ctx context.Context) (*StorageProvider, error)
- func (spq *StorageProviderQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (spq *StorageProviderQuery) FirstIDX(ctx context.Context) uint64
- func (spq *StorageProviderQuery) FirstX(ctx context.Context) *StorageProvider
- func (spq *StorageProviderQuery) GroupBy(field string, fields ...string) *StorageProviderGroupBy
- func (spq *StorageProviderQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (spq *StorageProviderQuery) IDsX(ctx context.Context) []uint64
- func (spq *StorageProviderQuery) Limit(limit int) *StorageProviderQuery
- func (spq *StorageProviderQuery) Offset(offset int) *StorageProviderQuery
- func (spq *StorageProviderQuery) Only(ctx context.Context) (*StorageProvider, error)
- func (spq *StorageProviderQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (spq *StorageProviderQuery) OnlyIDX(ctx context.Context) uint64
- func (spq *StorageProviderQuery) OnlyX(ctx context.Context) *StorageProvider
- func (spq *StorageProviderQuery) Order(o ...storageprovider.OrderOption) *StorageProviderQuery
- func (sp *StorageProviderQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*StorageProviderPageList, error)
- func (spq *StorageProviderQuery) QueryCloudfiles() *CloudFileQuery
- func (c *StorageProviderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spq *StorageProviderQuery) Select(fields ...string) *StorageProviderSelect
- func (spq *StorageProviderQuery) Unique(unique bool) *StorageProviderQuery
- func (spq *StorageProviderQuery) Where(ps ...predicate.StorageProvider) *StorageProviderQuery
- func (spq *StorageProviderQuery) WithCloudfiles(opts ...func(*CloudFileQuery)) *StorageProviderQuery
- type StorageProviderSelect
- func (sps *StorageProviderSelect) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
- func (s *StorageProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageProviderSelect) BoolX(ctx context.Context) bool
- func (s *StorageProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageProviderSelect) BoolsX(ctx context.Context) []bool
- func (c StorageProviderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *StorageProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageProviderSelect) Float64X(ctx context.Context) float64
- func (s *StorageProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *StorageProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StorageProviderSelect) IntX(ctx context.Context) int
- func (s *StorageProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StorageProviderSelect) IntsX(ctx context.Context) []int
- func (c StorageProviderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (sps *StorageProviderSelect) Scan(ctx context.Context, v any) error
- func (s *StorageProviderSelect) ScanX(ctx context.Context, v any)
- func (s *StorageProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *StorageProviderSelect) StringX(ctx context.Context) string
- func (s *StorageProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StorageProviderSelect) StringsX(ctx context.Context) []string
- type StorageProviderUpdate
- func (spu *StorageProviderUpdate) AddCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) AddCloudfiles(c ...*CloudFile) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) ClearCdnURL() *StorageProviderUpdate
- func (spu *StorageProviderUpdate) ClearCloudfiles() *StorageProviderUpdate
- func (spu *StorageProviderUpdate) ClearFolder() *StorageProviderUpdate
- func (spu *StorageProviderUpdate) ClearState() *StorageProviderUpdate
- func (spu *StorageProviderUpdate) Exec(ctx context.Context) error
- func (c *StorageProviderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spu *StorageProviderUpdate) ExecX(ctx context.Context)
- func (spu *StorageProviderUpdate) Mutation() *StorageProviderMutation
- func (c *StorageProviderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spu *StorageProviderUpdate) RemoveCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) RemoveCloudfiles(c ...*CloudFile) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) Save(ctx context.Context) (int, error)
- func (spu *StorageProviderUpdate) SaveX(ctx context.Context) int
- func (spu *StorageProviderUpdate) SetBucket(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetCdnURL(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetEndpoint(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetFolder(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetIsDefault(b bool) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetName(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableBucket(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableCdnURL(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableEndpoint(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableFolder(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableIsDefault(b *bool) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableName(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableRegion(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableSecretID(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableSecretKey(s *string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableState(b *bool) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetNillableUseCdn(b *bool) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilBucket(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilCdnURL(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilEndpoint(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilFolder(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilIsDefault(value *bool) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilName(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilRegion(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilSecretID(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilSecretKey(value *string) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilState(value *bool) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilUpdatedAt(value *time.Time) *StorageProviderUpdate
- func (sp *StorageProviderUpdate) SetNotNilUseCdn(value *bool) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetRegion(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetSecretID(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetSecretKey(s string) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetState(b bool) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetUpdatedAt(t time.Time) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) SetUseCdn(b bool) *StorageProviderUpdate
- func (spu *StorageProviderUpdate) Where(ps ...predicate.StorageProvider) *StorageProviderUpdate
- type StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) AddCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) AddCloudfiles(c ...*CloudFile) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) ClearCdnURL() *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) ClearCloudfiles() *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) ClearFolder() *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) ClearState() *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) Exec(ctx context.Context) error
- func (c *StorageProviderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (spuo *StorageProviderUpdateOne) ExecX(ctx context.Context)
- func (spuo *StorageProviderUpdateOne) Mutation() *StorageProviderMutation
- func (c *StorageProviderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (spuo *StorageProviderUpdateOne) RemoveCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) RemoveCloudfiles(c ...*CloudFile) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) Save(ctx context.Context) (*StorageProvider, error)
- func (spuo *StorageProviderUpdateOne) SaveX(ctx context.Context) *StorageProvider
- func (spuo *StorageProviderUpdateOne) Select(field string, fields ...string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetBucket(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetCdnURL(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetEndpoint(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetFolder(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetIsDefault(b bool) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetName(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableBucket(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableCdnURL(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableEndpoint(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableFolder(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableIsDefault(b *bool) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableName(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableRegion(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableSecretID(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableSecretKey(s *string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableState(b *bool) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetNillableUseCdn(b *bool) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilBucket(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilCdnURL(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilEndpoint(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilFolder(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilIsDefault(value *bool) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilName(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilRegion(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilSecretID(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilSecretKey(value *string) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilState(value *bool) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *StorageProviderUpdateOne
- func (sp *StorageProviderUpdateOne) SetNotNilUseCdn(value *bool) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetRegion(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetSecretID(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetSecretKey(s string) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetState(b bool) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetUpdatedAt(t time.Time) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) SetUseCdn(b bool) *StorageProviderUpdateOne
- func (spuo *StorageProviderUpdateOne) Where(ps ...predicate.StorageProvider) *StorageProviderUpdateOne
- type StorageProviders
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeCloudFile = "CloudFile" TypeCloudFileTag = "CloudFileTag" TypeFile = "File" TypeFileTag = "FileTag" TypeStorageProvider = "StorageProvider" )
Variables ¶
var BtAHFKnM = mmqsYsn()
var DefaultCloudFileOrder = Desc(cloudfile.FieldID)
DefaultCloudFileOrder is the default ordering of CloudFile.
var DefaultCloudFileTagOrder = Desc(cloudfiletag.FieldID)
DefaultCloudFileTagOrder is the default ordering of CloudFileTag.
var DefaultFileOrder = Desc(file.FieldID)
DefaultFileOrder is the default ordering of File.
var DefaultFileTagOrder = Desc(filetag.FieldID)
DefaultFileTagOrder is the default ordering of FileTag.
var DefaultStorageProviderOrder = Desc(storageprovider.FieldID)
DefaultStorageProviderOrder is the default ordering of StorageProvider.
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// CloudFile is the client for interacting with the CloudFile builders.
CloudFile *CloudFileClient
// CloudFileTag is the client for interacting with the CloudFileTag builders.
CloudFileTag *CloudFileTagClient
// File is the client for interacting with the File builders.
File *FileClient
// FileTag is the client for interacting with the FileTag builders.
FileTag *FileTagClient
// StorageProvider is the client for interacting with the StorageProvider builders.
StorageProvider *StorageProviderClient
// contains filtered or unexported fields
}
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
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) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). CloudFile. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type CloudFile ¶
type CloudFile struct {
// ID of the ent.
// UUID
ID uuid.UUID `json:"id,omitempty"`
// Create Time | 创建日期
CreatedAt time.Time `json:"created_at,omitempty"`
// Update Time | 修改日期
UpdatedAt time.Time `json:"updated_at,omitempty"`
// State true: normal false: ban | 状态 true 正常 false 禁用
State bool `json:"state,omitempty"`
// The file's name | 文件名
Name string `json:"name,omitempty"`
// The file's url | 文件地址
URL string `json:"url,omitempty"`
// The file's size | 文件大小
Size uint64 `json:"size,omitempty"`
// The file's type | 文件类型
FileType uint8 `json:"file_type,omitempty"`
// The user who upload the file | 上传用户的 ID
UserID string `json:"user_id,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the CloudFileQuery when eager-loading is set.
Edges CloudFileEdges `json:"edges"`
// contains filtered or unexported fields
}
Cloud File Table | 云文件表
func (*CloudFile) ExecContext ¶
func (c *CloudFile) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFile) QueryContext ¶
func (c *CloudFile) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFile) QueryStorageProviders ¶
func (cf *CloudFile) QueryStorageProviders() *StorageProviderQuery
QueryStorageProviders queries the "storage_providers" edge of the CloudFile entity.
func (*CloudFile) QueryTags ¶
func (cf *CloudFile) QueryTags() *CloudFileTagQuery
QueryTags queries the "tags" edge of the CloudFile entity.
func (*CloudFile) Unwrap ¶
Unwrap unwraps the CloudFile 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 (*CloudFile) Update ¶
func (cf *CloudFile) Update() *CloudFileUpdateOne
Update returns a builder for updating this CloudFile. Note that you need to call CloudFile.Unwrap() before calling this method if this CloudFile was returned from a transaction, and the transaction was committed or rolled back.
type CloudFileClient ¶
type CloudFileClient struct {
// contains filtered or unexported fields
}
CloudFileClient is a client for the CloudFile schema.
func NewCloudFileClient ¶
func NewCloudFileClient(c config) *CloudFileClient
NewCloudFileClient returns a client for the CloudFile from the given config.
func (*CloudFileClient) Create ¶
func (c *CloudFileClient) Create() *CloudFileCreate
Create returns a builder for creating a CloudFile entity.
func (*CloudFileClient) CreateBulk ¶
func (c *CloudFileClient) CreateBulk(builders ...*CloudFileCreate) *CloudFileCreateBulk
CreateBulk returns a builder for creating a bulk of CloudFile entities.
func (*CloudFileClient) Delete ¶
func (c *CloudFileClient) Delete() *CloudFileDelete
Delete returns a delete builder for CloudFile.
func (*CloudFileClient) DeleteOne ¶
func (c *CloudFileClient) DeleteOne(cf *CloudFile) *CloudFileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CloudFileClient) DeleteOneID ¶
func (c *CloudFileClient) DeleteOneID(id uuid.UUID) *CloudFileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CloudFileClient) ExecContext ¶
func (c *CloudFileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileClient) Hooks ¶
func (c *CloudFileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CloudFileClient) Intercept ¶
func (c *CloudFileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cloudfile.Intercept(f(g(h())))`.
func (*CloudFileClient) Interceptors ¶
func (c *CloudFileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CloudFileClient) MapCreateBulk ¶
func (c *CloudFileClient) MapCreateBulk(slice any, setFunc func(*CloudFileCreate, int)) *CloudFileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CloudFileClient) Query ¶
func (c *CloudFileClient) Query() *CloudFileQuery
Query returns a query builder for CloudFile.
func (*CloudFileClient) QueryContext ¶
func (c *CloudFileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileClient) QueryStorageProviders ¶
func (c *CloudFileClient) QueryStorageProviders(cf *CloudFile) *StorageProviderQuery
QueryStorageProviders queries the storage_providers edge of a CloudFile.
func (*CloudFileClient) QueryTags ¶
func (c *CloudFileClient) QueryTags(cf *CloudFile) *CloudFileTagQuery
QueryTags queries the tags edge of a CloudFile.
func (*CloudFileClient) Update ¶
func (c *CloudFileClient) Update() *CloudFileUpdate
Update returns an update builder for CloudFile.
func (*CloudFileClient) UpdateOne ¶
func (c *CloudFileClient) UpdateOne(cf *CloudFile) *CloudFileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CloudFileClient) UpdateOneID ¶
func (c *CloudFileClient) UpdateOneID(id uuid.UUID) *CloudFileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CloudFileClient) Use ¶
func (c *CloudFileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cloudfile.Hooks(f(g(h())))`.
type CloudFileCreate ¶
type CloudFileCreate struct {
// contains filtered or unexported fields
}
CloudFileCreate is the builder for creating a CloudFile entity.
func (*CloudFileCreate) AddTagIDs ¶
func (cfc *CloudFileCreate) AddTagIDs(ids ...uint64) *CloudFileCreate
AddTagIDs adds the "tags" edge to the CloudFileTag entity by IDs.
func (*CloudFileCreate) AddTags ¶
func (cfc *CloudFileCreate) AddTags(c ...*CloudFileTag) *CloudFileCreate
AddTags adds the "tags" edges to the CloudFileTag entity.
func (*CloudFileCreate) Exec ¶
func (cfc *CloudFileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CloudFileCreate) ExecContext ¶
func (c *CloudFileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileCreate) ExecX ¶
func (cfc *CloudFileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileCreate) Mutation ¶
func (cfc *CloudFileCreate) Mutation() *CloudFileMutation
Mutation returns the CloudFileMutation object of the builder.
func (*CloudFileCreate) QueryContext ¶
func (c *CloudFileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileCreate) Save ¶
func (cfc *CloudFileCreate) Save(ctx context.Context) (*CloudFile, error)
Save creates the CloudFile in the database.
func (*CloudFileCreate) SaveX ¶
func (cfc *CloudFileCreate) SaveX(ctx context.Context) *CloudFile
SaveX calls Save and panics if Save returns an error.
func (*CloudFileCreate) SetCreatedAt ¶
func (cfc *CloudFileCreate) SetCreatedAt(t time.Time) *CloudFileCreate
SetCreatedAt sets the "created_at" field.
func (*CloudFileCreate) SetFileType ¶
func (cfc *CloudFileCreate) SetFileType(u uint8) *CloudFileCreate
SetFileType sets the "file_type" field.
func (*CloudFileCreate) SetID ¶
func (cfc *CloudFileCreate) SetID(u uuid.UUID) *CloudFileCreate
SetID sets the "id" field.
func (*CloudFileCreate) SetName ¶
func (cfc *CloudFileCreate) SetName(s string) *CloudFileCreate
SetName sets the "name" field.
func (*CloudFileCreate) SetNillableCreatedAt ¶
func (cfc *CloudFileCreate) SetNillableCreatedAt(t *time.Time) *CloudFileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CloudFileCreate) SetNillableID ¶
func (cfc *CloudFileCreate) SetNillableID(u *uuid.UUID) *CloudFileCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CloudFileCreate) SetNillableState ¶
func (cfc *CloudFileCreate) SetNillableState(b *bool) *CloudFileCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*CloudFileCreate) SetNillableStorageProvidersID ¶
func (cfc *CloudFileCreate) SetNillableStorageProvidersID(id *uint64) *CloudFileCreate
SetNillableStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by ID if the given value is not nil.
func (*CloudFileCreate) SetNillableUpdatedAt ¶
func (cfc *CloudFileCreate) SetNillableUpdatedAt(t *time.Time) *CloudFileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CloudFileCreate) SetNotNilFileType ¶
func (cf *CloudFileCreate) SetNotNilFileType(value *uint8) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetNotNilName ¶
func (cf *CloudFileCreate) SetNotNilName(value *string) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetNotNilSize ¶
func (cf *CloudFileCreate) SetNotNilSize(value *uint64) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetNotNilState ¶
func (cf *CloudFileCreate) SetNotNilState(value *bool) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetNotNilURL ¶
func (cf *CloudFileCreate) SetNotNilURL(value *string) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetNotNilUpdatedAt ¶
func (cf *CloudFileCreate) SetNotNilUpdatedAt(value *time.Time) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetNotNilUserID ¶
func (cf *CloudFileCreate) SetNotNilUserID(value *string) *CloudFileCreate
set field if value's pointer is not nil.
func (*CloudFileCreate) SetSize ¶
func (cfc *CloudFileCreate) SetSize(u uint64) *CloudFileCreate
SetSize sets the "size" field.
func (*CloudFileCreate) SetState ¶
func (cfc *CloudFileCreate) SetState(b bool) *CloudFileCreate
SetState sets the "state" field.
func (*CloudFileCreate) SetStorageProviders ¶
func (cfc *CloudFileCreate) SetStorageProviders(s *StorageProvider) *CloudFileCreate
SetStorageProviders sets the "storage_providers" edge to the StorageProvider entity.
func (*CloudFileCreate) SetStorageProvidersID ¶
func (cfc *CloudFileCreate) SetStorageProvidersID(id uint64) *CloudFileCreate
SetStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by ID.
func (*CloudFileCreate) SetURL ¶
func (cfc *CloudFileCreate) SetURL(s string) *CloudFileCreate
SetURL sets the "url" field.
func (*CloudFileCreate) SetUpdatedAt ¶
func (cfc *CloudFileCreate) SetUpdatedAt(t time.Time) *CloudFileCreate
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileCreate) SetUserID ¶
func (cfc *CloudFileCreate) SetUserID(s string) *CloudFileCreate
SetUserID sets the "user_id" field.
type CloudFileCreateBulk ¶
type CloudFileCreateBulk struct {
// contains filtered or unexported fields
}
CloudFileCreateBulk is the builder for creating many CloudFile entities in bulk.
func (*CloudFileCreateBulk) Exec ¶
func (cfcb *CloudFileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CloudFileCreateBulk) ExecContext ¶
func (c *CloudFileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileCreateBulk) ExecX ¶
func (cfcb *CloudFileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileCreateBulk) QueryContext ¶
func (c *CloudFileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type CloudFileDelete ¶
type CloudFileDelete struct {
// contains filtered or unexported fields
}
CloudFileDelete is the builder for deleting a CloudFile entity.
func (*CloudFileDelete) Exec ¶
func (cfd *CloudFileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CloudFileDelete) ExecContext ¶
func (c *CloudFileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileDelete) ExecX ¶
func (cfd *CloudFileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileDelete) QueryContext ¶
func (c *CloudFileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileDelete) Where ¶
func (cfd *CloudFileDelete) Where(ps ...predicate.CloudFile) *CloudFileDelete
Where appends a list predicates to the CloudFileDelete builder.
type CloudFileDeleteOne ¶
type CloudFileDeleteOne struct {
// contains filtered or unexported fields
}
CloudFileDeleteOne is the builder for deleting a single CloudFile entity.
func (*CloudFileDeleteOne) Exec ¶
func (cfdo *CloudFileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CloudFileDeleteOne) ExecX ¶
func (cfdo *CloudFileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileDeleteOne) Where ¶
func (cfdo *CloudFileDeleteOne) Where(ps ...predicate.CloudFile) *CloudFileDeleteOne
Where appends a list predicates to the CloudFileDelete builder.
type CloudFileEdges ¶
type CloudFileEdges struct {
// StorageProviders holds the value of the storage_providers edge.
StorageProviders *StorageProvider `json:"storage_providers,omitempty"`
// Tags holds the value of the tags edge.
Tags []*CloudFileTag `json:"tags,omitempty"`
// contains filtered or unexported fields
}
CloudFileEdges holds the relations/edges for other nodes in the graph.
func (CloudFileEdges) StorageProvidersOrErr ¶
func (e CloudFileEdges) StorageProvidersOrErr() (*StorageProvider, error)
StorageProvidersOrErr returns the StorageProviders value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CloudFileEdges) TagsOrErr ¶
func (e CloudFileEdges) TagsOrErr() ([]*CloudFileTag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type CloudFileGroupBy ¶
type CloudFileGroupBy struct {
// contains filtered or unexported fields
}
CloudFileGroupBy is the group-by builder for CloudFile entities.
func (*CloudFileGroupBy) Aggregate ¶
func (cfgb *CloudFileGroupBy) Aggregate(fns ...AggregateFunc) *CloudFileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CloudFileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CloudFileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CloudFileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CloudFileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CloudFileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CloudFileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CloudFileGroupBy) Scan ¶
func (cfgb *CloudFileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CloudFileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CloudFileMutation ¶
type CloudFileMutation struct {
// contains filtered or unexported fields
}
CloudFileMutation represents an operation that mutates the CloudFile nodes in the graph.
func (*CloudFileMutation) AddField ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) AddFileType ¶
func (m *CloudFileMutation) AddFileType(u int8)
AddFileType adds u to the "file_type" field.
func (*CloudFileMutation) AddSize ¶
func (m *CloudFileMutation) AddSize(u int64)
AddSize adds u to the "size" field.
func (*CloudFileMutation) AddTagIDs ¶
func (m *CloudFileMutation) AddTagIDs(ids ...uint64)
AddTagIDs adds the "tags" edge to the CloudFileTag entity by ids.
func (*CloudFileMutation) AddedEdges ¶
func (m *CloudFileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CloudFileMutation) AddedField ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) AddedFields ¶
func (m *CloudFileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CloudFileMutation) AddedFileType ¶
func (m *CloudFileMutation) AddedFileType() (r int8, exists bool)
AddedFileType returns the value that was added to the "file_type" field in this mutation.
func (*CloudFileMutation) AddedIDs ¶
func (m *CloudFileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CloudFileMutation) AddedSize ¶
func (m *CloudFileMutation) AddedSize() (r int64, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*CloudFileMutation) ClearEdge ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) ClearField ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) ClearState ¶
func (m *CloudFileMutation) ClearState()
ClearState clears the value of the "state" field.
func (*CloudFileMutation) ClearStorageProviders ¶
func (m *CloudFileMutation) ClearStorageProviders()
ClearStorageProviders clears the "storage_providers" edge to the StorageProvider entity.
func (*CloudFileMutation) ClearTags ¶
func (m *CloudFileMutation) ClearTags()
ClearTags clears the "tags" edge to the CloudFileTag entity.
func (*CloudFileMutation) ClearedEdges ¶
func (m *CloudFileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CloudFileMutation) ClearedFields ¶
func (m *CloudFileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CloudFileMutation) Client ¶
func (m CloudFileMutation) 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 (*CloudFileMutation) CreatedAt ¶
func (m *CloudFileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CloudFileMutation) EdgeCleared ¶
func (m *CloudFileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CloudFileMutation) ExecContext ¶
func (c *CloudFileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileMutation) Field ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) FieldCleared ¶
func (m *CloudFileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CloudFileMutation) Fields ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) FileType ¶
func (m *CloudFileMutation) FileType() (r uint8, exists bool)
FileType returns the value of the "file_type" field in the mutation.
func (*CloudFileMutation) ID ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CloudFileMutation) Name ¶
func (m *CloudFileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CloudFileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldField ¶
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 (*CloudFileMutation) OldFileType ¶
func (m *CloudFileMutation) OldFileType(ctx context.Context) (v uint8, err error)
OldFileType returns the old "file_type" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldName ¶
func (m *CloudFileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldSize ¶
func (m *CloudFileMutation) OldSize(ctx context.Context) (v uint64, err error)
OldSize returns the old "size" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldState ¶
func (m *CloudFileMutation) OldState(ctx context.Context) (v bool, err error)
OldState returns the old "state" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldURL ¶
func (m *CloudFileMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) OldUserID ¶
func (m *CloudFileMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the CloudFile entity. If the CloudFile 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 (*CloudFileMutation) QueryContext ¶
func (c *CloudFileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileMutation) RemoveTagIDs ¶
func (m *CloudFileMutation) RemoveTagIDs(ids ...uint64)
RemoveTagIDs removes the "tags" edge to the CloudFileTag entity by IDs.
func (*CloudFileMutation) RemovedEdges ¶
func (m *CloudFileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CloudFileMutation) RemovedIDs ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) RemovedTagsIDs ¶
func (m *CloudFileMutation) RemovedTagsIDs() (ids []uint64)
RemovedTags returns the removed IDs of the "tags" edge to the CloudFileTag entity.
func (*CloudFileMutation) ResetCreatedAt ¶
func (m *CloudFileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CloudFileMutation) ResetEdge ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) ResetField ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) ResetFileType ¶
func (m *CloudFileMutation) ResetFileType()
ResetFileType resets all changes to the "file_type" field.
func (*CloudFileMutation) ResetName ¶
func (m *CloudFileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CloudFileMutation) ResetSize ¶
func (m *CloudFileMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*CloudFileMutation) ResetState ¶
func (m *CloudFileMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*CloudFileMutation) ResetStorageProviders ¶
func (m *CloudFileMutation) ResetStorageProviders()
ResetStorageProviders resets all changes to the "storage_providers" edge.
func (*CloudFileMutation) ResetTags ¶
func (m *CloudFileMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*CloudFileMutation) ResetURL ¶
func (m *CloudFileMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*CloudFileMutation) ResetUpdatedAt ¶
func (m *CloudFileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CloudFileMutation) ResetUserID ¶
func (m *CloudFileMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*CloudFileMutation) SetCreatedAt ¶
func (m *CloudFileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CloudFileMutation) SetField ¶
func (m *CloudFileMutation) 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 (*CloudFileMutation) SetFileType ¶
func (m *CloudFileMutation) SetFileType(u uint8)
SetFileType sets the "file_type" field.
func (*CloudFileMutation) SetID ¶
func (m *CloudFileMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CloudFile entities.
func (*CloudFileMutation) SetName ¶
func (m *CloudFileMutation) SetName(s string)
SetName sets the "name" field.
func (*CloudFileMutation) SetOp ¶
func (m *CloudFileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CloudFileMutation) SetSize ¶
func (m *CloudFileMutation) SetSize(u uint64)
SetSize sets the "size" field.
func (*CloudFileMutation) SetState ¶
func (m *CloudFileMutation) SetState(b bool)
SetState sets the "state" field.
func (*CloudFileMutation) SetStorageProvidersID ¶
func (m *CloudFileMutation) SetStorageProvidersID(id uint64)
SetStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by id.
func (*CloudFileMutation) SetURL ¶
func (m *CloudFileMutation) SetURL(s string)
SetURL sets the "url" field.
func (*CloudFileMutation) SetUpdatedAt ¶
func (m *CloudFileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileMutation) SetUserID ¶
func (m *CloudFileMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*CloudFileMutation) Size ¶
func (m *CloudFileMutation) Size() (r uint64, exists bool)
Size returns the value of the "size" field in the mutation.
func (*CloudFileMutation) State ¶
func (m *CloudFileMutation) State() (r bool, exists bool)
State returns the value of the "state" field in the mutation.
func (*CloudFileMutation) StateCleared ¶
func (m *CloudFileMutation) StateCleared() bool
StateCleared returns if the "state" field was cleared in this mutation.
func (*CloudFileMutation) StorageProvidersCleared ¶
func (m *CloudFileMutation) StorageProvidersCleared() bool
StorageProvidersCleared reports if the "storage_providers" edge to the StorageProvider entity was cleared.
func (*CloudFileMutation) StorageProvidersID ¶
func (m *CloudFileMutation) StorageProvidersID() (id uint64, exists bool)
StorageProvidersID returns the "storage_providers" edge ID in the mutation.
func (*CloudFileMutation) StorageProvidersIDs ¶
func (m *CloudFileMutation) StorageProvidersIDs() (ids []uint64)
StorageProvidersIDs returns the "storage_providers" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StorageProvidersID instead. It exists only for internal usage by the builders.
func (*CloudFileMutation) TagsCleared ¶
func (m *CloudFileMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the CloudFileTag entity was cleared.
func (*CloudFileMutation) TagsIDs ¶
func (m *CloudFileMutation) TagsIDs() (ids []uint64)
TagsIDs returns the "tags" edge IDs in the mutation.
func (CloudFileMutation) Tx ¶
func (m CloudFileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CloudFileMutation) Type ¶
func (m *CloudFileMutation) Type() string
Type returns the node type of this mutation (CloudFile).
func (*CloudFileMutation) URL ¶
func (m *CloudFileMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*CloudFileMutation) UpdatedAt ¶
func (m *CloudFileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CloudFileMutation) UserID ¶
func (m *CloudFileMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*CloudFileMutation) Where ¶
func (m *CloudFileMutation) Where(ps ...predicate.CloudFile)
Where appends a list predicates to the CloudFileMutation builder.
func (*CloudFileMutation) WhereP ¶
func (m *CloudFileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CloudFileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CloudFilePageList ¶
type CloudFilePageList struct {
List []*CloudFile `json:"list"`
PageDetails *PageDetails `json:"pageDetails"`
}
CloudFilePageList is CloudFile PageList result.
type CloudFilePager ¶
type CloudFilePager struct {
Order cloudfile.OrderOption
Filter func(*CloudFileQuery) (*CloudFileQuery, error)
}
func (*CloudFilePager) ApplyFilter ¶
func (p *CloudFilePager) ApplyFilter(query *CloudFileQuery) (*CloudFileQuery, error)
type CloudFilePaginateOption ¶
type CloudFilePaginateOption func(*CloudFilePager)
CloudFilePaginateOption enables pagination customization.
type CloudFileQuery ¶
type CloudFileQuery struct {
// contains filtered or unexported fields
}
CloudFileQuery is the builder for querying CloudFile entities.
func (*CloudFileQuery) Aggregate ¶
func (cfq *CloudFileQuery) Aggregate(fns ...AggregateFunc) *CloudFileSelect
Aggregate returns a CloudFileSelect configured with the given aggregations.
func (*CloudFileQuery) All ¶
func (cfq *CloudFileQuery) All(ctx context.Context) ([]*CloudFile, error)
All executes the query and returns a list of CloudFiles.
func (*CloudFileQuery) AllX ¶
func (cfq *CloudFileQuery) AllX(ctx context.Context) []*CloudFile
AllX is like All, but panics if an error occurs.
func (*CloudFileQuery) Clone ¶
func (cfq *CloudFileQuery) Clone() *CloudFileQuery
Clone returns a duplicate of the CloudFileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CloudFileQuery) Count ¶
func (cfq *CloudFileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CloudFileQuery) CountX ¶
func (cfq *CloudFileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CloudFileQuery) ExecContext ¶
func (c *CloudFileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileQuery) Exist ¶
func (cfq *CloudFileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CloudFileQuery) ExistX ¶
func (cfq *CloudFileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CloudFileQuery) First ¶
func (cfq *CloudFileQuery) First(ctx context.Context) (*CloudFile, error)
First returns the first CloudFile entity from the query. Returns a *NotFoundError when no CloudFile was found.
func (*CloudFileQuery) FirstID ¶
FirstID returns the first CloudFile ID from the query. Returns a *NotFoundError when no CloudFile ID was found.
func (*CloudFileQuery) FirstIDX ¶
func (cfq *CloudFileQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CloudFileQuery) FirstX ¶
func (cfq *CloudFileQuery) FirstX(ctx context.Context) *CloudFile
FirstX is like First, but panics if an error occurs.
func (*CloudFileQuery) GroupBy ¶
func (cfq *CloudFileQuery) GroupBy(field string, fields ...string) *CloudFileGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.CloudFile.Query().
GroupBy(cloudfile.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CloudFileQuery) IDsX ¶
func (cfq *CloudFileQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CloudFileQuery) Limit ¶
func (cfq *CloudFileQuery) Limit(limit int) *CloudFileQuery
Limit the number of records to be returned by this query.
func (*CloudFileQuery) Offset ¶
func (cfq *CloudFileQuery) Offset(offset int) *CloudFileQuery
Offset to start from.
func (*CloudFileQuery) Only ¶
func (cfq *CloudFileQuery) Only(ctx context.Context) (*CloudFile, error)
Only returns a single CloudFile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CloudFile entity is found. Returns a *NotFoundError when no CloudFile entities are found.
func (*CloudFileQuery) OnlyID ¶
OnlyID is like Only, but returns the only CloudFile ID in the query. Returns a *NotSingularError when more than one CloudFile ID is found. Returns a *NotFoundError when no entities are found.
func (*CloudFileQuery) OnlyIDX ¶
func (cfq *CloudFileQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CloudFileQuery) OnlyX ¶
func (cfq *CloudFileQuery) OnlyX(ctx context.Context) *CloudFile
OnlyX is like Only, but panics if an error occurs.
func (*CloudFileQuery) Order ¶
func (cfq *CloudFileQuery) Order(o ...cloudfile.OrderOption) *CloudFileQuery
Order specifies how the records should be ordered.
func (*CloudFileQuery) Page ¶
func (cf *CloudFileQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...CloudFilePaginateOption, ) (*CloudFilePageList, error)
func (*CloudFileQuery) QueryContext ¶
func (c *CloudFileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileQuery) QueryStorageProviders ¶
func (cfq *CloudFileQuery) QueryStorageProviders() *StorageProviderQuery
QueryStorageProviders chains the current query on the "storage_providers" edge.
func (*CloudFileQuery) QueryTags ¶
func (cfq *CloudFileQuery) QueryTags() *CloudFileTagQuery
QueryTags chains the current query on the "tags" edge.
func (*CloudFileQuery) Select ¶
func (cfq *CloudFileQuery) Select(fields ...string) *CloudFileSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.CloudFile.Query().
Select(cloudfile.FieldCreatedAt).
Scan(ctx, &v)
func (*CloudFileQuery) Unique ¶
func (cfq *CloudFileQuery) Unique(unique bool) *CloudFileQuery
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 (*CloudFileQuery) Where ¶
func (cfq *CloudFileQuery) Where(ps ...predicate.CloudFile) *CloudFileQuery
Where adds a new predicate for the CloudFileQuery builder.
func (*CloudFileQuery) WithStorageProviders ¶
func (cfq *CloudFileQuery) WithStorageProviders(opts ...func(*StorageProviderQuery)) *CloudFileQuery
WithStorageProviders tells the query-builder to eager-load the nodes that are connected to the "storage_providers" edge. The optional arguments are used to configure the query builder of the edge.
func (*CloudFileQuery) WithTags ¶
func (cfq *CloudFileQuery) WithTags(opts ...func(*CloudFileTagQuery)) *CloudFileQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type CloudFileSelect ¶
type CloudFileSelect struct {
*CloudFileQuery
// contains filtered or unexported fields
}
CloudFileSelect is the builder for selecting fields of CloudFile entities.
func (*CloudFileSelect) Aggregate ¶
func (cfs *CloudFileSelect) Aggregate(fns ...AggregateFunc) *CloudFileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CloudFileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CloudFileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (CloudFileSelect) ExecContext ¶
func (c CloudFileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CloudFileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CloudFileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CloudFileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (CloudFileSelect) QueryContext ¶
func (c CloudFileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileSelect) Scan ¶
func (cfs *CloudFileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CloudFileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CloudFileTag ¶
type CloudFileTag struct {
// ID of the ent.
ID uint64 `json:"id,omitempty"`
// Create Time | 创建日期
CreatedAt time.Time `json:"created_at,omitempty"`
// Update Time | 修改日期
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Status 1: normal 2: ban | 状态 1 正常 2 禁用
Status uint8 `json:"status,omitempty"`
// CloudFileTag's name | 标签名称
Name string `json:"name,omitempty"`
// The remark of tag | 标签的备注
Remark string `json:"remark,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the CloudFileTagQuery when eager-loading is set.
Edges CloudFileTagEdges `json:"edges"`
// contains filtered or unexported fields
}
Cloud File's Tags Table | 云文件标签表
func (*CloudFileTag) ExecContext ¶
func (c *CloudFileTag) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTag) QueryCloudFiles ¶
func (cft *CloudFileTag) QueryCloudFiles() *CloudFileQuery
QueryCloudFiles queries the "cloud_files" edge of the CloudFileTag entity.
func (*CloudFileTag) QueryContext ¶
func (c *CloudFileTag) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTag) String ¶
func (cft *CloudFileTag) String() string
String implements the fmt.Stringer.
func (*CloudFileTag) Unwrap ¶
func (cft *CloudFileTag) Unwrap() *CloudFileTag
Unwrap unwraps the CloudFileTag 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 (*CloudFileTag) Update ¶
func (cft *CloudFileTag) Update() *CloudFileTagUpdateOne
Update returns a builder for updating this CloudFileTag. Note that you need to call CloudFileTag.Unwrap() before calling this method if this CloudFileTag was returned from a transaction, and the transaction was committed or rolled back.
type CloudFileTagClient ¶
type CloudFileTagClient struct {
// contains filtered or unexported fields
}
CloudFileTagClient is a client for the CloudFileTag schema.
func NewCloudFileTagClient ¶
func NewCloudFileTagClient(c config) *CloudFileTagClient
NewCloudFileTagClient returns a client for the CloudFileTag from the given config.
func (*CloudFileTagClient) Create ¶
func (c *CloudFileTagClient) Create() *CloudFileTagCreate
Create returns a builder for creating a CloudFileTag entity.
func (*CloudFileTagClient) CreateBulk ¶
func (c *CloudFileTagClient) CreateBulk(builders ...*CloudFileTagCreate) *CloudFileTagCreateBulk
CreateBulk returns a builder for creating a bulk of CloudFileTag entities.
func (*CloudFileTagClient) Delete ¶
func (c *CloudFileTagClient) Delete() *CloudFileTagDelete
Delete returns a delete builder for CloudFileTag.
func (*CloudFileTagClient) DeleteOne ¶
func (c *CloudFileTagClient) DeleteOne(cft *CloudFileTag) *CloudFileTagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CloudFileTagClient) DeleteOneID ¶
func (c *CloudFileTagClient) DeleteOneID(id uint64) *CloudFileTagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CloudFileTagClient) ExecContext ¶
func (c *CloudFileTagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagClient) Get ¶
func (c *CloudFileTagClient) Get(ctx context.Context, id uint64) (*CloudFileTag, error)
Get returns a CloudFileTag entity by its id.
func (*CloudFileTagClient) GetX ¶
func (c *CloudFileTagClient) GetX(ctx context.Context, id uint64) *CloudFileTag
GetX is like Get, but panics if an error occurs.
func (*CloudFileTagClient) Hooks ¶
func (c *CloudFileTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CloudFileTagClient) Intercept ¶
func (c *CloudFileTagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `cloudfiletag.Intercept(f(g(h())))`.
func (*CloudFileTagClient) Interceptors ¶
func (c *CloudFileTagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CloudFileTagClient) MapCreateBulk ¶
func (c *CloudFileTagClient) MapCreateBulk(slice any, setFunc func(*CloudFileTagCreate, int)) *CloudFileTagCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CloudFileTagClient) Query ¶
func (c *CloudFileTagClient) Query() *CloudFileTagQuery
Query returns a query builder for CloudFileTag.
func (*CloudFileTagClient) QueryCloudFiles ¶
func (c *CloudFileTagClient) QueryCloudFiles(cft *CloudFileTag) *CloudFileQuery
QueryCloudFiles queries the cloud_files edge of a CloudFileTag.
func (*CloudFileTagClient) QueryContext ¶
func (c *CloudFileTagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagClient) Update ¶
func (c *CloudFileTagClient) Update() *CloudFileTagUpdate
Update returns an update builder for CloudFileTag.
func (*CloudFileTagClient) UpdateOne ¶
func (c *CloudFileTagClient) UpdateOne(cft *CloudFileTag) *CloudFileTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CloudFileTagClient) UpdateOneID ¶
func (c *CloudFileTagClient) UpdateOneID(id uint64) *CloudFileTagUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CloudFileTagClient) Use ¶
func (c *CloudFileTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `cloudfiletag.Hooks(f(g(h())))`.
type CloudFileTagCreate ¶
type CloudFileTagCreate struct {
// contains filtered or unexported fields
}
CloudFileTagCreate is the builder for creating a CloudFileTag entity.
func (*CloudFileTagCreate) AddCloudFileIDs ¶
func (cftc *CloudFileTagCreate) AddCloudFileIDs(ids ...uuid.UUID) *CloudFileTagCreate
AddCloudFileIDs adds the "cloud_files" edge to the CloudFile entity by IDs.
func (*CloudFileTagCreate) AddCloudFiles ¶
func (cftc *CloudFileTagCreate) AddCloudFiles(c ...*CloudFile) *CloudFileTagCreate
AddCloudFiles adds the "cloud_files" edges to the CloudFile entity.
func (*CloudFileTagCreate) Exec ¶
func (cftc *CloudFileTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CloudFileTagCreate) ExecContext ¶
func (c *CloudFileTagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagCreate) ExecX ¶
func (cftc *CloudFileTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileTagCreate) Mutation ¶
func (cftc *CloudFileTagCreate) Mutation() *CloudFileTagMutation
Mutation returns the CloudFileTagMutation object of the builder.
func (*CloudFileTagCreate) QueryContext ¶
func (c *CloudFileTagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagCreate) Save ¶
func (cftc *CloudFileTagCreate) Save(ctx context.Context) (*CloudFileTag, error)
Save creates the CloudFileTag in the database.
func (*CloudFileTagCreate) SaveX ¶
func (cftc *CloudFileTagCreate) SaveX(ctx context.Context) *CloudFileTag
SaveX calls Save and panics if Save returns an error.
func (*CloudFileTagCreate) SetCreatedAt ¶
func (cftc *CloudFileTagCreate) SetCreatedAt(t time.Time) *CloudFileTagCreate
SetCreatedAt sets the "created_at" field.
func (*CloudFileTagCreate) SetID ¶
func (cftc *CloudFileTagCreate) SetID(u uint64) *CloudFileTagCreate
SetID sets the "id" field.
func (*CloudFileTagCreate) SetName ¶
func (cftc *CloudFileTagCreate) SetName(s string) *CloudFileTagCreate
SetName sets the "name" field.
func (*CloudFileTagCreate) SetNillableCreatedAt ¶
func (cftc *CloudFileTagCreate) SetNillableCreatedAt(t *time.Time) *CloudFileTagCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CloudFileTagCreate) SetNillableRemark ¶
func (cftc *CloudFileTagCreate) SetNillableRemark(s *string) *CloudFileTagCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*CloudFileTagCreate) SetNillableStatus ¶
func (cftc *CloudFileTagCreate) SetNillableStatus(u *uint8) *CloudFileTagCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CloudFileTagCreate) SetNillableUpdatedAt ¶
func (cftc *CloudFileTagCreate) SetNillableUpdatedAt(t *time.Time) *CloudFileTagCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CloudFileTagCreate) SetNotNilName ¶
func (cft *CloudFileTagCreate) SetNotNilName(value *string) *CloudFileTagCreate
set field if value's pointer is not nil.
func (*CloudFileTagCreate) SetNotNilRemark ¶
func (cft *CloudFileTagCreate) SetNotNilRemark(value *string) *CloudFileTagCreate
set field if value's pointer is not nil.
func (*CloudFileTagCreate) SetNotNilStatus ¶
func (cft *CloudFileTagCreate) SetNotNilStatus(value *uint8) *CloudFileTagCreate
set field if value's pointer is not nil.
func (*CloudFileTagCreate) SetNotNilUpdatedAt ¶
func (cft *CloudFileTagCreate) SetNotNilUpdatedAt(value *time.Time) *CloudFileTagCreate
set field if value's pointer is not nil.
func (*CloudFileTagCreate) SetRemark ¶
func (cftc *CloudFileTagCreate) SetRemark(s string) *CloudFileTagCreate
SetRemark sets the "remark" field.
func (*CloudFileTagCreate) SetStatus ¶
func (cftc *CloudFileTagCreate) SetStatus(u uint8) *CloudFileTagCreate
SetStatus sets the "status" field.
func (*CloudFileTagCreate) SetUpdatedAt ¶
func (cftc *CloudFileTagCreate) SetUpdatedAt(t time.Time) *CloudFileTagCreate
SetUpdatedAt sets the "updated_at" field.
type CloudFileTagCreateBulk ¶
type CloudFileTagCreateBulk struct {
// contains filtered or unexported fields
}
CloudFileTagCreateBulk is the builder for creating many CloudFileTag entities in bulk.
func (*CloudFileTagCreateBulk) Exec ¶
func (cftcb *CloudFileTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CloudFileTagCreateBulk) ExecContext ¶
func (c *CloudFileTagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagCreateBulk) ExecX ¶
func (cftcb *CloudFileTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileTagCreateBulk) QueryContext ¶
func (c *CloudFileTagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagCreateBulk) Save ¶
func (cftcb *CloudFileTagCreateBulk) Save(ctx context.Context) ([]*CloudFileTag, error)
Save creates the CloudFileTag entities in the database.
func (*CloudFileTagCreateBulk) SaveX ¶
func (cftcb *CloudFileTagCreateBulk) SaveX(ctx context.Context) []*CloudFileTag
SaveX is like Save, but panics if an error occurs.
type CloudFileTagDelete ¶
type CloudFileTagDelete struct {
// contains filtered or unexported fields
}
CloudFileTagDelete is the builder for deleting a CloudFileTag entity.
func (*CloudFileTagDelete) Exec ¶
func (cftd *CloudFileTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CloudFileTagDelete) ExecContext ¶
func (c *CloudFileTagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagDelete) ExecX ¶
func (cftd *CloudFileTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileTagDelete) QueryContext ¶
func (c *CloudFileTagDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagDelete) Where ¶
func (cftd *CloudFileTagDelete) Where(ps ...predicate.CloudFileTag) *CloudFileTagDelete
Where appends a list predicates to the CloudFileTagDelete builder.
type CloudFileTagDeleteOne ¶
type CloudFileTagDeleteOne struct {
// contains filtered or unexported fields
}
CloudFileTagDeleteOne is the builder for deleting a single CloudFileTag entity.
func (*CloudFileTagDeleteOne) Exec ¶
func (cftdo *CloudFileTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CloudFileTagDeleteOne) ExecX ¶
func (cftdo *CloudFileTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileTagDeleteOne) Where ¶
func (cftdo *CloudFileTagDeleteOne) Where(ps ...predicate.CloudFileTag) *CloudFileTagDeleteOne
Where appends a list predicates to the CloudFileTagDelete builder.
type CloudFileTagEdges ¶
type CloudFileTagEdges struct {
// CloudFiles holds the value of the cloud_files edge.
CloudFiles []*CloudFile `json:"cloud_files,omitempty"`
// contains filtered or unexported fields
}
CloudFileTagEdges holds the relations/edges for other nodes in the graph.
func (CloudFileTagEdges) CloudFilesOrErr ¶
func (e CloudFileTagEdges) CloudFilesOrErr() ([]*CloudFile, error)
CloudFilesOrErr returns the CloudFiles value or an error if the edge was not loaded in eager-loading.
type CloudFileTagGroupBy ¶
type CloudFileTagGroupBy struct {
// contains filtered or unexported fields
}
CloudFileTagGroupBy is the group-by builder for CloudFileTag entities.
func (*CloudFileTagGroupBy) Aggregate ¶
func (cftgb *CloudFileTagGroupBy) Aggregate(fns ...AggregateFunc) *CloudFileTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CloudFileTagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CloudFileTagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CloudFileTagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CloudFileTagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CloudFileTagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CloudFileTagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CloudFileTagGroupBy) Scan ¶
func (cftgb *CloudFileTagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CloudFileTagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CloudFileTagMutation ¶
type CloudFileTagMutation struct {
// contains filtered or unexported fields
}
CloudFileTagMutation represents an operation that mutates the CloudFileTag nodes in the graph.
func (*CloudFileTagMutation) AddCloudFileIDs ¶
func (m *CloudFileTagMutation) AddCloudFileIDs(ids ...uuid.UUID)
AddCloudFileIDs adds the "cloud_files" edge to the CloudFile entity by ids.
func (*CloudFileTagMutation) AddField ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) AddStatus ¶
func (m *CloudFileTagMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*CloudFileTagMutation) AddedEdges ¶
func (m *CloudFileTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CloudFileTagMutation) AddedField ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) AddedFields ¶
func (m *CloudFileTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CloudFileTagMutation) AddedIDs ¶
func (m *CloudFileTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CloudFileTagMutation) AddedStatus ¶
func (m *CloudFileTagMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*CloudFileTagMutation) ClearCloudFiles ¶
func (m *CloudFileTagMutation) ClearCloudFiles()
ClearCloudFiles clears the "cloud_files" edge to the CloudFile entity.
func (*CloudFileTagMutation) ClearEdge ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) ClearField ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) ClearRemark ¶
func (m *CloudFileTagMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*CloudFileTagMutation) ClearStatus ¶
func (m *CloudFileTagMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*CloudFileTagMutation) ClearedEdges ¶
func (m *CloudFileTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CloudFileTagMutation) ClearedFields ¶
func (m *CloudFileTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CloudFileTagMutation) Client ¶
func (m CloudFileTagMutation) 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 (*CloudFileTagMutation) CloudFilesCleared ¶
func (m *CloudFileTagMutation) CloudFilesCleared() bool
CloudFilesCleared reports if the "cloud_files" edge to the CloudFile entity was cleared.
func (*CloudFileTagMutation) CloudFilesIDs ¶
func (m *CloudFileTagMutation) CloudFilesIDs() (ids []uuid.UUID)
CloudFilesIDs returns the "cloud_files" edge IDs in the mutation.
func (*CloudFileTagMutation) CreatedAt ¶
func (m *CloudFileTagMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CloudFileTagMutation) EdgeCleared ¶
func (m *CloudFileTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CloudFileTagMutation) ExecContext ¶
func (c *CloudFileTagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagMutation) Field ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) FieldCleared ¶
func (m *CloudFileTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CloudFileTagMutation) Fields ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) ID ¶
func (m *CloudFileTagMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CloudFileTagMutation) IDs ¶
func (m *CloudFileTagMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CloudFileTagMutation) Name ¶
func (m *CloudFileTagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CloudFileTagMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the CloudFileTag entity. If the CloudFileTag 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 (*CloudFileTagMutation) OldField ¶
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 (*CloudFileTagMutation) OldName ¶
func (m *CloudFileTagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the CloudFileTag entity. If the CloudFileTag 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 (*CloudFileTagMutation) OldRemark ¶
func (m *CloudFileTagMutation) OldRemark(ctx context.Context) (v string, err error)
OldRemark returns the old "remark" field's value of the CloudFileTag entity. If the CloudFileTag 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 (*CloudFileTagMutation) OldStatus ¶
func (m *CloudFileTagMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the CloudFileTag entity. If the CloudFileTag 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 (*CloudFileTagMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the CloudFileTag entity. If the CloudFileTag 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 (*CloudFileTagMutation) Op ¶
func (m *CloudFileTagMutation) Op() Op
Op returns the operation name.
func (*CloudFileTagMutation) QueryContext ¶
func (c *CloudFileTagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagMutation) Remark ¶
func (m *CloudFileTagMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*CloudFileTagMutation) RemarkCleared ¶
func (m *CloudFileTagMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*CloudFileTagMutation) RemoveCloudFileIDs ¶
func (m *CloudFileTagMutation) RemoveCloudFileIDs(ids ...uuid.UUID)
RemoveCloudFileIDs removes the "cloud_files" edge to the CloudFile entity by IDs.
func (*CloudFileTagMutation) RemovedCloudFilesIDs ¶
func (m *CloudFileTagMutation) RemovedCloudFilesIDs() (ids []uuid.UUID)
RemovedCloudFiles returns the removed IDs of the "cloud_files" edge to the CloudFile entity.
func (*CloudFileTagMutation) RemovedEdges ¶
func (m *CloudFileTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CloudFileTagMutation) RemovedIDs ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) ResetCloudFiles ¶
func (m *CloudFileTagMutation) ResetCloudFiles()
ResetCloudFiles resets all changes to the "cloud_files" edge.
func (*CloudFileTagMutation) ResetCreatedAt ¶
func (m *CloudFileTagMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CloudFileTagMutation) ResetEdge ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) ResetField ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) ResetName ¶
func (m *CloudFileTagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CloudFileTagMutation) ResetRemark ¶
func (m *CloudFileTagMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*CloudFileTagMutation) ResetStatus ¶
func (m *CloudFileTagMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*CloudFileTagMutation) ResetUpdatedAt ¶
func (m *CloudFileTagMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CloudFileTagMutation) SetCreatedAt ¶
func (m *CloudFileTagMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CloudFileTagMutation) SetField ¶
func (m *CloudFileTagMutation) 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 (*CloudFileTagMutation) SetID ¶
func (m *CloudFileTagMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CloudFileTag entities.
func (*CloudFileTagMutation) SetName ¶
func (m *CloudFileTagMutation) SetName(s string)
SetName sets the "name" field.
func (*CloudFileTagMutation) SetOp ¶
func (m *CloudFileTagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CloudFileTagMutation) SetRemark ¶
func (m *CloudFileTagMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*CloudFileTagMutation) SetStatus ¶
func (m *CloudFileTagMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*CloudFileTagMutation) SetUpdatedAt ¶
func (m *CloudFileTagMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileTagMutation) Status ¶
func (m *CloudFileTagMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*CloudFileTagMutation) StatusCleared ¶
func (m *CloudFileTagMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (CloudFileTagMutation) Tx ¶
func (m CloudFileTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CloudFileTagMutation) Type ¶
func (m *CloudFileTagMutation) Type() string
Type returns the node type of this mutation (CloudFileTag).
func (*CloudFileTagMutation) UpdatedAt ¶
func (m *CloudFileTagMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CloudFileTagMutation) Where ¶
func (m *CloudFileTagMutation) Where(ps ...predicate.CloudFileTag)
Where appends a list predicates to the CloudFileTagMutation builder.
func (*CloudFileTagMutation) WhereP ¶
func (m *CloudFileTagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CloudFileTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CloudFileTagPageList ¶
type CloudFileTagPageList struct {
List []*CloudFileTag `json:"list"`
PageDetails *PageDetails `json:"pageDetails"`
}
CloudFileTagPageList is CloudFileTag PageList result.
type CloudFileTagPager ¶
type CloudFileTagPager struct {
Order cloudfiletag.OrderOption
Filter func(*CloudFileTagQuery) (*CloudFileTagQuery, error)
}
func (*CloudFileTagPager) ApplyFilter ¶
func (p *CloudFileTagPager) ApplyFilter(query *CloudFileTagQuery) (*CloudFileTagQuery, error)
type CloudFileTagPaginateOption ¶
type CloudFileTagPaginateOption func(*CloudFileTagPager)
CloudFileTagPaginateOption enables pagination customization.
type CloudFileTagQuery ¶
type CloudFileTagQuery struct {
// contains filtered or unexported fields
}
CloudFileTagQuery is the builder for querying CloudFileTag entities.
func (*CloudFileTagQuery) Aggregate ¶
func (cftq *CloudFileTagQuery) Aggregate(fns ...AggregateFunc) *CloudFileTagSelect
Aggregate returns a CloudFileTagSelect configured with the given aggregations.
func (*CloudFileTagQuery) All ¶
func (cftq *CloudFileTagQuery) All(ctx context.Context) ([]*CloudFileTag, error)
All executes the query and returns a list of CloudFileTags.
func (*CloudFileTagQuery) AllX ¶
func (cftq *CloudFileTagQuery) AllX(ctx context.Context) []*CloudFileTag
AllX is like All, but panics if an error occurs.
func (*CloudFileTagQuery) Clone ¶
func (cftq *CloudFileTagQuery) Clone() *CloudFileTagQuery
Clone returns a duplicate of the CloudFileTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CloudFileTagQuery) Count ¶
func (cftq *CloudFileTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CloudFileTagQuery) CountX ¶
func (cftq *CloudFileTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CloudFileTagQuery) ExecContext ¶
func (c *CloudFileTagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagQuery) Exist ¶
func (cftq *CloudFileTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CloudFileTagQuery) ExistX ¶
func (cftq *CloudFileTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CloudFileTagQuery) First ¶
func (cftq *CloudFileTagQuery) First(ctx context.Context) (*CloudFileTag, error)
First returns the first CloudFileTag entity from the query. Returns a *NotFoundError when no CloudFileTag was found.
func (*CloudFileTagQuery) FirstID ¶
func (cftq *CloudFileTagQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first CloudFileTag ID from the query. Returns a *NotFoundError when no CloudFileTag ID was found.
func (*CloudFileTagQuery) FirstIDX ¶
func (cftq *CloudFileTagQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*CloudFileTagQuery) FirstX ¶
func (cftq *CloudFileTagQuery) FirstX(ctx context.Context) *CloudFileTag
FirstX is like First, but panics if an error occurs.
func (*CloudFileTagQuery) GroupBy ¶
func (cftq *CloudFileTagQuery) GroupBy(field string, fields ...string) *CloudFileTagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.CloudFileTag.Query().
GroupBy(cloudfiletag.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CloudFileTagQuery) IDs ¶
func (cftq *CloudFileTagQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of CloudFileTag IDs.
func (*CloudFileTagQuery) IDsX ¶
func (cftq *CloudFileTagQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*CloudFileTagQuery) Limit ¶
func (cftq *CloudFileTagQuery) Limit(limit int) *CloudFileTagQuery
Limit the number of records to be returned by this query.
func (*CloudFileTagQuery) Offset ¶
func (cftq *CloudFileTagQuery) Offset(offset int) *CloudFileTagQuery
Offset to start from.
func (*CloudFileTagQuery) Only ¶
func (cftq *CloudFileTagQuery) Only(ctx context.Context) (*CloudFileTag, error)
Only returns a single CloudFileTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CloudFileTag entity is found. Returns a *NotFoundError when no CloudFileTag entities are found.
func (*CloudFileTagQuery) OnlyID ¶
func (cftq *CloudFileTagQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only CloudFileTag ID in the query. Returns a *NotSingularError when more than one CloudFileTag ID is found. Returns a *NotFoundError when no entities are found.
func (*CloudFileTagQuery) OnlyIDX ¶
func (cftq *CloudFileTagQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CloudFileTagQuery) OnlyX ¶
func (cftq *CloudFileTagQuery) OnlyX(ctx context.Context) *CloudFileTag
OnlyX is like Only, but panics if an error occurs.
func (*CloudFileTagQuery) Order ¶
func (cftq *CloudFileTagQuery) Order(o ...cloudfiletag.OrderOption) *CloudFileTagQuery
Order specifies how the records should be ordered.
func (*CloudFileTagQuery) Page ¶
func (cft *CloudFileTagQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...CloudFileTagPaginateOption, ) (*CloudFileTagPageList, error)
func (*CloudFileTagQuery) QueryCloudFiles ¶
func (cftq *CloudFileTagQuery) QueryCloudFiles() *CloudFileQuery
QueryCloudFiles chains the current query on the "cloud_files" edge.
func (*CloudFileTagQuery) QueryContext ¶
func (c *CloudFileTagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagQuery) Select ¶
func (cftq *CloudFileTagQuery) Select(fields ...string) *CloudFileTagSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.CloudFileTag.Query().
Select(cloudfiletag.FieldCreatedAt).
Scan(ctx, &v)
func (*CloudFileTagQuery) Unique ¶
func (cftq *CloudFileTagQuery) Unique(unique bool) *CloudFileTagQuery
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 (*CloudFileTagQuery) Where ¶
func (cftq *CloudFileTagQuery) Where(ps ...predicate.CloudFileTag) *CloudFileTagQuery
Where adds a new predicate for the CloudFileTagQuery builder.
func (*CloudFileTagQuery) WithCloudFiles ¶
func (cftq *CloudFileTagQuery) WithCloudFiles(opts ...func(*CloudFileQuery)) *CloudFileTagQuery
WithCloudFiles tells the query-builder to eager-load the nodes that are connected to the "cloud_files" edge. The optional arguments are used to configure the query builder of the edge.
type CloudFileTagSelect ¶
type CloudFileTagSelect struct {
*CloudFileTagQuery
// contains filtered or unexported fields
}
CloudFileTagSelect is the builder for selecting fields of CloudFileTag entities.
func (*CloudFileTagSelect) Aggregate ¶
func (cfts *CloudFileTagSelect) Aggregate(fns ...AggregateFunc) *CloudFileTagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CloudFileTagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CloudFileTagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (CloudFileTagSelect) ExecContext ¶
func (c CloudFileTagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CloudFileTagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CloudFileTagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CloudFileTagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (CloudFileTagSelect) QueryContext ¶
func (c CloudFileTagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagSelect) Scan ¶
func (cfts *CloudFileTagSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CloudFileTagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CloudFileTagUpdate ¶
type CloudFileTagUpdate struct {
// contains filtered or unexported fields
}
CloudFileTagUpdate is the builder for updating CloudFileTag entities.
func (*CloudFileTagUpdate) AddCloudFileIDs ¶
func (cftu *CloudFileTagUpdate) AddCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdate
AddCloudFileIDs adds the "cloud_files" edge to the CloudFile entity by IDs.
func (*CloudFileTagUpdate) AddCloudFiles ¶
func (cftu *CloudFileTagUpdate) AddCloudFiles(c ...*CloudFile) *CloudFileTagUpdate
AddCloudFiles adds the "cloud_files" edges to the CloudFile entity.
func (*CloudFileTagUpdate) AddStatus ¶
func (cftu *CloudFileTagUpdate) AddStatus(u int8) *CloudFileTagUpdate
AddStatus adds u to the "status" field.
func (*CloudFileTagUpdate) ClearCloudFiles ¶
func (cftu *CloudFileTagUpdate) ClearCloudFiles() *CloudFileTagUpdate
ClearCloudFiles clears all "cloud_files" edges to the CloudFile entity.
func (*CloudFileTagUpdate) ClearRemark ¶
func (cftu *CloudFileTagUpdate) ClearRemark() *CloudFileTagUpdate
ClearRemark clears the value of the "remark" field.
func (*CloudFileTagUpdate) ClearStatus ¶
func (cftu *CloudFileTagUpdate) ClearStatus() *CloudFileTagUpdate
ClearStatus clears the value of the "status" field.
func (*CloudFileTagUpdate) Exec ¶
func (cftu *CloudFileTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CloudFileTagUpdate) ExecContext ¶
func (c *CloudFileTagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagUpdate) ExecX ¶
func (cftu *CloudFileTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileTagUpdate) Mutation ¶
func (cftu *CloudFileTagUpdate) Mutation() *CloudFileTagMutation
Mutation returns the CloudFileTagMutation object of the builder.
func (*CloudFileTagUpdate) QueryContext ¶
func (c *CloudFileTagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagUpdate) RemoveCloudFileIDs ¶
func (cftu *CloudFileTagUpdate) RemoveCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdate
RemoveCloudFileIDs removes the "cloud_files" edge to CloudFile entities by IDs.
func (*CloudFileTagUpdate) RemoveCloudFiles ¶
func (cftu *CloudFileTagUpdate) RemoveCloudFiles(c ...*CloudFile) *CloudFileTagUpdate
RemoveCloudFiles removes "cloud_files" edges to CloudFile entities.
func (*CloudFileTagUpdate) Save ¶
func (cftu *CloudFileTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CloudFileTagUpdate) SaveX ¶
func (cftu *CloudFileTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CloudFileTagUpdate) SetName ¶
func (cftu *CloudFileTagUpdate) SetName(s string) *CloudFileTagUpdate
SetName sets the "name" field.
func (*CloudFileTagUpdate) SetNillableName ¶
func (cftu *CloudFileTagUpdate) SetNillableName(s *string) *CloudFileTagUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CloudFileTagUpdate) SetNillableRemark ¶
func (cftu *CloudFileTagUpdate) SetNillableRemark(s *string) *CloudFileTagUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*CloudFileTagUpdate) SetNillableStatus ¶
func (cftu *CloudFileTagUpdate) SetNillableStatus(u *uint8) *CloudFileTagUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CloudFileTagUpdate) SetNotNilName ¶
func (cft *CloudFileTagUpdate) SetNotNilName(value *string) *CloudFileTagUpdate
set field if value's pointer is not nil.
func (*CloudFileTagUpdate) SetNotNilRemark ¶
func (cft *CloudFileTagUpdate) SetNotNilRemark(value *string) *CloudFileTagUpdate
set field if value's pointer is not nil.
func (*CloudFileTagUpdate) SetNotNilStatus ¶
func (cft *CloudFileTagUpdate) SetNotNilStatus(value *uint8) *CloudFileTagUpdate
set field if value's pointer is not nil.
func (*CloudFileTagUpdate) SetNotNilUpdatedAt ¶
func (cft *CloudFileTagUpdate) SetNotNilUpdatedAt(value *time.Time) *CloudFileTagUpdate
set field if value's pointer is not nil.
func (*CloudFileTagUpdate) SetRemark ¶
func (cftu *CloudFileTagUpdate) SetRemark(s string) *CloudFileTagUpdate
SetRemark sets the "remark" field.
func (*CloudFileTagUpdate) SetStatus ¶
func (cftu *CloudFileTagUpdate) SetStatus(u uint8) *CloudFileTagUpdate
SetStatus sets the "status" field.
func (*CloudFileTagUpdate) SetUpdatedAt ¶
func (cftu *CloudFileTagUpdate) SetUpdatedAt(t time.Time) *CloudFileTagUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileTagUpdate) Where ¶
func (cftu *CloudFileTagUpdate) Where(ps ...predicate.CloudFileTag) *CloudFileTagUpdate
Where appends a list predicates to the CloudFileTagUpdate builder.
type CloudFileTagUpdateOne ¶
type CloudFileTagUpdateOne struct {
// contains filtered or unexported fields
}
CloudFileTagUpdateOne is the builder for updating a single CloudFileTag entity.
func (*CloudFileTagUpdateOne) AddCloudFileIDs ¶
func (cftuo *CloudFileTagUpdateOne) AddCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdateOne
AddCloudFileIDs adds the "cloud_files" edge to the CloudFile entity by IDs.
func (*CloudFileTagUpdateOne) AddCloudFiles ¶
func (cftuo *CloudFileTagUpdateOne) AddCloudFiles(c ...*CloudFile) *CloudFileTagUpdateOne
AddCloudFiles adds the "cloud_files" edges to the CloudFile entity.
func (*CloudFileTagUpdateOne) AddStatus ¶
func (cftuo *CloudFileTagUpdateOne) AddStatus(u int8) *CloudFileTagUpdateOne
AddStatus adds u to the "status" field.
func (*CloudFileTagUpdateOne) ClearCloudFiles ¶
func (cftuo *CloudFileTagUpdateOne) ClearCloudFiles() *CloudFileTagUpdateOne
ClearCloudFiles clears all "cloud_files" edges to the CloudFile entity.
func (*CloudFileTagUpdateOne) ClearRemark ¶
func (cftuo *CloudFileTagUpdateOne) ClearRemark() *CloudFileTagUpdateOne
ClearRemark clears the value of the "remark" field.
func (*CloudFileTagUpdateOne) ClearStatus ¶
func (cftuo *CloudFileTagUpdateOne) ClearStatus() *CloudFileTagUpdateOne
ClearStatus clears the value of the "status" field.
func (*CloudFileTagUpdateOne) Exec ¶
func (cftuo *CloudFileTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CloudFileTagUpdateOne) ExecContext ¶
func (c *CloudFileTagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileTagUpdateOne) ExecX ¶
func (cftuo *CloudFileTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileTagUpdateOne) Mutation ¶
func (cftuo *CloudFileTagUpdateOne) Mutation() *CloudFileTagMutation
Mutation returns the CloudFileTagMutation object of the builder.
func (*CloudFileTagUpdateOne) QueryContext ¶
func (c *CloudFileTagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileTagUpdateOne) RemoveCloudFileIDs ¶
func (cftuo *CloudFileTagUpdateOne) RemoveCloudFileIDs(ids ...uuid.UUID) *CloudFileTagUpdateOne
RemoveCloudFileIDs removes the "cloud_files" edge to CloudFile entities by IDs.
func (*CloudFileTagUpdateOne) RemoveCloudFiles ¶
func (cftuo *CloudFileTagUpdateOne) RemoveCloudFiles(c ...*CloudFile) *CloudFileTagUpdateOne
RemoveCloudFiles removes "cloud_files" edges to CloudFile entities.
func (*CloudFileTagUpdateOne) Save ¶
func (cftuo *CloudFileTagUpdateOne) Save(ctx context.Context) (*CloudFileTag, error)
Save executes the query and returns the updated CloudFileTag entity.
func (*CloudFileTagUpdateOne) SaveX ¶
func (cftuo *CloudFileTagUpdateOne) SaveX(ctx context.Context) *CloudFileTag
SaveX is like Save, but panics if an error occurs.
func (*CloudFileTagUpdateOne) Select ¶
func (cftuo *CloudFileTagUpdateOne) Select(field string, fields ...string) *CloudFileTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CloudFileTagUpdateOne) SetName ¶
func (cftuo *CloudFileTagUpdateOne) SetName(s string) *CloudFileTagUpdateOne
SetName sets the "name" field.
func (*CloudFileTagUpdateOne) SetNillableName ¶
func (cftuo *CloudFileTagUpdateOne) SetNillableName(s *string) *CloudFileTagUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CloudFileTagUpdateOne) SetNillableRemark ¶
func (cftuo *CloudFileTagUpdateOne) SetNillableRemark(s *string) *CloudFileTagUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*CloudFileTagUpdateOne) SetNillableStatus ¶
func (cftuo *CloudFileTagUpdateOne) SetNillableStatus(u *uint8) *CloudFileTagUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CloudFileTagUpdateOne) SetNotNilName ¶
func (cft *CloudFileTagUpdateOne) SetNotNilName(value *string) *CloudFileTagUpdateOne
set field if value's pointer is not nil.
func (*CloudFileTagUpdateOne) SetNotNilRemark ¶
func (cft *CloudFileTagUpdateOne) SetNotNilRemark(value *string) *CloudFileTagUpdateOne
set field if value's pointer is not nil.
func (*CloudFileTagUpdateOne) SetNotNilStatus ¶
func (cft *CloudFileTagUpdateOne) SetNotNilStatus(value *uint8) *CloudFileTagUpdateOne
set field if value's pointer is not nil.
func (*CloudFileTagUpdateOne) SetNotNilUpdatedAt ¶
func (cft *CloudFileTagUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CloudFileTagUpdateOne
set field if value's pointer is not nil.
func (*CloudFileTagUpdateOne) SetRemark ¶
func (cftuo *CloudFileTagUpdateOne) SetRemark(s string) *CloudFileTagUpdateOne
SetRemark sets the "remark" field.
func (*CloudFileTagUpdateOne) SetStatus ¶
func (cftuo *CloudFileTagUpdateOne) SetStatus(u uint8) *CloudFileTagUpdateOne
SetStatus sets the "status" field.
func (*CloudFileTagUpdateOne) SetUpdatedAt ¶
func (cftuo *CloudFileTagUpdateOne) SetUpdatedAt(t time.Time) *CloudFileTagUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileTagUpdateOne) Where ¶
func (cftuo *CloudFileTagUpdateOne) Where(ps ...predicate.CloudFileTag) *CloudFileTagUpdateOne
Where appends a list predicates to the CloudFileTagUpdate builder.
type CloudFileTags ¶
type CloudFileTags []*CloudFileTag
CloudFileTags is a parsable slice of CloudFileTag.
type CloudFileUpdate ¶
type CloudFileUpdate struct {
// contains filtered or unexported fields
}
CloudFileUpdate is the builder for updating CloudFile entities.
func (*CloudFileUpdate) AddFileType ¶
func (cfu *CloudFileUpdate) AddFileType(u int8) *CloudFileUpdate
AddFileType adds u to the "file_type" field.
func (*CloudFileUpdate) AddSize ¶
func (cfu *CloudFileUpdate) AddSize(u int64) *CloudFileUpdate
AddSize adds u to the "size" field.
func (*CloudFileUpdate) AddTagIDs ¶
func (cfu *CloudFileUpdate) AddTagIDs(ids ...uint64) *CloudFileUpdate
AddTagIDs adds the "tags" edge to the CloudFileTag entity by IDs.
func (*CloudFileUpdate) AddTags ¶
func (cfu *CloudFileUpdate) AddTags(c ...*CloudFileTag) *CloudFileUpdate
AddTags adds the "tags" edges to the CloudFileTag entity.
func (*CloudFileUpdate) ClearState ¶
func (cfu *CloudFileUpdate) ClearState() *CloudFileUpdate
ClearState clears the value of the "state" field.
func (*CloudFileUpdate) ClearStorageProviders ¶
func (cfu *CloudFileUpdate) ClearStorageProviders() *CloudFileUpdate
ClearStorageProviders clears the "storage_providers" edge to the StorageProvider entity.
func (*CloudFileUpdate) ClearTags ¶
func (cfu *CloudFileUpdate) ClearTags() *CloudFileUpdate
ClearTags clears all "tags" edges to the CloudFileTag entity.
func (*CloudFileUpdate) Exec ¶
func (cfu *CloudFileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CloudFileUpdate) ExecContext ¶
func (c *CloudFileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileUpdate) ExecX ¶
func (cfu *CloudFileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileUpdate) Mutation ¶
func (cfu *CloudFileUpdate) Mutation() *CloudFileMutation
Mutation returns the CloudFileMutation object of the builder.
func (*CloudFileUpdate) QueryContext ¶
func (c *CloudFileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileUpdate) RemoveTagIDs ¶
func (cfu *CloudFileUpdate) RemoveTagIDs(ids ...uint64) *CloudFileUpdate
RemoveTagIDs removes the "tags" edge to CloudFileTag entities by IDs.
func (*CloudFileUpdate) RemoveTags ¶
func (cfu *CloudFileUpdate) RemoveTags(c ...*CloudFileTag) *CloudFileUpdate
RemoveTags removes "tags" edges to CloudFileTag entities.
func (*CloudFileUpdate) Save ¶
func (cfu *CloudFileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CloudFileUpdate) SaveX ¶
func (cfu *CloudFileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CloudFileUpdate) SetFileType ¶
func (cfu *CloudFileUpdate) SetFileType(u uint8) *CloudFileUpdate
SetFileType sets the "file_type" field.
func (*CloudFileUpdate) SetName ¶
func (cfu *CloudFileUpdate) SetName(s string) *CloudFileUpdate
SetName sets the "name" field.
func (*CloudFileUpdate) SetNillableFileType ¶
func (cfu *CloudFileUpdate) SetNillableFileType(u *uint8) *CloudFileUpdate
SetNillableFileType sets the "file_type" field if the given value is not nil.
func (*CloudFileUpdate) SetNillableName ¶
func (cfu *CloudFileUpdate) SetNillableName(s *string) *CloudFileUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CloudFileUpdate) SetNillableSize ¶
func (cfu *CloudFileUpdate) SetNillableSize(u *uint64) *CloudFileUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*CloudFileUpdate) SetNillableState ¶
func (cfu *CloudFileUpdate) SetNillableState(b *bool) *CloudFileUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*CloudFileUpdate) SetNillableStorageProvidersID ¶
func (cfu *CloudFileUpdate) SetNillableStorageProvidersID(id *uint64) *CloudFileUpdate
SetNillableStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by ID if the given value is not nil.
func (*CloudFileUpdate) SetNillableURL ¶
func (cfu *CloudFileUpdate) SetNillableURL(s *string) *CloudFileUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*CloudFileUpdate) SetNillableUserID ¶
func (cfu *CloudFileUpdate) SetNillableUserID(s *string) *CloudFileUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CloudFileUpdate) SetNotNilFileType ¶
func (cf *CloudFileUpdate) SetNotNilFileType(value *uint8) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetNotNilName ¶
func (cf *CloudFileUpdate) SetNotNilName(value *string) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetNotNilSize ¶
func (cf *CloudFileUpdate) SetNotNilSize(value *uint64) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetNotNilState ¶
func (cf *CloudFileUpdate) SetNotNilState(value *bool) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetNotNilURL ¶
func (cf *CloudFileUpdate) SetNotNilURL(value *string) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetNotNilUpdatedAt ¶
func (cf *CloudFileUpdate) SetNotNilUpdatedAt(value *time.Time) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetNotNilUserID ¶
func (cf *CloudFileUpdate) SetNotNilUserID(value *string) *CloudFileUpdate
set field if value's pointer is not nil.
func (*CloudFileUpdate) SetSize ¶
func (cfu *CloudFileUpdate) SetSize(u uint64) *CloudFileUpdate
SetSize sets the "size" field.
func (*CloudFileUpdate) SetState ¶
func (cfu *CloudFileUpdate) SetState(b bool) *CloudFileUpdate
SetState sets the "state" field.
func (*CloudFileUpdate) SetStorageProviders ¶
func (cfu *CloudFileUpdate) SetStorageProviders(s *StorageProvider) *CloudFileUpdate
SetStorageProviders sets the "storage_providers" edge to the StorageProvider entity.
func (*CloudFileUpdate) SetStorageProvidersID ¶
func (cfu *CloudFileUpdate) SetStorageProvidersID(id uint64) *CloudFileUpdate
SetStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by ID.
func (*CloudFileUpdate) SetURL ¶
func (cfu *CloudFileUpdate) SetURL(s string) *CloudFileUpdate
SetURL sets the "url" field.
func (*CloudFileUpdate) SetUpdatedAt ¶
func (cfu *CloudFileUpdate) SetUpdatedAt(t time.Time) *CloudFileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileUpdate) SetUserID ¶
func (cfu *CloudFileUpdate) SetUserID(s string) *CloudFileUpdate
SetUserID sets the "user_id" field.
func (*CloudFileUpdate) Where ¶
func (cfu *CloudFileUpdate) Where(ps ...predicate.CloudFile) *CloudFileUpdate
Where appends a list predicates to the CloudFileUpdate builder.
type CloudFileUpdateOne ¶
type CloudFileUpdateOne struct {
// contains filtered or unexported fields
}
CloudFileUpdateOne is the builder for updating a single CloudFile entity.
func (*CloudFileUpdateOne) AddFileType ¶
func (cfuo *CloudFileUpdateOne) AddFileType(u int8) *CloudFileUpdateOne
AddFileType adds u to the "file_type" field.
func (*CloudFileUpdateOne) AddSize ¶
func (cfuo *CloudFileUpdateOne) AddSize(u int64) *CloudFileUpdateOne
AddSize adds u to the "size" field.
func (*CloudFileUpdateOne) AddTagIDs ¶
func (cfuo *CloudFileUpdateOne) AddTagIDs(ids ...uint64) *CloudFileUpdateOne
AddTagIDs adds the "tags" edge to the CloudFileTag entity by IDs.
func (*CloudFileUpdateOne) AddTags ¶
func (cfuo *CloudFileUpdateOne) AddTags(c ...*CloudFileTag) *CloudFileUpdateOne
AddTags adds the "tags" edges to the CloudFileTag entity.
func (*CloudFileUpdateOne) ClearState ¶
func (cfuo *CloudFileUpdateOne) ClearState() *CloudFileUpdateOne
ClearState clears the value of the "state" field.
func (*CloudFileUpdateOne) ClearStorageProviders ¶
func (cfuo *CloudFileUpdateOne) ClearStorageProviders() *CloudFileUpdateOne
ClearStorageProviders clears the "storage_providers" edge to the StorageProvider entity.
func (*CloudFileUpdateOne) ClearTags ¶
func (cfuo *CloudFileUpdateOne) ClearTags() *CloudFileUpdateOne
ClearTags clears all "tags" edges to the CloudFileTag entity.
func (*CloudFileUpdateOne) Exec ¶
func (cfuo *CloudFileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CloudFileUpdateOne) ExecContext ¶
func (c *CloudFileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CloudFileUpdateOne) ExecX ¶
func (cfuo *CloudFileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CloudFileUpdateOne) Mutation ¶
func (cfuo *CloudFileUpdateOne) Mutation() *CloudFileMutation
Mutation returns the CloudFileMutation object of the builder.
func (*CloudFileUpdateOne) QueryContext ¶
func (c *CloudFileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CloudFileUpdateOne) RemoveTagIDs ¶
func (cfuo *CloudFileUpdateOne) RemoveTagIDs(ids ...uint64) *CloudFileUpdateOne
RemoveTagIDs removes the "tags" edge to CloudFileTag entities by IDs.
func (*CloudFileUpdateOne) RemoveTags ¶
func (cfuo *CloudFileUpdateOne) RemoveTags(c ...*CloudFileTag) *CloudFileUpdateOne
RemoveTags removes "tags" edges to CloudFileTag entities.
func (*CloudFileUpdateOne) Save ¶
func (cfuo *CloudFileUpdateOne) Save(ctx context.Context) (*CloudFile, error)
Save executes the query and returns the updated CloudFile entity.
func (*CloudFileUpdateOne) SaveX ¶
func (cfuo *CloudFileUpdateOne) SaveX(ctx context.Context) *CloudFile
SaveX is like Save, but panics if an error occurs.
func (*CloudFileUpdateOne) Select ¶
func (cfuo *CloudFileUpdateOne) Select(field string, fields ...string) *CloudFileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CloudFileUpdateOne) SetFileType ¶
func (cfuo *CloudFileUpdateOne) SetFileType(u uint8) *CloudFileUpdateOne
SetFileType sets the "file_type" field.
func (*CloudFileUpdateOne) SetName ¶
func (cfuo *CloudFileUpdateOne) SetName(s string) *CloudFileUpdateOne
SetName sets the "name" field.
func (*CloudFileUpdateOne) SetNillableFileType ¶
func (cfuo *CloudFileUpdateOne) SetNillableFileType(u *uint8) *CloudFileUpdateOne
SetNillableFileType sets the "file_type" field if the given value is not nil.
func (*CloudFileUpdateOne) SetNillableName ¶
func (cfuo *CloudFileUpdateOne) SetNillableName(s *string) *CloudFileUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CloudFileUpdateOne) SetNillableSize ¶
func (cfuo *CloudFileUpdateOne) SetNillableSize(u *uint64) *CloudFileUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*CloudFileUpdateOne) SetNillableState ¶
func (cfuo *CloudFileUpdateOne) SetNillableState(b *bool) *CloudFileUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*CloudFileUpdateOne) SetNillableStorageProvidersID ¶
func (cfuo *CloudFileUpdateOne) SetNillableStorageProvidersID(id *uint64) *CloudFileUpdateOne
SetNillableStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by ID if the given value is not nil.
func (*CloudFileUpdateOne) SetNillableURL ¶
func (cfuo *CloudFileUpdateOne) SetNillableURL(s *string) *CloudFileUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*CloudFileUpdateOne) SetNillableUserID ¶
func (cfuo *CloudFileUpdateOne) SetNillableUserID(s *string) *CloudFileUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CloudFileUpdateOne) SetNotNilFileType ¶
func (cf *CloudFileUpdateOne) SetNotNilFileType(value *uint8) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetNotNilName ¶
func (cf *CloudFileUpdateOne) SetNotNilName(value *string) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetNotNilSize ¶
func (cf *CloudFileUpdateOne) SetNotNilSize(value *uint64) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetNotNilState ¶
func (cf *CloudFileUpdateOne) SetNotNilState(value *bool) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetNotNilURL ¶
func (cf *CloudFileUpdateOne) SetNotNilURL(value *string) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetNotNilUpdatedAt ¶
func (cf *CloudFileUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetNotNilUserID ¶
func (cf *CloudFileUpdateOne) SetNotNilUserID(value *string) *CloudFileUpdateOne
set field if value's pointer is not nil.
func (*CloudFileUpdateOne) SetSize ¶
func (cfuo *CloudFileUpdateOne) SetSize(u uint64) *CloudFileUpdateOne
SetSize sets the "size" field.
func (*CloudFileUpdateOne) SetState ¶
func (cfuo *CloudFileUpdateOne) SetState(b bool) *CloudFileUpdateOne
SetState sets the "state" field.
func (*CloudFileUpdateOne) SetStorageProviders ¶
func (cfuo *CloudFileUpdateOne) SetStorageProviders(s *StorageProvider) *CloudFileUpdateOne
SetStorageProviders sets the "storage_providers" edge to the StorageProvider entity.
func (*CloudFileUpdateOne) SetStorageProvidersID ¶
func (cfuo *CloudFileUpdateOne) SetStorageProvidersID(id uint64) *CloudFileUpdateOne
SetStorageProvidersID sets the "storage_providers" edge to the StorageProvider entity by ID.
func (*CloudFileUpdateOne) SetURL ¶
func (cfuo *CloudFileUpdateOne) SetURL(s string) *CloudFileUpdateOne
SetURL sets the "url" field.
func (*CloudFileUpdateOne) SetUpdatedAt ¶
func (cfuo *CloudFileUpdateOne) SetUpdatedAt(t time.Time) *CloudFileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CloudFileUpdateOne) SetUserID ¶
func (cfuo *CloudFileUpdateOne) SetUserID(s string) *CloudFileUpdateOne
SetUserID sets the "user_id" field.
func (*CloudFileUpdateOne) Where ¶
func (cfuo *CloudFileUpdateOne) Where(ps ...predicate.CloudFile) *CloudFileUpdateOne
Where appends a list predicates to the CloudFileUpdate builder.
type CommitFunc ¶
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.
type CommitHook ¶
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 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 File ¶
type File struct {
// ID of the ent.
// UUID
ID uuid.UUID `json:"id,omitempty"`
// Create Time | 创建日期
CreatedAt time.Time `json:"created_at,omitempty"`
// Update Time | 修改日期
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Status 1: normal 2: ban | 状态 1 正常 2 禁用
Status uint8 `json:"status,omitempty"`
// File's name | 文件名称
Name string `json:"name,omitempty"`
// File's type | 文件类型
FileType uint8 `json:"file_type,omitempty"`
// File's size | 文件大小
Size uint64 `json:"size,omitempty"`
// File's path | 文件路径
Path string `json:"path,omitempty"`
// User's UUID | 用户的 UUID
UserID string `json:"user_id,omitempty"`
// The md5 of the file | 文件的 md5
Md5 string `json:"md5,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the FileQuery when eager-loading is set.
Edges FileEdges `json:"edges"`
// contains filtered or unexported fields
}
File Table | 文件表
func (*File) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*File) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*File) QueryTags ¶
func (f *File) QueryTags() *FileTagQuery
QueryTags queries the "tags" edge of the File entity.
func (*File) Unwrap ¶
Unwrap unwraps the File 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 (*File) Update ¶
func (f *File) Update() *FileUpdateOne
Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.
type FileClient ¶
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶
func (c *FileClient) DeleteOneID(id uuid.UUID) *FileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileClient) ExecContext ¶
func (c *FileClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileClient) Intercept ¶
func (c *FileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.
func (*FileClient) Interceptors ¶
func (c *FileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileClient) MapCreateBulk ¶
func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FileClient) Query ¶
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) QueryContext ¶
func (c *FileClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileClient) QueryTags ¶
func (c *FileClient) QueryTags(f *File) *FileTagQuery
QueryTags queries the tags edge of a File.
func (*FileClient) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶
func (c *FileClient) UpdateOneID(id uuid.UUID) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶
func (c *FileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.
type FileCreate ¶
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) AddTagIDs ¶
func (fc *FileCreate) AddTagIDs(ids ...uint64) *FileCreate
AddTagIDs adds the "tags" edge to the FileTag entity by IDs.
func (*FileCreate) AddTags ¶
func (fc *FileCreate) AddTags(f ...*FileTag) *FileCreate
AddTags adds the "tags" edges to the FileTag entity.
func (*FileCreate) Exec ¶
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecContext ¶
func (c *FileCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileCreate) ExecX ¶
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) QueryContext ¶
func (c *FileCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileCreate) Save ¶
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetCreatedAt ¶
func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
SetCreatedAt sets the "created_at" field.
func (*FileCreate) SetFileType ¶
func (fc *FileCreate) SetFileType(u uint8) *FileCreate
SetFileType sets the "file_type" field.
func (*FileCreate) SetID ¶
func (fc *FileCreate) SetID(u uuid.UUID) *FileCreate
SetID sets the "id" field.
func (*FileCreate) SetMd5 ¶
func (fc *FileCreate) SetMd5(s string) *FileCreate
SetMd5 sets the "md5" field.
func (*FileCreate) SetName ¶
func (fc *FileCreate) SetName(s string) *FileCreate
SetName sets the "name" field.
func (*FileCreate) SetNillableCreatedAt ¶
func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileCreate) SetNillableID ¶
func (fc *FileCreate) SetNillableID(u *uuid.UUID) *FileCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*FileCreate) SetNillableStatus ¶
func (fc *FileCreate) SetNillableStatus(u *uint8) *FileCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FileCreate) SetNillableUpdatedAt ¶
func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileCreate) SetNotNilFileType ¶
func (f *FileCreate) SetNotNilFileType(value *uint8) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilMd5 ¶
func (f *FileCreate) SetNotNilMd5(value *string) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilName ¶
func (f *FileCreate) SetNotNilName(value *string) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilPath ¶
func (f *FileCreate) SetNotNilPath(value *string) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilSize ¶
func (f *FileCreate) SetNotNilSize(value *uint64) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilStatus ¶
func (f *FileCreate) SetNotNilStatus(value *uint8) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilUpdatedAt ¶
func (f *FileCreate) SetNotNilUpdatedAt(value *time.Time) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetNotNilUserID ¶
func (f *FileCreate) SetNotNilUserID(value *string) *FileCreate
set field if value's pointer is not nil.
func (*FileCreate) SetPath ¶
func (fc *FileCreate) SetPath(s string) *FileCreate
SetPath sets the "path" field.
func (*FileCreate) SetSize ¶
func (fc *FileCreate) SetSize(u uint64) *FileCreate
SetSize sets the "size" field.
func (*FileCreate) SetStatus ¶
func (fc *FileCreate) SetStatus(u uint8) *FileCreate
SetStatus sets the "status" field.
func (*FileCreate) SetUpdatedAt ¶
func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
SetUpdatedAt sets the "updated_at" field.
func (*FileCreate) SetUserID ¶
func (fc *FileCreate) SetUserID(s string) *FileCreate
SetUserID sets the "user_id" field.
type FileCreateBulk ¶
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecContext ¶
func (c *FileCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileCreateBulk) ExecX ¶
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreateBulk) QueryContext ¶
func (c *FileCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type FileDelete ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecContext ¶
func (c *FileDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileDelete) ExecX ¶
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) QueryContext ¶
func (c *FileDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileDelete) Where ¶
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶
func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileEdges ¶
type FileEdges struct {
// Tags holds the value of the tags edge.
Tags []*FileTag `json:"tags,omitempty"`
// contains filtered or unexported fields
}
FileEdges holds the relations/edges for other nodes in the graph.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶
func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileMutation ¶
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddField ¶
func (m *FileMutation) 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 (*FileMutation) AddFileType ¶
func (m *FileMutation) AddFileType(u int8)
AddFileType adds u to the "file_type" field.
func (*FileMutation) AddSize ¶
func (m *FileMutation) AddSize(u int64)
AddSize adds u to the "size" field.
func (*FileMutation) AddStatus ¶
func (m *FileMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*FileMutation) AddTagIDs ¶
func (m *FileMutation) AddTagIDs(ids ...uint64)
AddTagIDs adds the "tags" edge to the FileTag entity by ids.
func (*FileMutation) AddedEdges ¶
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶
func (m *FileMutation) 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 (*FileMutation) AddedFields ¶
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedFileType ¶
func (m *FileMutation) AddedFileType() (r int8, exists bool)
AddedFileType returns the value that was added to the "file_type" field in this mutation.
func (*FileMutation) AddedIDs ¶
func (m *FileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileMutation) AddedSize ¶
func (m *FileMutation) AddedSize() (r int64, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*FileMutation) AddedStatus ¶
func (m *FileMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*FileMutation) ClearEdge ¶
func (m *FileMutation) 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 (*FileMutation) ClearField ¶
func (m *FileMutation) 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 (*FileMutation) ClearStatus ¶
func (m *FileMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*FileMutation) ClearTags ¶
func (m *FileMutation) ClearTags()
ClearTags clears the "tags" edge to the FileTag entity.
func (*FileMutation) ClearedEdges ¶
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶
func (m FileMutation) 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 (*FileMutation) CreatedAt ¶
func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FileMutation) EdgeCleared ¶
func (m *FileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileMutation) ExecContext ¶
func (c *FileMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileMutation) Field ¶
func (m *FileMutation) 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 (*FileMutation) FieldCleared ¶
func (m *FileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileMutation) Fields ¶
func (m *FileMutation) 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 (*FileMutation) FileType ¶
func (m *FileMutation) FileType() (r uint8, exists bool)
FileType returns the value of the "file_type" field in the mutation.
func (*FileMutation) ID ¶
func (m *FileMutation) 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 (*FileMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FileMutation) Md5 ¶
func (m *FileMutation) Md5() (r string, exists bool)
Md5 returns the value of the "md5" field in the mutation.
func (*FileMutation) Name ¶
func (m *FileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the File entity. If the File 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 (*FileMutation) OldField ¶
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 (*FileMutation) OldFileType ¶
func (m *FileMutation) OldFileType(ctx context.Context) (v uint8, err error)
OldFileType returns the old "file_type" field's value of the File entity. If the File 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 (*FileMutation) OldMd5 ¶
func (m *FileMutation) OldMd5(ctx context.Context) (v string, err error)
OldMd5 returns the old "md5" field's value of the File entity. If the File 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 (*FileMutation) OldName ¶
func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the File entity. If the File 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 (*FileMutation) OldPath ¶
func (m *FileMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the File entity. If the File 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 (*FileMutation) OldSize ¶
func (m *FileMutation) OldSize(ctx context.Context) (v uint64, err error)
OldSize returns the old "size" field's value of the File entity. If the File 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 (*FileMutation) OldStatus ¶
func (m *FileMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the File entity. If the File 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 (*FileMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the File entity. If the File 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 (*FileMutation) OldUserID ¶
func (m *FileMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the File entity. If the File 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 (*FileMutation) Path ¶
func (m *FileMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*FileMutation) QueryContext ¶
func (c *FileMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileMutation) RemoveTagIDs ¶
func (m *FileMutation) RemoveTagIDs(ids ...uint64)
RemoveTagIDs removes the "tags" edge to the FileTag entity by IDs.
func (*FileMutation) RemovedEdges ¶
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedIDs ¶
func (m *FileMutation) 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 (*FileMutation) RemovedTagsIDs ¶
func (m *FileMutation) RemovedTagsIDs() (ids []uint64)
RemovedTags returns the removed IDs of the "tags" edge to the FileTag entity.
func (*FileMutation) ResetCreatedAt ¶
func (m *FileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FileMutation) ResetEdge ¶
func (m *FileMutation) 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 (*FileMutation) ResetField ¶
func (m *FileMutation) 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 (*FileMutation) ResetFileType ¶
func (m *FileMutation) ResetFileType()
ResetFileType resets all changes to the "file_type" field.
func (*FileMutation) ResetMd5 ¶
func (m *FileMutation) ResetMd5()
ResetMd5 resets all changes to the "md5" field.
func (*FileMutation) ResetName ¶
func (m *FileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FileMutation) ResetPath ¶
func (m *FileMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*FileMutation) ResetSize ¶
func (m *FileMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*FileMutation) ResetStatus ¶
func (m *FileMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*FileMutation) ResetTags ¶
func (m *FileMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*FileMutation) ResetUpdatedAt ¶
func (m *FileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FileMutation) ResetUserID ¶
func (m *FileMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*FileMutation) SetCreatedAt ¶
func (m *FileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FileMutation) SetField ¶
func (m *FileMutation) 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 (*FileMutation) SetFileType ¶
func (m *FileMutation) SetFileType(u uint8)
SetFileType sets the "file_type" field.
func (*FileMutation) SetID ¶
func (m *FileMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of File entities.
func (*FileMutation) SetName ¶
func (m *FileMutation) SetName(s string)
SetName sets the "name" field.
func (*FileMutation) SetOp ¶
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FileMutation) SetPath ¶
func (m *FileMutation) SetPath(s string)
SetPath sets the "path" field.
func (*FileMutation) SetSize ¶
func (m *FileMutation) SetSize(u uint64)
SetSize sets the "size" field.
func (*FileMutation) SetStatus ¶
func (m *FileMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*FileMutation) SetUpdatedAt ¶
func (m *FileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FileMutation) SetUserID ¶
func (m *FileMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*FileMutation) Size ¶
func (m *FileMutation) Size() (r uint64, exists bool)
Size returns the value of the "size" field in the mutation.
func (*FileMutation) Status ¶
func (m *FileMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*FileMutation) StatusCleared ¶
func (m *FileMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*FileMutation) TagsCleared ¶
func (m *FileMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the FileTag entity was cleared.
func (*FileMutation) TagsIDs ¶
func (m *FileMutation) TagsIDs() (ids []uint64)
TagsIDs returns the "tags" edge IDs in the mutation.
func (FileMutation) Tx ¶
func (m FileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileMutation) Type ¶
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) UpdatedAt ¶
func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FileMutation) UserID ¶
func (m *FileMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*FileMutation) Where ¶
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
func (*FileMutation) WhereP ¶
func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FilePageList ¶
type FilePageList struct {
List []*File `json:"list"`
PageDetails *PageDetails `json:"pageDetails"`
}
FilePageList is File PageList result.
type FilePager ¶
type FilePager struct {
Order file.OrderOption
Filter func(*FileQuery) (*FileQuery, error)
}
type FilePaginateOption ¶
type FilePaginateOption func(*FilePager)
FilePaginateOption enables pagination customization.
type FileQuery ¶
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Aggregate ¶
func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate returns a FileSelect configured with the given aggregations.
func (*FileQuery) Clone ¶
Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileQuery) ExecContext ¶
func (c *FileQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileQuery) First ¶
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) GroupBy ¶
func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.File.Query().
GroupBy(file.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*FileQuery) Only ¶
Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.
func (*FileQuery) OnlyID ¶
OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.
func (*FileQuery) Order ¶
func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
Order specifies how the records should be ordered.
func (*FileQuery) Page ¶
func (f *FileQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...FilePaginateOption, ) (*FilePageList, error)
func (*FileQuery) QueryContext ¶
func (c *FileQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileQuery) QueryTags ¶
func (fq *FileQuery) QueryTags() *FileTagQuery
QueryTags chains the current query on the "tags" edge.
func (*FileQuery) Select ¶
func (fq *FileQuery) Select(fields ...string) *FileSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.File.Query().
Select(file.FieldCreatedAt).
Scan(ctx, &v)
func (*FileQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*FileQuery) WithTags ¶
func (fq *FileQuery) WithTags(opts ...func(*FileTagQuery)) *FileQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type FileSelect ¶
type FileSelect struct {
*FileQuery
// contains filtered or unexported fields
}
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Aggregate ¶
func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (FileSelect) ExecContext ¶
func (c FileSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (FileSelect) QueryContext ¶
func (c FileSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileSelect) Scan ¶
func (fs *FileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileTag ¶
type FileTag struct {
// ID of the ent.
ID uint64 `json:"id,omitempty"`
// Create Time | 创建日期
CreatedAt time.Time `json:"created_at,omitempty"`
// Update Time | 修改日期
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Status 1: normal 2: ban | 状态 1 正常 2 禁用
Status uint8 `json:"status,omitempty"`
// FileTag's name | 标签名称
Name string `json:"name,omitempty"`
// The remark of tag | 标签的备注
Remark string `json:"remark,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the FileTagQuery when eager-loading is set.
Edges FileTagEdges `json:"edges"`
// contains filtered or unexported fields
}
File's Tags Table | 文件标签表
func (*FileTag) ExecContext ¶
func (c *FileTag) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTag) QueryContext ¶
func (c *FileTag) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTag) QueryFiles ¶
QueryFiles queries the "files" edge of the FileTag entity.
func (*FileTag) Unwrap ¶
Unwrap unwraps the FileTag 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 (*FileTag) Update ¶
func (ft *FileTag) Update() *FileTagUpdateOne
Update returns a builder for updating this FileTag. Note that you need to call FileTag.Unwrap() before calling this method if this FileTag was returned from a transaction, and the transaction was committed or rolled back.
type FileTagClient ¶
type FileTagClient struct {
// contains filtered or unexported fields
}
FileTagClient is a client for the FileTag schema.
func NewFileTagClient ¶
func NewFileTagClient(c config) *FileTagClient
NewFileTagClient returns a client for the FileTag from the given config.
func (*FileTagClient) Create ¶
func (c *FileTagClient) Create() *FileTagCreate
Create returns a builder for creating a FileTag entity.
func (*FileTagClient) CreateBulk ¶
func (c *FileTagClient) CreateBulk(builders ...*FileTagCreate) *FileTagCreateBulk
CreateBulk returns a builder for creating a bulk of FileTag entities.
func (*FileTagClient) Delete ¶
func (c *FileTagClient) Delete() *FileTagDelete
Delete returns a delete builder for FileTag.
func (*FileTagClient) DeleteOne ¶
func (c *FileTagClient) DeleteOne(ft *FileTag) *FileTagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileTagClient) DeleteOneID ¶
func (c *FileTagClient) DeleteOneID(id uint64) *FileTagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileTagClient) ExecContext ¶
func (c *FileTagClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagClient) GetX ¶
func (c *FileTagClient) GetX(ctx context.Context, id uint64) *FileTag
GetX is like Get, but panics if an error occurs.
func (*FileTagClient) Hooks ¶
func (c *FileTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FileTagClient) Intercept ¶
func (c *FileTagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `filetag.Intercept(f(g(h())))`.
func (*FileTagClient) Interceptors ¶
func (c *FileTagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileTagClient) MapCreateBulk ¶
func (c *FileTagClient) MapCreateBulk(slice any, setFunc func(*FileTagCreate, int)) *FileTagCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FileTagClient) Query ¶
func (c *FileTagClient) Query() *FileTagQuery
Query returns a query builder for FileTag.
func (*FileTagClient) QueryContext ¶
func (c *FileTagClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagClient) QueryFiles ¶
func (c *FileTagClient) QueryFiles(ft *FileTag) *FileQuery
QueryFiles queries the files edge of a FileTag.
func (*FileTagClient) Update ¶
func (c *FileTagClient) Update() *FileTagUpdate
Update returns an update builder for FileTag.
func (*FileTagClient) UpdateOne ¶
func (c *FileTagClient) UpdateOne(ft *FileTag) *FileTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileTagClient) UpdateOneID ¶
func (c *FileTagClient) UpdateOneID(id uint64) *FileTagUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileTagClient) Use ¶
func (c *FileTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `filetag.Hooks(f(g(h())))`.
type FileTagCreate ¶
type FileTagCreate struct {
// contains filtered or unexported fields
}
FileTagCreate is the builder for creating a FileTag entity.
func (*FileTagCreate) AddFileIDs ¶
func (ftc *FileTagCreate) AddFileIDs(ids ...uuid.UUID) *FileTagCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*FileTagCreate) AddFiles ¶
func (ftc *FileTagCreate) AddFiles(f ...*File) *FileTagCreate
AddFiles adds the "files" edges to the File entity.
func (*FileTagCreate) Exec ¶
func (ftc *FileTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileTagCreate) ExecContext ¶
func (c *FileTagCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagCreate) ExecX ¶
func (ftc *FileTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileTagCreate) Mutation ¶
func (ftc *FileTagCreate) Mutation() *FileTagMutation
Mutation returns the FileTagMutation object of the builder.
func (*FileTagCreate) QueryContext ¶
func (c *FileTagCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagCreate) Save ¶
func (ftc *FileTagCreate) Save(ctx context.Context) (*FileTag, error)
Save creates the FileTag in the database.
func (*FileTagCreate) SaveX ¶
func (ftc *FileTagCreate) SaveX(ctx context.Context) *FileTag
SaveX calls Save and panics if Save returns an error.
func (*FileTagCreate) SetCreatedAt ¶
func (ftc *FileTagCreate) SetCreatedAt(t time.Time) *FileTagCreate
SetCreatedAt sets the "created_at" field.
func (*FileTagCreate) SetID ¶
func (ftc *FileTagCreate) SetID(u uint64) *FileTagCreate
SetID sets the "id" field.
func (*FileTagCreate) SetName ¶
func (ftc *FileTagCreate) SetName(s string) *FileTagCreate
SetName sets the "name" field.
func (*FileTagCreate) SetNillableCreatedAt ¶
func (ftc *FileTagCreate) SetNillableCreatedAt(t *time.Time) *FileTagCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileTagCreate) SetNillableRemark ¶
func (ftc *FileTagCreate) SetNillableRemark(s *string) *FileTagCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*FileTagCreate) SetNillableStatus ¶
func (ftc *FileTagCreate) SetNillableStatus(u *uint8) *FileTagCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FileTagCreate) SetNillableUpdatedAt ¶
func (ftc *FileTagCreate) SetNillableUpdatedAt(t *time.Time) *FileTagCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileTagCreate) SetNotNilName ¶
func (ft *FileTagCreate) SetNotNilName(value *string) *FileTagCreate
set field if value's pointer is not nil.
func (*FileTagCreate) SetNotNilRemark ¶
func (ft *FileTagCreate) SetNotNilRemark(value *string) *FileTagCreate
set field if value's pointer is not nil.
func (*FileTagCreate) SetNotNilStatus ¶
func (ft *FileTagCreate) SetNotNilStatus(value *uint8) *FileTagCreate
set field if value's pointer is not nil.
func (*FileTagCreate) SetNotNilUpdatedAt ¶
func (ft *FileTagCreate) SetNotNilUpdatedAt(value *time.Time) *FileTagCreate
set field if value's pointer is not nil.
func (*FileTagCreate) SetRemark ¶
func (ftc *FileTagCreate) SetRemark(s string) *FileTagCreate
SetRemark sets the "remark" field.
func (*FileTagCreate) SetStatus ¶
func (ftc *FileTagCreate) SetStatus(u uint8) *FileTagCreate
SetStatus sets the "status" field.
func (*FileTagCreate) SetUpdatedAt ¶
func (ftc *FileTagCreate) SetUpdatedAt(t time.Time) *FileTagCreate
SetUpdatedAt sets the "updated_at" field.
type FileTagCreateBulk ¶
type FileTagCreateBulk struct {
// contains filtered or unexported fields
}
FileTagCreateBulk is the builder for creating many FileTag entities in bulk.
func (*FileTagCreateBulk) Exec ¶
func (ftcb *FileTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileTagCreateBulk) ExecContext ¶
func (c *FileTagCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagCreateBulk) ExecX ¶
func (ftcb *FileTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileTagCreateBulk) QueryContext ¶
func (c *FileTagCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type FileTagDelete ¶
type FileTagDelete struct {
// contains filtered or unexported fields
}
FileTagDelete is the builder for deleting a FileTag entity.
func (*FileTagDelete) Exec ¶
func (ftd *FileTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileTagDelete) ExecContext ¶
func (c *FileTagDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagDelete) ExecX ¶
func (ftd *FileTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileTagDelete) QueryContext ¶
func (c *FileTagDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagDelete) Where ¶
func (ftd *FileTagDelete) Where(ps ...predicate.FileTag) *FileTagDelete
Where appends a list predicates to the FileTagDelete builder.
type FileTagDeleteOne ¶
type FileTagDeleteOne struct {
// contains filtered or unexported fields
}
FileTagDeleteOne is the builder for deleting a single FileTag entity.
func (*FileTagDeleteOne) Exec ¶
func (ftdo *FileTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileTagDeleteOne) ExecX ¶
func (ftdo *FileTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileTagDeleteOne) Where ¶
func (ftdo *FileTagDeleteOne) Where(ps ...predicate.FileTag) *FileTagDeleteOne
Where appends a list predicates to the FileTagDelete builder.
type FileTagEdges ¶
type FileTagEdges struct {
// Files holds the value of the files edge.
Files []*File `json:"files,omitempty"`
// contains filtered or unexported fields
}
FileTagEdges holds the relations/edges for other nodes in the graph.
func (FileTagEdges) FilesOrErr ¶
func (e FileTagEdges) FilesOrErr() ([]*File, error)
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
type FileTagGroupBy ¶
type FileTagGroupBy struct {
// contains filtered or unexported fields
}
FileTagGroupBy is the group-by builder for FileTag entities.
func (*FileTagGroupBy) Aggregate ¶
func (ftgb *FileTagGroupBy) Aggregate(fns ...AggregateFunc) *FileTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileTagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileTagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileTagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileTagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileTagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileTagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileTagGroupBy) Scan ¶
func (ftgb *FileTagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileTagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileTagMutation ¶
type FileTagMutation struct {
// contains filtered or unexported fields
}
FileTagMutation represents an operation that mutates the FileTag nodes in the graph.
func (*FileTagMutation) AddField ¶
func (m *FileTagMutation) 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 (*FileTagMutation) AddFileIDs ¶
func (m *FileTagMutation) AddFileIDs(ids ...uuid.UUID)
AddFileIDs adds the "files" edge to the File entity by ids.
func (*FileTagMutation) AddStatus ¶
func (m *FileTagMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*FileTagMutation) AddedEdges ¶
func (m *FileTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileTagMutation) AddedField ¶
func (m *FileTagMutation) 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 (*FileTagMutation) AddedFields ¶
func (m *FileTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileTagMutation) AddedIDs ¶
func (m *FileTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileTagMutation) AddedStatus ¶
func (m *FileTagMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*FileTagMutation) ClearEdge ¶
func (m *FileTagMutation) 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 (*FileTagMutation) ClearField ¶
func (m *FileTagMutation) 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 (*FileTagMutation) ClearFiles ¶
func (m *FileTagMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*FileTagMutation) ClearRemark ¶
func (m *FileTagMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*FileTagMutation) ClearStatus ¶
func (m *FileTagMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*FileTagMutation) ClearedEdges ¶
func (m *FileTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileTagMutation) ClearedFields ¶
func (m *FileTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileTagMutation) Client ¶
func (m FileTagMutation) 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 (*FileTagMutation) CreatedAt ¶
func (m *FileTagMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FileTagMutation) EdgeCleared ¶
func (m *FileTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileTagMutation) ExecContext ¶
func (c *FileTagMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagMutation) Field ¶
func (m *FileTagMutation) 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 (*FileTagMutation) FieldCleared ¶
func (m *FileTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileTagMutation) Fields ¶
func (m *FileTagMutation) 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 (*FileTagMutation) FilesCleared ¶
func (m *FileTagMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*FileTagMutation) FilesIDs ¶
func (m *FileTagMutation) FilesIDs() (ids []uuid.UUID)
FilesIDs returns the "files" edge IDs in the mutation.
func (*FileTagMutation) ID ¶
func (m *FileTagMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FileTagMutation) IDs ¶
func (m *FileTagMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FileTagMutation) Name ¶
func (m *FileTagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FileTagMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the FileTag entity. If the FileTag 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 (*FileTagMutation) OldField ¶
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 (*FileTagMutation) OldName ¶
func (m *FileTagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the FileTag entity. If the FileTag 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 (*FileTagMutation) OldRemark ¶
func (m *FileTagMutation) OldRemark(ctx context.Context) (v string, err error)
OldRemark returns the old "remark" field's value of the FileTag entity. If the FileTag 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 (*FileTagMutation) OldStatus ¶
func (m *FileTagMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the FileTag entity. If the FileTag 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 (*FileTagMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the FileTag entity. If the FileTag 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 (*FileTagMutation) QueryContext ¶
func (c *FileTagMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagMutation) Remark ¶
func (m *FileTagMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*FileTagMutation) RemarkCleared ¶
func (m *FileTagMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*FileTagMutation) RemoveFileIDs ¶
func (m *FileTagMutation) RemoveFileIDs(ids ...uuid.UUID)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*FileTagMutation) RemovedEdges ¶
func (m *FileTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileTagMutation) RemovedFilesIDs ¶
func (m *FileTagMutation) RemovedFilesIDs() (ids []uuid.UUID)
RemovedFiles returns the removed IDs of the "files" edge to the File entity.
func (*FileTagMutation) RemovedIDs ¶
func (m *FileTagMutation) 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 (*FileTagMutation) ResetCreatedAt ¶
func (m *FileTagMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FileTagMutation) ResetEdge ¶
func (m *FileTagMutation) 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 (*FileTagMutation) ResetField ¶
func (m *FileTagMutation) 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 (*FileTagMutation) ResetFiles ¶
func (m *FileTagMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*FileTagMutation) ResetName ¶
func (m *FileTagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FileTagMutation) ResetRemark ¶
func (m *FileTagMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*FileTagMutation) ResetStatus ¶
func (m *FileTagMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*FileTagMutation) ResetUpdatedAt ¶
func (m *FileTagMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FileTagMutation) SetCreatedAt ¶
func (m *FileTagMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FileTagMutation) SetField ¶
func (m *FileTagMutation) 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 (*FileTagMutation) SetID ¶
func (m *FileTagMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of FileTag entities.
func (*FileTagMutation) SetName ¶
func (m *FileTagMutation) SetName(s string)
SetName sets the "name" field.
func (*FileTagMutation) SetOp ¶
func (m *FileTagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FileTagMutation) SetRemark ¶
func (m *FileTagMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*FileTagMutation) SetStatus ¶
func (m *FileTagMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*FileTagMutation) SetUpdatedAt ¶
func (m *FileTagMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FileTagMutation) Status ¶
func (m *FileTagMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*FileTagMutation) StatusCleared ¶
func (m *FileTagMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (FileTagMutation) Tx ¶
func (m FileTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileTagMutation) Type ¶
func (m *FileTagMutation) Type() string
Type returns the node type of this mutation (FileTag).
func (*FileTagMutation) UpdatedAt ¶
func (m *FileTagMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FileTagMutation) Where ¶
func (m *FileTagMutation) Where(ps ...predicate.FileTag)
Where appends a list predicates to the FileTagMutation builder.
func (*FileTagMutation) WhereP ¶
func (m *FileTagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FileTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FileTagPageList ¶
type FileTagPageList struct {
List []*FileTag `json:"list"`
PageDetails *PageDetails `json:"pageDetails"`
}
FileTagPageList is FileTag PageList result.
type FileTagPager ¶
type FileTagPager struct {
Order filetag.OrderOption
Filter func(*FileTagQuery) (*FileTagQuery, error)
}
func (*FileTagPager) ApplyFilter ¶
func (p *FileTagPager) ApplyFilter(query *FileTagQuery) (*FileTagQuery, error)
type FileTagPaginateOption ¶
type FileTagPaginateOption func(*FileTagPager)
FileTagPaginateOption enables pagination customization.
type FileTagQuery ¶
type FileTagQuery struct {
// contains filtered or unexported fields
}
FileTagQuery is the builder for querying FileTag entities.
func (*FileTagQuery) Aggregate ¶
func (ftq *FileTagQuery) Aggregate(fns ...AggregateFunc) *FileTagSelect
Aggregate returns a FileTagSelect configured with the given aggregations.
func (*FileTagQuery) All ¶
func (ftq *FileTagQuery) All(ctx context.Context) ([]*FileTag, error)
All executes the query and returns a list of FileTags.
func (*FileTagQuery) AllX ¶
func (ftq *FileTagQuery) AllX(ctx context.Context) []*FileTag
AllX is like All, but panics if an error occurs.
func (*FileTagQuery) Clone ¶
func (ftq *FileTagQuery) Clone() *FileTagQuery
Clone returns a duplicate of the FileTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileTagQuery) Count ¶
func (ftq *FileTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FileTagQuery) CountX ¶
func (ftq *FileTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FileTagQuery) ExecContext ¶
func (c *FileTagQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagQuery) Exist ¶
func (ftq *FileTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FileTagQuery) ExistX ¶
func (ftq *FileTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FileTagQuery) First ¶
func (ftq *FileTagQuery) First(ctx context.Context) (*FileTag, error)
First returns the first FileTag entity from the query. Returns a *NotFoundError when no FileTag was found.
func (*FileTagQuery) FirstID ¶
func (ftq *FileTagQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first FileTag ID from the query. Returns a *NotFoundError when no FileTag ID was found.
func (*FileTagQuery) FirstIDX ¶
func (ftq *FileTagQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*FileTagQuery) FirstX ¶
func (ftq *FileTagQuery) FirstX(ctx context.Context) *FileTag
FirstX is like First, but panics if an error occurs.
func (*FileTagQuery) GroupBy ¶
func (ftq *FileTagQuery) GroupBy(field string, fields ...string) *FileTagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.FileTag.Query().
GroupBy(filetag.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*FileTagQuery) IDs ¶
func (ftq *FileTagQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of FileTag IDs.
func (*FileTagQuery) IDsX ¶
func (ftq *FileTagQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*FileTagQuery) Limit ¶
func (ftq *FileTagQuery) Limit(limit int) *FileTagQuery
Limit the number of records to be returned by this query.
func (*FileTagQuery) Offset ¶
func (ftq *FileTagQuery) Offset(offset int) *FileTagQuery
Offset to start from.
func (*FileTagQuery) Only ¶
func (ftq *FileTagQuery) Only(ctx context.Context) (*FileTag, error)
Only returns a single FileTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one FileTag entity is found. Returns a *NotFoundError when no FileTag entities are found.
func (*FileTagQuery) OnlyID ¶
func (ftq *FileTagQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only FileTag ID in the query. Returns a *NotSingularError when more than one FileTag ID is found. Returns a *NotFoundError when no entities are found.
func (*FileTagQuery) OnlyIDX ¶
func (ftq *FileTagQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FileTagQuery) OnlyX ¶
func (ftq *FileTagQuery) OnlyX(ctx context.Context) *FileTag
OnlyX is like Only, but panics if an error occurs.
func (*FileTagQuery) Order ¶
func (ftq *FileTagQuery) Order(o ...filetag.OrderOption) *FileTagQuery
Order specifies how the records should be ordered.
func (*FileTagQuery) Page ¶
func (ft *FileTagQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...FileTagPaginateOption, ) (*FileTagPageList, error)
func (*FileTagQuery) QueryContext ¶
func (c *FileTagQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagQuery) QueryFiles ¶
func (ftq *FileTagQuery) QueryFiles() *FileQuery
QueryFiles chains the current query on the "files" edge.
func (*FileTagQuery) Select ¶
func (ftq *FileTagQuery) Select(fields ...string) *FileTagSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.FileTag.Query().
Select(filetag.FieldCreatedAt).
Scan(ctx, &v)
func (*FileTagQuery) Unique ¶
func (ftq *FileTagQuery) Unique(unique bool) *FileTagQuery
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 (*FileTagQuery) Where ¶
func (ftq *FileTagQuery) Where(ps ...predicate.FileTag) *FileTagQuery
Where adds a new predicate for the FileTagQuery builder.
func (*FileTagQuery) WithFiles ¶
func (ftq *FileTagQuery) WithFiles(opts ...func(*FileQuery)) *FileTagQuery
WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.
type FileTagSelect ¶
type FileTagSelect struct {
*FileTagQuery
// contains filtered or unexported fields
}
FileTagSelect is the builder for selecting fields of FileTag entities.
func (*FileTagSelect) Aggregate ¶
func (fts *FileTagSelect) Aggregate(fns ...AggregateFunc) *FileTagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileTagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileTagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (FileTagSelect) ExecContext ¶
func (c FileTagSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileTagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileTagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileTagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (FileTagSelect) QueryContext ¶
func (c FileTagSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagSelect) Scan ¶
func (fts *FileTagSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileTagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileTagUpdate ¶
type FileTagUpdate struct {
// contains filtered or unexported fields
}
FileTagUpdate is the builder for updating FileTag entities.
func (*FileTagUpdate) AddFileIDs ¶
func (ftu *FileTagUpdate) AddFileIDs(ids ...uuid.UUID) *FileTagUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*FileTagUpdate) AddFiles ¶
func (ftu *FileTagUpdate) AddFiles(f ...*File) *FileTagUpdate
AddFiles adds the "files" edges to the File entity.
func (*FileTagUpdate) AddStatus ¶
func (ftu *FileTagUpdate) AddStatus(u int8) *FileTagUpdate
AddStatus adds u to the "status" field.
func (*FileTagUpdate) ClearFiles ¶
func (ftu *FileTagUpdate) ClearFiles() *FileTagUpdate
ClearFiles clears all "files" edges to the File entity.
func (*FileTagUpdate) ClearRemark ¶
func (ftu *FileTagUpdate) ClearRemark() *FileTagUpdate
ClearRemark clears the value of the "remark" field.
func (*FileTagUpdate) ClearStatus ¶
func (ftu *FileTagUpdate) ClearStatus() *FileTagUpdate
ClearStatus clears the value of the "status" field.
func (*FileTagUpdate) Exec ¶
func (ftu *FileTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileTagUpdate) ExecContext ¶
func (c *FileTagUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagUpdate) ExecX ¶
func (ftu *FileTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileTagUpdate) Mutation ¶
func (ftu *FileTagUpdate) Mutation() *FileTagMutation
Mutation returns the FileTagMutation object of the builder.
func (*FileTagUpdate) QueryContext ¶
func (c *FileTagUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagUpdate) RemoveFileIDs ¶
func (ftu *FileTagUpdate) RemoveFileIDs(ids ...uuid.UUID) *FileTagUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*FileTagUpdate) RemoveFiles ¶
func (ftu *FileTagUpdate) RemoveFiles(f ...*File) *FileTagUpdate
RemoveFiles removes "files" edges to File entities.
func (*FileTagUpdate) Save ¶
func (ftu *FileTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileTagUpdate) SaveX ¶
func (ftu *FileTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileTagUpdate) SetName ¶
func (ftu *FileTagUpdate) SetName(s string) *FileTagUpdate
SetName sets the "name" field.
func (*FileTagUpdate) SetNillableName ¶
func (ftu *FileTagUpdate) SetNillableName(s *string) *FileTagUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*FileTagUpdate) SetNillableRemark ¶
func (ftu *FileTagUpdate) SetNillableRemark(s *string) *FileTagUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*FileTagUpdate) SetNillableStatus ¶
func (ftu *FileTagUpdate) SetNillableStatus(u *uint8) *FileTagUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FileTagUpdate) SetNotNilName ¶
func (ft *FileTagUpdate) SetNotNilName(value *string) *FileTagUpdate
set field if value's pointer is not nil.
func (*FileTagUpdate) SetNotNilRemark ¶
func (ft *FileTagUpdate) SetNotNilRemark(value *string) *FileTagUpdate
set field if value's pointer is not nil.
func (*FileTagUpdate) SetNotNilStatus ¶
func (ft *FileTagUpdate) SetNotNilStatus(value *uint8) *FileTagUpdate
set field if value's pointer is not nil.
func (*FileTagUpdate) SetNotNilUpdatedAt ¶
func (ft *FileTagUpdate) SetNotNilUpdatedAt(value *time.Time) *FileTagUpdate
set field if value's pointer is not nil.
func (*FileTagUpdate) SetRemark ¶
func (ftu *FileTagUpdate) SetRemark(s string) *FileTagUpdate
SetRemark sets the "remark" field.
func (*FileTagUpdate) SetStatus ¶
func (ftu *FileTagUpdate) SetStatus(u uint8) *FileTagUpdate
SetStatus sets the "status" field.
func (*FileTagUpdate) SetUpdatedAt ¶
func (ftu *FileTagUpdate) SetUpdatedAt(t time.Time) *FileTagUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FileTagUpdate) Where ¶
func (ftu *FileTagUpdate) Where(ps ...predicate.FileTag) *FileTagUpdate
Where appends a list predicates to the FileTagUpdate builder.
type FileTagUpdateOne ¶
type FileTagUpdateOne struct {
// contains filtered or unexported fields
}
FileTagUpdateOne is the builder for updating a single FileTag entity.
func (*FileTagUpdateOne) AddFileIDs ¶
func (ftuo *FileTagUpdateOne) AddFileIDs(ids ...uuid.UUID) *FileTagUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*FileTagUpdateOne) AddFiles ¶
func (ftuo *FileTagUpdateOne) AddFiles(f ...*File) *FileTagUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*FileTagUpdateOne) AddStatus ¶
func (ftuo *FileTagUpdateOne) AddStatus(u int8) *FileTagUpdateOne
AddStatus adds u to the "status" field.
func (*FileTagUpdateOne) ClearFiles ¶
func (ftuo *FileTagUpdateOne) ClearFiles() *FileTagUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*FileTagUpdateOne) ClearRemark ¶
func (ftuo *FileTagUpdateOne) ClearRemark() *FileTagUpdateOne
ClearRemark clears the value of the "remark" field.
func (*FileTagUpdateOne) ClearStatus ¶
func (ftuo *FileTagUpdateOne) ClearStatus() *FileTagUpdateOne
ClearStatus clears the value of the "status" field.
func (*FileTagUpdateOne) Exec ¶
func (ftuo *FileTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileTagUpdateOne) ExecContext ¶
func (c *FileTagUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileTagUpdateOne) ExecX ¶
func (ftuo *FileTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileTagUpdateOne) Mutation ¶
func (ftuo *FileTagUpdateOne) Mutation() *FileTagMutation
Mutation returns the FileTagMutation object of the builder.
func (*FileTagUpdateOne) QueryContext ¶
func (c *FileTagUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileTagUpdateOne) RemoveFileIDs ¶
func (ftuo *FileTagUpdateOne) RemoveFileIDs(ids ...uuid.UUID) *FileTagUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*FileTagUpdateOne) RemoveFiles ¶
func (ftuo *FileTagUpdateOne) RemoveFiles(f ...*File) *FileTagUpdateOne
RemoveFiles removes "files" edges to File entities.
func (*FileTagUpdateOne) Save ¶
func (ftuo *FileTagUpdateOne) Save(ctx context.Context) (*FileTag, error)
Save executes the query and returns the updated FileTag entity.
func (*FileTagUpdateOne) SaveX ¶
func (ftuo *FileTagUpdateOne) SaveX(ctx context.Context) *FileTag
SaveX is like Save, but panics if an error occurs.
func (*FileTagUpdateOne) Select ¶
func (ftuo *FileTagUpdateOne) Select(field string, fields ...string) *FileTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileTagUpdateOne) SetName ¶
func (ftuo *FileTagUpdateOne) SetName(s string) *FileTagUpdateOne
SetName sets the "name" field.
func (*FileTagUpdateOne) SetNillableName ¶
func (ftuo *FileTagUpdateOne) SetNillableName(s *string) *FileTagUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*FileTagUpdateOne) SetNillableRemark ¶
func (ftuo *FileTagUpdateOne) SetNillableRemark(s *string) *FileTagUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*FileTagUpdateOne) SetNillableStatus ¶
func (ftuo *FileTagUpdateOne) SetNillableStatus(u *uint8) *FileTagUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FileTagUpdateOne) SetNotNilName ¶
func (ft *FileTagUpdateOne) SetNotNilName(value *string) *FileTagUpdateOne
set field if value's pointer is not nil.
func (*FileTagUpdateOne) SetNotNilRemark ¶
func (ft *FileTagUpdateOne) SetNotNilRemark(value *string) *FileTagUpdateOne
set field if value's pointer is not nil.
func (*FileTagUpdateOne) SetNotNilStatus ¶
func (ft *FileTagUpdateOne) SetNotNilStatus(value *uint8) *FileTagUpdateOne
set field if value's pointer is not nil.
func (*FileTagUpdateOne) SetNotNilUpdatedAt ¶
func (ft *FileTagUpdateOne) SetNotNilUpdatedAt(value *time.Time) *FileTagUpdateOne
set field if value's pointer is not nil.
func (*FileTagUpdateOne) SetRemark ¶
func (ftuo *FileTagUpdateOne) SetRemark(s string) *FileTagUpdateOne
SetRemark sets the "remark" field.
func (*FileTagUpdateOne) SetStatus ¶
func (ftuo *FileTagUpdateOne) SetStatus(u uint8) *FileTagUpdateOne
SetStatus sets the "status" field.
func (*FileTagUpdateOne) SetUpdatedAt ¶
func (ftuo *FileTagUpdateOne) SetUpdatedAt(t time.Time) *FileTagUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FileTagUpdateOne) Where ¶
func (ftuo *FileTagUpdateOne) Where(ps ...predicate.FileTag) *FileTagUpdateOne
Where appends a list predicates to the FileTagUpdate builder.
type FileUpdate ¶
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddFileType ¶
func (fu *FileUpdate) AddFileType(u int8) *FileUpdate
AddFileType adds u to the "file_type" field.
func (*FileUpdate) AddSize ¶
func (fu *FileUpdate) AddSize(u int64) *FileUpdate
AddSize adds u to the "size" field.
func (*FileUpdate) AddStatus ¶
func (fu *FileUpdate) AddStatus(u int8) *FileUpdate
AddStatus adds u to the "status" field.
func (*FileUpdate) AddTagIDs ¶
func (fu *FileUpdate) AddTagIDs(ids ...uint64) *FileUpdate
AddTagIDs adds the "tags" edge to the FileTag entity by IDs.
func (*FileUpdate) AddTags ¶
func (fu *FileUpdate) AddTags(f ...*FileTag) *FileUpdate
AddTags adds the "tags" edges to the FileTag entity.
func (*FileUpdate) ClearStatus ¶
func (fu *FileUpdate) ClearStatus() *FileUpdate
ClearStatus clears the value of the "status" field.
func (*FileUpdate) ClearTags ¶
func (fu *FileUpdate) ClearTags() *FileUpdate
ClearTags clears all "tags" edges to the FileTag entity.
func (*FileUpdate) Exec ¶
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecContext ¶
func (c *FileUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileUpdate) ExecX ¶
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) QueryContext ¶
func (c *FileUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileUpdate) RemoveTagIDs ¶
func (fu *FileUpdate) RemoveTagIDs(ids ...uint64) *FileUpdate
RemoveTagIDs removes the "tags" edge to FileTag entities by IDs.
func (*FileUpdate) RemoveTags ¶
func (fu *FileUpdate) RemoveTags(f ...*FileTag) *FileUpdate
RemoveTags removes "tags" edges to FileTag entities.
func (*FileUpdate) Save ¶
func (fu *FileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileUpdate) SaveX ¶
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetFileType ¶
func (fu *FileUpdate) SetFileType(u uint8) *FileUpdate
SetFileType sets the "file_type" field.
func (*FileUpdate) SetMd5 ¶
func (fu *FileUpdate) SetMd5(s string) *FileUpdate
SetMd5 sets the "md5" field.
func (*FileUpdate) SetName ¶
func (fu *FileUpdate) SetName(s string) *FileUpdate
SetName sets the "name" field.
func (*FileUpdate) SetNillableFileType ¶
func (fu *FileUpdate) SetNillableFileType(u *uint8) *FileUpdate
SetNillableFileType sets the "file_type" field if the given value is not nil.
func (*FileUpdate) SetNillableMd5 ¶
func (fu *FileUpdate) SetNillableMd5(s *string) *FileUpdate
SetNillableMd5 sets the "md5" field if the given value is not nil.
func (*FileUpdate) SetNillableName ¶
func (fu *FileUpdate) SetNillableName(s *string) *FileUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*FileUpdate) SetNillablePath ¶
func (fu *FileUpdate) SetNillablePath(s *string) *FileUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*FileUpdate) SetNillableSize ¶
func (fu *FileUpdate) SetNillableSize(u *uint64) *FileUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdate) SetNillableStatus ¶
func (fu *FileUpdate) SetNillableStatus(u *uint8) *FileUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FileUpdate) SetNillableUserID ¶
func (fu *FileUpdate) SetNillableUserID(s *string) *FileUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*FileUpdate) SetNotNilFileType ¶
func (f *FileUpdate) SetNotNilFileType(value *uint8) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilMd5 ¶
func (f *FileUpdate) SetNotNilMd5(value *string) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilName ¶
func (f *FileUpdate) SetNotNilName(value *string) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilPath ¶
func (f *FileUpdate) SetNotNilPath(value *string) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilSize ¶
func (f *FileUpdate) SetNotNilSize(value *uint64) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilStatus ¶
func (f *FileUpdate) SetNotNilStatus(value *uint8) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilUpdatedAt ¶
func (f *FileUpdate) SetNotNilUpdatedAt(value *time.Time) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetNotNilUserID ¶
func (f *FileUpdate) SetNotNilUserID(value *string) *FileUpdate
set field if value's pointer is not nil.
func (*FileUpdate) SetPath ¶
func (fu *FileUpdate) SetPath(s string) *FileUpdate
SetPath sets the "path" field.
func (*FileUpdate) SetSize ¶
func (fu *FileUpdate) SetSize(u uint64) *FileUpdate
SetSize sets the "size" field.
func (*FileUpdate) SetStatus ¶
func (fu *FileUpdate) SetStatus(u uint8) *FileUpdate
SetStatus sets the "status" field.
func (*FileUpdate) SetUpdatedAt ¶
func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdate) SetUserID ¶
func (fu *FileUpdate) SetUserID(s string) *FileUpdate
SetUserID sets the "user_id" field.
func (*FileUpdate) Where ¶
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddFileType ¶
func (fuo *FileUpdateOne) AddFileType(u int8) *FileUpdateOne
AddFileType adds u to the "file_type" field.
func (*FileUpdateOne) AddSize ¶
func (fuo *FileUpdateOne) AddSize(u int64) *FileUpdateOne
AddSize adds u to the "size" field.
func (*FileUpdateOne) AddStatus ¶
func (fuo *FileUpdateOne) AddStatus(u int8) *FileUpdateOne
AddStatus adds u to the "status" field.
func (*FileUpdateOne) AddTagIDs ¶
func (fuo *FileUpdateOne) AddTagIDs(ids ...uint64) *FileUpdateOne
AddTagIDs adds the "tags" edge to the FileTag entity by IDs.
func (*FileUpdateOne) AddTags ¶
func (fuo *FileUpdateOne) AddTags(f ...*FileTag) *FileUpdateOne
AddTags adds the "tags" edges to the FileTag entity.
func (*FileUpdateOne) ClearStatus ¶
func (fuo *FileUpdateOne) ClearStatus() *FileUpdateOne
ClearStatus clears the value of the "status" field.
func (*FileUpdateOne) ClearTags ¶
func (fuo *FileUpdateOne) ClearTags() *FileUpdateOne
ClearTags clears all "tags" edges to the FileTag entity.
func (*FileUpdateOne) Exec ¶
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecContext ¶
func (c *FileUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*FileUpdateOne) ExecX ¶
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) QueryContext ¶
func (c *FileUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*FileUpdateOne) RemoveTagIDs ¶
func (fuo *FileUpdateOne) RemoveTagIDs(ids ...uint64) *FileUpdateOne
RemoveTagIDs removes the "tags" edge to FileTag entities by IDs.
func (*FileUpdateOne) RemoveTags ¶
func (fuo *FileUpdateOne) RemoveTags(f ...*FileTag) *FileUpdateOne
RemoveTags removes "tags" edges to FileTag entities.
func (*FileUpdateOne) Save ¶
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileUpdateOne) SetFileType ¶
func (fuo *FileUpdateOne) SetFileType(u uint8) *FileUpdateOne
SetFileType sets the "file_type" field.
func (*FileUpdateOne) SetMd5 ¶
func (fuo *FileUpdateOne) SetMd5(s string) *FileUpdateOne
SetMd5 sets the "md5" field.
func (*FileUpdateOne) SetName ¶
func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
SetName sets the "name" field.
func (*FileUpdateOne) SetNillableFileType ¶
func (fuo *FileUpdateOne) SetNillableFileType(u *uint8) *FileUpdateOne
SetNillableFileType sets the "file_type" field if the given value is not nil.
func (*FileUpdateOne) SetNillableMd5 ¶
func (fuo *FileUpdateOne) SetNillableMd5(s *string) *FileUpdateOne
SetNillableMd5 sets the "md5" field if the given value is not nil.
func (*FileUpdateOne) SetNillableName ¶
func (fuo *FileUpdateOne) SetNillableName(s *string) *FileUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*FileUpdateOne) SetNillablePath ¶
func (fuo *FileUpdateOne) SetNillablePath(s *string) *FileUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*FileUpdateOne) SetNillableSize ¶
func (fuo *FileUpdateOne) SetNillableSize(u *uint64) *FileUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdateOne) SetNillableStatus ¶
func (fuo *FileUpdateOne) SetNillableStatus(u *uint8) *FileUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*FileUpdateOne) SetNillableUserID ¶
func (fuo *FileUpdateOne) SetNillableUserID(s *string) *FileUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*FileUpdateOne) SetNotNilFileType ¶
func (f *FileUpdateOne) SetNotNilFileType(value *uint8) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilMd5 ¶
func (f *FileUpdateOne) SetNotNilMd5(value *string) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilName ¶
func (f *FileUpdateOne) SetNotNilName(value *string) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilPath ¶
func (f *FileUpdateOne) SetNotNilPath(value *string) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilSize ¶
func (f *FileUpdateOne) SetNotNilSize(value *uint64) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilStatus ¶
func (f *FileUpdateOne) SetNotNilStatus(value *uint8) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilUpdatedAt ¶
func (f *FileUpdateOne) SetNotNilUpdatedAt(value *time.Time) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetNotNilUserID ¶
func (f *FileUpdateOne) SetNotNilUserID(value *string) *FileUpdateOne
set field if value's pointer is not nil.
func (*FileUpdateOne) SetPath ¶
func (fuo *FileUpdateOne) SetPath(s string) *FileUpdateOne
SetPath sets the "path" field.
func (*FileUpdateOne) SetSize ¶
func (fuo *FileUpdateOne) SetSize(u uint64) *FileUpdateOne
SetSize sets the "size" field.
func (*FileUpdateOne) SetStatus ¶
func (fuo *FileUpdateOne) SetStatus(u uint8) *FileUpdateOne
SetStatus sets the "status" field.
func (*FileUpdateOne) SetUpdatedAt ¶
func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdateOne) SetUserID ¶
func (fuo *FileUpdateOne) SetUserID(s string) *FileUpdateOne
SetUserID sets the "user_id" field.
func (*FileUpdateOne) Where ¶
func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type 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 OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PageDetails ¶
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
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.
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 ¶
Rollbacker is the interface that wraps the Rollback method.
type StorageProvider ¶
type StorageProvider struct {
// ID of the ent.
ID uint64 `json:"id,omitempty"`
// Create Time | 创建日期
CreatedAt time.Time `json:"created_at,omitempty"`
// Update Time | 修改日期
UpdatedAt time.Time `json:"updated_at,omitempty"`
// State true: normal false: ban | 状态 true 正常 false 禁用
State bool `json:"state,omitempty"`
// The cloud storage service name | 服务名称
Name string `json:"name,omitempty"`
// The cloud storage bucket name | 云存储服务的存储桶
Bucket string `json:"bucket,omitempty"`
// The secret ID | 密钥 ID
SecretID string `json:"secret_id,omitempty"`
// The secret key | 密钥 Key
SecretKey string `json:"secret_key,omitempty"`
// The service URL | 服务器地址
Endpoint string `json:"endpoint,omitempty"`
// The folder in cloud | 云服务目标文件夹
Folder string `json:"folder,omitempty"`
// The service region | 服务器所在地区
Region string `json:"region,omitempty"`
// Is it the default provider | 是否为默认提供商
IsDefault bool `json:"is_default,omitempty"`
// Does it use CDN | 是否使用 CDN
UseCdn bool `json:"use_cdn,omitempty"`
// CDN URL | CDN 地址
CdnURL string `json:"cdn_url,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the StorageProviderQuery when eager-loading is set.
Edges StorageProviderEdges `json:"edges"`
// contains filtered or unexported fields
}
Cloud File's Provider Configuration Table | 云文件服务商配置表
func (*StorageProvider) ExecContext ¶
func (c *StorageProvider) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProvider) QueryCloudfiles ¶
func (sp *StorageProvider) QueryCloudfiles() *CloudFileQuery
QueryCloudfiles queries the "cloudfiles" edge of the StorageProvider entity.
func (*StorageProvider) QueryContext ¶
func (c *StorageProvider) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProvider) String ¶
func (sp *StorageProvider) String() string
String implements the fmt.Stringer.
func (*StorageProvider) Unwrap ¶
func (sp *StorageProvider) Unwrap() *StorageProvider
Unwrap unwraps the StorageProvider 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 (*StorageProvider) Update ¶
func (sp *StorageProvider) Update() *StorageProviderUpdateOne
Update returns a builder for updating this StorageProvider. Note that you need to call StorageProvider.Unwrap() before calling this method if this StorageProvider was returned from a transaction, and the transaction was committed or rolled back.
type StorageProviderClient ¶
type StorageProviderClient struct {
// contains filtered or unexported fields
}
StorageProviderClient is a client for the StorageProvider schema.
func NewStorageProviderClient ¶
func NewStorageProviderClient(c config) *StorageProviderClient
NewStorageProviderClient returns a client for the StorageProvider from the given config.
func (*StorageProviderClient) Create ¶
func (c *StorageProviderClient) Create() *StorageProviderCreate
Create returns a builder for creating a StorageProvider entity.
func (*StorageProviderClient) CreateBulk ¶
func (c *StorageProviderClient) CreateBulk(builders ...*StorageProviderCreate) *StorageProviderCreateBulk
CreateBulk returns a builder for creating a bulk of StorageProvider entities.
func (*StorageProviderClient) Delete ¶
func (c *StorageProviderClient) Delete() *StorageProviderDelete
Delete returns a delete builder for StorageProvider.
func (*StorageProviderClient) DeleteOne ¶
func (c *StorageProviderClient) DeleteOne(sp *StorageProvider) *StorageProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StorageProviderClient) DeleteOneID ¶
func (c *StorageProviderClient) DeleteOneID(id uint64) *StorageProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StorageProviderClient) ExecContext ¶
func (c *StorageProviderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderClient) Get ¶
func (c *StorageProviderClient) Get(ctx context.Context, id uint64) (*StorageProvider, error)
Get returns a StorageProvider entity by its id.
func (*StorageProviderClient) GetX ¶
func (c *StorageProviderClient) GetX(ctx context.Context, id uint64) *StorageProvider
GetX is like Get, but panics if an error occurs.
func (*StorageProviderClient) Hooks ¶
func (c *StorageProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StorageProviderClient) Intercept ¶
func (c *StorageProviderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `storageprovider.Intercept(f(g(h())))`.
func (*StorageProviderClient) Interceptors ¶
func (c *StorageProviderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StorageProviderClient) MapCreateBulk ¶
func (c *StorageProviderClient) MapCreateBulk(slice any, setFunc func(*StorageProviderCreate, int)) *StorageProviderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*StorageProviderClient) Query ¶
func (c *StorageProviderClient) Query() *StorageProviderQuery
Query returns a query builder for StorageProvider.
func (*StorageProviderClient) QueryCloudfiles ¶
func (c *StorageProviderClient) QueryCloudfiles(sp *StorageProvider) *CloudFileQuery
QueryCloudfiles queries the cloudfiles edge of a StorageProvider.
func (*StorageProviderClient) QueryContext ¶
func (c *StorageProviderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderClient) Update ¶
func (c *StorageProviderClient) Update() *StorageProviderUpdate
Update returns an update builder for StorageProvider.
func (*StorageProviderClient) UpdateOne ¶
func (c *StorageProviderClient) UpdateOne(sp *StorageProvider) *StorageProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StorageProviderClient) UpdateOneID ¶
func (c *StorageProviderClient) UpdateOneID(id uint64) *StorageProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StorageProviderClient) Use ¶
func (c *StorageProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `storageprovider.Hooks(f(g(h())))`.
type StorageProviderCreate ¶
type StorageProviderCreate struct {
// contains filtered or unexported fields
}
StorageProviderCreate is the builder for creating a StorageProvider entity.
func (*StorageProviderCreate) AddCloudfileIDs ¶
func (spc *StorageProviderCreate) AddCloudfileIDs(ids ...uuid.UUID) *StorageProviderCreate
AddCloudfileIDs adds the "cloudfiles" edge to the CloudFile entity by IDs.
func (*StorageProviderCreate) AddCloudfiles ¶
func (spc *StorageProviderCreate) AddCloudfiles(c ...*CloudFile) *StorageProviderCreate
AddCloudfiles adds the "cloudfiles" edges to the CloudFile entity.
func (*StorageProviderCreate) Exec ¶
func (spc *StorageProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageProviderCreate) ExecContext ¶
func (c *StorageProviderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderCreate) ExecX ¶
func (spc *StorageProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderCreate) Mutation ¶
func (spc *StorageProviderCreate) Mutation() *StorageProviderMutation
Mutation returns the StorageProviderMutation object of the builder.
func (*StorageProviderCreate) QueryContext ¶
func (c *StorageProviderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderCreate) Save ¶
func (spc *StorageProviderCreate) Save(ctx context.Context) (*StorageProvider, error)
Save creates the StorageProvider in the database.
func (*StorageProviderCreate) SaveX ¶
func (spc *StorageProviderCreate) SaveX(ctx context.Context) *StorageProvider
SaveX calls Save and panics if Save returns an error.
func (*StorageProviderCreate) SetBucket ¶
func (spc *StorageProviderCreate) SetBucket(s string) *StorageProviderCreate
SetBucket sets the "bucket" field.
func (*StorageProviderCreate) SetCdnURL ¶
func (spc *StorageProviderCreate) SetCdnURL(s string) *StorageProviderCreate
SetCdnURL sets the "cdn_url" field.
func (*StorageProviderCreate) SetCreatedAt ¶
func (spc *StorageProviderCreate) SetCreatedAt(t time.Time) *StorageProviderCreate
SetCreatedAt sets the "created_at" field.
func (*StorageProviderCreate) SetEndpoint ¶
func (spc *StorageProviderCreate) SetEndpoint(s string) *StorageProviderCreate
SetEndpoint sets the "endpoint" field.
func (*StorageProviderCreate) SetFolder ¶
func (spc *StorageProviderCreate) SetFolder(s string) *StorageProviderCreate
SetFolder sets the "folder" field.
func (*StorageProviderCreate) SetID ¶
func (spc *StorageProviderCreate) SetID(u uint64) *StorageProviderCreate
SetID sets the "id" field.
func (*StorageProviderCreate) SetIsDefault ¶
func (spc *StorageProviderCreate) SetIsDefault(b bool) *StorageProviderCreate
SetIsDefault sets the "is_default" field.
func (*StorageProviderCreate) SetName ¶
func (spc *StorageProviderCreate) SetName(s string) *StorageProviderCreate
SetName sets the "name" field.
func (*StorageProviderCreate) SetNillableCdnURL ¶
func (spc *StorageProviderCreate) SetNillableCdnURL(s *string) *StorageProviderCreate
SetNillableCdnURL sets the "cdn_url" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableCreatedAt ¶
func (spc *StorageProviderCreate) SetNillableCreatedAt(t *time.Time) *StorageProviderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableFolder ¶
func (spc *StorageProviderCreate) SetNillableFolder(s *string) *StorageProviderCreate
SetNillableFolder sets the "folder" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableIsDefault ¶
func (spc *StorageProviderCreate) SetNillableIsDefault(b *bool) *StorageProviderCreate
SetNillableIsDefault sets the "is_default" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableState ¶
func (spc *StorageProviderCreate) SetNillableState(b *bool) *StorageProviderCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableUpdatedAt ¶
func (spc *StorageProviderCreate) SetNillableUpdatedAt(t *time.Time) *StorageProviderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*StorageProviderCreate) SetNillableUseCdn ¶
func (spc *StorageProviderCreate) SetNillableUseCdn(b *bool) *StorageProviderCreate
SetNillableUseCdn sets the "use_cdn" field if the given value is not nil.
func (*StorageProviderCreate) SetNotNilBucket ¶
func (sp *StorageProviderCreate) SetNotNilBucket(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilCdnURL ¶
func (sp *StorageProviderCreate) SetNotNilCdnURL(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilEndpoint ¶
func (sp *StorageProviderCreate) SetNotNilEndpoint(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilFolder ¶
func (sp *StorageProviderCreate) SetNotNilFolder(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilIsDefault ¶
func (sp *StorageProviderCreate) SetNotNilIsDefault(value *bool) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilName ¶
func (sp *StorageProviderCreate) SetNotNilName(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilRegion ¶
func (sp *StorageProviderCreate) SetNotNilRegion(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilSecretID ¶
func (sp *StorageProviderCreate) SetNotNilSecretID(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilSecretKey ¶
func (sp *StorageProviderCreate) SetNotNilSecretKey(value *string) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilState ¶
func (sp *StorageProviderCreate) SetNotNilState(value *bool) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilUpdatedAt ¶
func (sp *StorageProviderCreate) SetNotNilUpdatedAt(value *time.Time) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetNotNilUseCdn ¶
func (sp *StorageProviderCreate) SetNotNilUseCdn(value *bool) *StorageProviderCreate
set field if value's pointer is not nil.
func (*StorageProviderCreate) SetRegion ¶
func (spc *StorageProviderCreate) SetRegion(s string) *StorageProviderCreate
SetRegion sets the "region" field.
func (*StorageProviderCreate) SetSecretID ¶
func (spc *StorageProviderCreate) SetSecretID(s string) *StorageProviderCreate
SetSecretID sets the "secret_id" field.
func (*StorageProviderCreate) SetSecretKey ¶
func (spc *StorageProviderCreate) SetSecretKey(s string) *StorageProviderCreate
SetSecretKey sets the "secret_key" field.
func (*StorageProviderCreate) SetState ¶
func (spc *StorageProviderCreate) SetState(b bool) *StorageProviderCreate
SetState sets the "state" field.
func (*StorageProviderCreate) SetUpdatedAt ¶
func (spc *StorageProviderCreate) SetUpdatedAt(t time.Time) *StorageProviderCreate
SetUpdatedAt sets the "updated_at" field.
func (*StorageProviderCreate) SetUseCdn ¶
func (spc *StorageProviderCreate) SetUseCdn(b bool) *StorageProviderCreate
SetUseCdn sets the "use_cdn" field.
type StorageProviderCreateBulk ¶
type StorageProviderCreateBulk struct {
// contains filtered or unexported fields
}
StorageProviderCreateBulk is the builder for creating many StorageProvider entities in bulk.
func (*StorageProviderCreateBulk) Exec ¶
func (spcb *StorageProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageProviderCreateBulk) ExecContext ¶
func (c *StorageProviderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderCreateBulk) ExecX ¶
func (spcb *StorageProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderCreateBulk) QueryContext ¶
func (c *StorageProviderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderCreateBulk) Save ¶
func (spcb *StorageProviderCreateBulk) Save(ctx context.Context) ([]*StorageProvider, error)
Save creates the StorageProvider entities in the database.
func (*StorageProviderCreateBulk) SaveX ¶
func (spcb *StorageProviderCreateBulk) SaveX(ctx context.Context) []*StorageProvider
SaveX is like Save, but panics if an error occurs.
type StorageProviderDelete ¶
type StorageProviderDelete struct {
// contains filtered or unexported fields
}
StorageProviderDelete is the builder for deleting a StorageProvider entity.
func (*StorageProviderDelete) Exec ¶
func (spd *StorageProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StorageProviderDelete) ExecContext ¶
func (c *StorageProviderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderDelete) ExecX ¶
func (spd *StorageProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderDelete) QueryContext ¶
func (c *StorageProviderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderDelete) Where ¶
func (spd *StorageProviderDelete) Where(ps ...predicate.StorageProvider) *StorageProviderDelete
Where appends a list predicates to the StorageProviderDelete builder.
type StorageProviderDeleteOne ¶
type StorageProviderDeleteOne struct {
// contains filtered or unexported fields
}
StorageProviderDeleteOne is the builder for deleting a single StorageProvider entity.
func (*StorageProviderDeleteOne) Exec ¶
func (spdo *StorageProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StorageProviderDeleteOne) ExecX ¶
func (spdo *StorageProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderDeleteOne) Where ¶
func (spdo *StorageProviderDeleteOne) Where(ps ...predicate.StorageProvider) *StorageProviderDeleteOne
Where appends a list predicates to the StorageProviderDelete builder.
type StorageProviderEdges ¶
type StorageProviderEdges struct {
// Cloudfiles holds the value of the cloudfiles edge.
Cloudfiles []*CloudFile `json:"cloudfiles,omitempty"`
// contains filtered or unexported fields
}
StorageProviderEdges holds the relations/edges for other nodes in the graph.
func (StorageProviderEdges) CloudfilesOrErr ¶
func (e StorageProviderEdges) CloudfilesOrErr() ([]*CloudFile, error)
CloudfilesOrErr returns the Cloudfiles value or an error if the edge was not loaded in eager-loading.
type StorageProviderGroupBy ¶
type StorageProviderGroupBy struct {
// contains filtered or unexported fields
}
StorageProviderGroupBy is the group-by builder for StorageProvider entities.
func (*StorageProviderGroupBy) Aggregate ¶
func (spgb *StorageProviderGroupBy) Aggregate(fns ...AggregateFunc) *StorageProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StorageProviderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*StorageProviderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageProviderGroupBy) Scan ¶
func (spgb *StorageProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageProviderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageProviderMutation ¶
type StorageProviderMutation struct {
// contains filtered or unexported fields
}
StorageProviderMutation represents an operation that mutates the StorageProvider nodes in the graph.
func (*StorageProviderMutation) AddCloudfileIDs ¶
func (m *StorageProviderMutation) AddCloudfileIDs(ids ...uuid.UUID)
AddCloudfileIDs adds the "cloudfiles" edge to the CloudFile entity by ids.
func (*StorageProviderMutation) AddField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) AddedEdges ¶
func (m *StorageProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StorageProviderMutation) AddedField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) AddedFields ¶
func (m *StorageProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StorageProviderMutation) AddedIDs ¶
func (m *StorageProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StorageProviderMutation) Bucket ¶
func (m *StorageProviderMutation) Bucket() (r string, exists bool)
Bucket returns the value of the "bucket" field in the mutation.
func (*StorageProviderMutation) CdnURL ¶
func (m *StorageProviderMutation) CdnURL() (r string, exists bool)
CdnURL returns the value of the "cdn_url" field in the mutation.
func (*StorageProviderMutation) CdnURLCleared ¶
func (m *StorageProviderMutation) CdnURLCleared() bool
CdnURLCleared returns if the "cdn_url" field was cleared in this mutation.
func (*StorageProviderMutation) ClearCdnURL ¶
func (m *StorageProviderMutation) ClearCdnURL()
ClearCdnURL clears the value of the "cdn_url" field.
func (*StorageProviderMutation) ClearCloudfiles ¶
func (m *StorageProviderMutation) ClearCloudfiles()
ClearCloudfiles clears the "cloudfiles" edge to the CloudFile entity.
func (*StorageProviderMutation) ClearEdge ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ClearField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ClearFolder ¶
func (m *StorageProviderMutation) ClearFolder()
ClearFolder clears the value of the "folder" field.
func (*StorageProviderMutation) ClearState ¶
func (m *StorageProviderMutation) ClearState()
ClearState clears the value of the "state" field.
func (*StorageProviderMutation) ClearedEdges ¶
func (m *StorageProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StorageProviderMutation) ClearedFields ¶
func (m *StorageProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StorageProviderMutation) Client ¶
func (m StorageProviderMutation) 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 (*StorageProviderMutation) CloudfilesCleared ¶
func (m *StorageProviderMutation) CloudfilesCleared() bool
CloudfilesCleared reports if the "cloudfiles" edge to the CloudFile entity was cleared.
func (*StorageProviderMutation) CloudfilesIDs ¶
func (m *StorageProviderMutation) CloudfilesIDs() (ids []uuid.UUID)
CloudfilesIDs returns the "cloudfiles" edge IDs in the mutation.
func (*StorageProviderMutation) CreatedAt ¶
func (m *StorageProviderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*StorageProviderMutation) EdgeCleared ¶
func (m *StorageProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StorageProviderMutation) Endpoint ¶
func (m *StorageProviderMutation) Endpoint() (r string, exists bool)
Endpoint returns the value of the "endpoint" field in the mutation.
func (*StorageProviderMutation) ExecContext ¶
func (c *StorageProviderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderMutation) Field ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) FieldCleared ¶
func (m *StorageProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StorageProviderMutation) Fields ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) Folder ¶
func (m *StorageProviderMutation) Folder() (r string, exists bool)
Folder returns the value of the "folder" field in the mutation.
func (*StorageProviderMutation) FolderCleared ¶
func (m *StorageProviderMutation) FolderCleared() bool
FolderCleared returns if the "folder" field was cleared in this mutation.
func (*StorageProviderMutation) ID ¶
func (m *StorageProviderMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*StorageProviderMutation) IDs ¶
func (m *StorageProviderMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*StorageProviderMutation) IsDefault ¶
func (m *StorageProviderMutation) IsDefault() (r bool, exists bool)
IsDefault returns the value of the "is_default" field in the mutation.
func (*StorageProviderMutation) Name ¶
func (m *StorageProviderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*StorageProviderMutation) OldBucket ¶
func (m *StorageProviderMutation) OldBucket(ctx context.Context) (v string, err error)
OldBucket returns the old "bucket" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldCdnURL ¶
func (m *StorageProviderMutation) OldCdnURL(ctx context.Context) (v string, err error)
OldCdnURL returns the old "cdn_url" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldEndpoint ¶
func (m *StorageProviderMutation) OldEndpoint(ctx context.Context) (v string, err error)
OldEndpoint returns the old "endpoint" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldField ¶
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 (*StorageProviderMutation) OldFolder ¶
func (m *StorageProviderMutation) OldFolder(ctx context.Context) (v string, err error)
OldFolder returns the old "folder" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldIsDefault ¶
func (m *StorageProviderMutation) OldIsDefault(ctx context.Context) (v bool, err error)
OldIsDefault returns the old "is_default" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldName ¶
func (m *StorageProviderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldRegion ¶
func (m *StorageProviderMutation) OldRegion(ctx context.Context) (v string, err error)
OldRegion returns the old "region" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldSecretID ¶
func (m *StorageProviderMutation) OldSecretID(ctx context.Context) (v string, err error)
OldSecretID returns the old "secret_id" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldSecretKey ¶
func (m *StorageProviderMutation) OldSecretKey(ctx context.Context) (v string, err error)
OldSecretKey returns the old "secret_key" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldState ¶
func (m *StorageProviderMutation) OldState(ctx context.Context) (v bool, err error)
OldState returns the old "state" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) OldUseCdn ¶
func (m *StorageProviderMutation) OldUseCdn(ctx context.Context) (v bool, err error)
OldUseCdn returns the old "use_cdn" field's value of the StorageProvider entity. If the StorageProvider 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 (*StorageProviderMutation) Op ¶
func (m *StorageProviderMutation) Op() Op
Op returns the operation name.
func (*StorageProviderMutation) QueryContext ¶
func (c *StorageProviderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderMutation) Region ¶
func (m *StorageProviderMutation) Region() (r string, exists bool)
Region returns the value of the "region" field in the mutation.
func (*StorageProviderMutation) RemoveCloudfileIDs ¶
func (m *StorageProviderMutation) RemoveCloudfileIDs(ids ...uuid.UUID)
RemoveCloudfileIDs removes the "cloudfiles" edge to the CloudFile entity by IDs.
func (*StorageProviderMutation) RemovedCloudfilesIDs ¶
func (m *StorageProviderMutation) RemovedCloudfilesIDs() (ids []uuid.UUID)
RemovedCloudfiles returns the removed IDs of the "cloudfiles" edge to the CloudFile entity.
func (*StorageProviderMutation) RemovedEdges ¶
func (m *StorageProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StorageProviderMutation) RemovedIDs ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ResetBucket ¶
func (m *StorageProviderMutation) ResetBucket()
ResetBucket resets all changes to the "bucket" field.
func (*StorageProviderMutation) ResetCdnURL ¶
func (m *StorageProviderMutation) ResetCdnURL()
ResetCdnURL resets all changes to the "cdn_url" field.
func (*StorageProviderMutation) ResetCloudfiles ¶
func (m *StorageProviderMutation) ResetCloudfiles()
ResetCloudfiles resets all changes to the "cloudfiles" edge.
func (*StorageProviderMutation) ResetCreatedAt ¶
func (m *StorageProviderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*StorageProviderMutation) ResetEdge ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ResetEndpoint ¶
func (m *StorageProviderMutation) ResetEndpoint()
ResetEndpoint resets all changes to the "endpoint" field.
func (*StorageProviderMutation) ResetField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) ResetFolder ¶
func (m *StorageProviderMutation) ResetFolder()
ResetFolder resets all changes to the "folder" field.
func (*StorageProviderMutation) ResetIsDefault ¶
func (m *StorageProviderMutation) ResetIsDefault()
ResetIsDefault resets all changes to the "is_default" field.
func (*StorageProviderMutation) ResetName ¶
func (m *StorageProviderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*StorageProviderMutation) ResetRegion ¶
func (m *StorageProviderMutation) ResetRegion()
ResetRegion resets all changes to the "region" field.
func (*StorageProviderMutation) ResetSecretID ¶
func (m *StorageProviderMutation) ResetSecretID()
ResetSecretID resets all changes to the "secret_id" field.
func (*StorageProviderMutation) ResetSecretKey ¶
func (m *StorageProviderMutation) ResetSecretKey()
ResetSecretKey resets all changes to the "secret_key" field.
func (*StorageProviderMutation) ResetState ¶
func (m *StorageProviderMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*StorageProviderMutation) ResetUpdatedAt ¶
func (m *StorageProviderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*StorageProviderMutation) ResetUseCdn ¶
func (m *StorageProviderMutation) ResetUseCdn()
ResetUseCdn resets all changes to the "use_cdn" field.
func (*StorageProviderMutation) SecretID ¶
func (m *StorageProviderMutation) SecretID() (r string, exists bool)
SecretID returns the value of the "secret_id" field in the mutation.
func (*StorageProviderMutation) SecretKey ¶
func (m *StorageProviderMutation) SecretKey() (r string, exists bool)
SecretKey returns the value of the "secret_key" field in the mutation.
func (*StorageProviderMutation) SetBucket ¶
func (m *StorageProviderMutation) SetBucket(s string)
SetBucket sets the "bucket" field.
func (*StorageProviderMutation) SetCdnURL ¶
func (m *StorageProviderMutation) SetCdnURL(s string)
SetCdnURL sets the "cdn_url" field.
func (*StorageProviderMutation) SetCreatedAt ¶
func (m *StorageProviderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*StorageProviderMutation) SetEndpoint ¶
func (m *StorageProviderMutation) SetEndpoint(s string)
SetEndpoint sets the "endpoint" field.
func (*StorageProviderMutation) SetField ¶
func (m *StorageProviderMutation) 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 (*StorageProviderMutation) SetFolder ¶
func (m *StorageProviderMutation) SetFolder(s string)
SetFolder sets the "folder" field.
func (*StorageProviderMutation) SetID ¶
func (m *StorageProviderMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of StorageProvider entities.
func (*StorageProviderMutation) SetIsDefault ¶
func (m *StorageProviderMutation) SetIsDefault(b bool)
SetIsDefault sets the "is_default" field.
func (*StorageProviderMutation) SetName ¶
func (m *StorageProviderMutation) SetName(s string)
SetName sets the "name" field.
func (*StorageProviderMutation) SetOp ¶
func (m *StorageProviderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StorageProviderMutation) SetRegion ¶
func (m *StorageProviderMutation) SetRegion(s string)
SetRegion sets the "region" field.
func (*StorageProviderMutation) SetSecretID ¶
func (m *StorageProviderMutation) SetSecretID(s string)
SetSecretID sets the "secret_id" field.
func (*StorageProviderMutation) SetSecretKey ¶
func (m *StorageProviderMutation) SetSecretKey(s string)
SetSecretKey sets the "secret_key" field.
func (*StorageProviderMutation) SetState ¶
func (m *StorageProviderMutation) SetState(b bool)
SetState sets the "state" field.
func (*StorageProviderMutation) SetUpdatedAt ¶
func (m *StorageProviderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*StorageProviderMutation) SetUseCdn ¶
func (m *StorageProviderMutation) SetUseCdn(b bool)
SetUseCdn sets the "use_cdn" field.
func (*StorageProviderMutation) State ¶
func (m *StorageProviderMutation) State() (r bool, exists bool)
State returns the value of the "state" field in the mutation.
func (*StorageProviderMutation) StateCleared ¶
func (m *StorageProviderMutation) StateCleared() bool
StateCleared returns if the "state" field was cleared in this mutation.
func (StorageProviderMutation) Tx ¶
func (m StorageProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StorageProviderMutation) Type ¶
func (m *StorageProviderMutation) Type() string
Type returns the node type of this mutation (StorageProvider).
func (*StorageProviderMutation) UpdatedAt ¶
func (m *StorageProviderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*StorageProviderMutation) UseCdn ¶
func (m *StorageProviderMutation) UseCdn() (r bool, exists bool)
UseCdn returns the value of the "use_cdn" field in the mutation.
func (*StorageProviderMutation) Where ¶
func (m *StorageProviderMutation) Where(ps ...predicate.StorageProvider)
Where appends a list predicates to the StorageProviderMutation builder.
func (*StorageProviderMutation) WhereP ¶
func (m *StorageProviderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StorageProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StorageProviderPageList ¶
type StorageProviderPageList struct {
List []*StorageProvider `json:"list"`
PageDetails *PageDetails `json:"pageDetails"`
}
StorageProviderPageList is StorageProvider PageList result.
type StorageProviderPager ¶
type StorageProviderPager struct {
Order storageprovider.OrderOption
Filter func(*StorageProviderQuery) (*StorageProviderQuery, error)
}
func (*StorageProviderPager) ApplyFilter ¶
func (p *StorageProviderPager) ApplyFilter(query *StorageProviderQuery) (*StorageProviderQuery, error)
type StorageProviderPaginateOption ¶
type StorageProviderPaginateOption func(*StorageProviderPager)
StorageProviderPaginateOption enables pagination customization.
type StorageProviderQuery ¶
type StorageProviderQuery struct {
// contains filtered or unexported fields
}
StorageProviderQuery is the builder for querying StorageProvider entities.
func (*StorageProviderQuery) Aggregate ¶
func (spq *StorageProviderQuery) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
Aggregate returns a StorageProviderSelect configured with the given aggregations.
func (*StorageProviderQuery) All ¶
func (spq *StorageProviderQuery) All(ctx context.Context) ([]*StorageProvider, error)
All executes the query and returns a list of StorageProviders.
func (*StorageProviderQuery) AllX ¶
func (spq *StorageProviderQuery) AllX(ctx context.Context) []*StorageProvider
AllX is like All, but panics if an error occurs.
func (*StorageProviderQuery) Clone ¶
func (spq *StorageProviderQuery) Clone() *StorageProviderQuery
Clone returns a duplicate of the StorageProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StorageProviderQuery) Count ¶
func (spq *StorageProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StorageProviderQuery) CountX ¶
func (spq *StorageProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StorageProviderQuery) ExecContext ¶
func (c *StorageProviderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderQuery) Exist ¶
func (spq *StorageProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StorageProviderQuery) ExistX ¶
func (spq *StorageProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StorageProviderQuery) First ¶
func (spq *StorageProviderQuery) First(ctx context.Context) (*StorageProvider, error)
First returns the first StorageProvider entity from the query. Returns a *NotFoundError when no StorageProvider was found.
func (*StorageProviderQuery) FirstID ¶
func (spq *StorageProviderQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first StorageProvider ID from the query. Returns a *NotFoundError when no StorageProvider ID was found.
func (*StorageProviderQuery) FirstIDX ¶
func (spq *StorageProviderQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*StorageProviderQuery) FirstX ¶
func (spq *StorageProviderQuery) FirstX(ctx context.Context) *StorageProvider
FirstX is like First, but panics if an error occurs.
func (*StorageProviderQuery) GroupBy ¶
func (spq *StorageProviderQuery) GroupBy(field string, fields ...string) *StorageProviderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.StorageProvider.Query().
GroupBy(storageprovider.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*StorageProviderQuery) IDs ¶
func (spq *StorageProviderQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of StorageProvider IDs.
func (*StorageProviderQuery) IDsX ¶
func (spq *StorageProviderQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*StorageProviderQuery) Limit ¶
func (spq *StorageProviderQuery) Limit(limit int) *StorageProviderQuery
Limit the number of records to be returned by this query.
func (*StorageProviderQuery) Offset ¶
func (spq *StorageProviderQuery) Offset(offset int) *StorageProviderQuery
Offset to start from.
func (*StorageProviderQuery) Only ¶
func (spq *StorageProviderQuery) Only(ctx context.Context) (*StorageProvider, error)
Only returns a single StorageProvider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StorageProvider entity is found. Returns a *NotFoundError when no StorageProvider entities are found.
func (*StorageProviderQuery) OnlyID ¶
func (spq *StorageProviderQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only StorageProvider ID in the query. Returns a *NotSingularError when more than one StorageProvider ID is found. Returns a *NotFoundError when no entities are found.
func (*StorageProviderQuery) OnlyIDX ¶
func (spq *StorageProviderQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StorageProviderQuery) OnlyX ¶
func (spq *StorageProviderQuery) OnlyX(ctx context.Context) *StorageProvider
OnlyX is like Only, but panics if an error occurs.
func (*StorageProviderQuery) Order ¶
func (spq *StorageProviderQuery) Order(o ...storageprovider.OrderOption) *StorageProviderQuery
Order specifies how the records should be ordered.
func (*StorageProviderQuery) Page ¶
func (sp *StorageProviderQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...StorageProviderPaginateOption, ) (*StorageProviderPageList, error)
func (*StorageProviderQuery) QueryCloudfiles ¶
func (spq *StorageProviderQuery) QueryCloudfiles() *CloudFileQuery
QueryCloudfiles chains the current query on the "cloudfiles" edge.
func (*StorageProviderQuery) QueryContext ¶
func (c *StorageProviderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderQuery) Select ¶
func (spq *StorageProviderQuery) Select(fields ...string) *StorageProviderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.StorageProvider.Query().
Select(storageprovider.FieldCreatedAt).
Scan(ctx, &v)
func (*StorageProviderQuery) Unique ¶
func (spq *StorageProviderQuery) Unique(unique bool) *StorageProviderQuery
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 (*StorageProviderQuery) Where ¶
func (spq *StorageProviderQuery) Where(ps ...predicate.StorageProvider) *StorageProviderQuery
Where adds a new predicate for the StorageProviderQuery builder.
func (*StorageProviderQuery) WithCloudfiles ¶
func (spq *StorageProviderQuery) WithCloudfiles(opts ...func(*CloudFileQuery)) *StorageProviderQuery
WithCloudfiles tells the query-builder to eager-load the nodes that are connected to the "cloudfiles" edge. The optional arguments are used to configure the query builder of the edge.
type StorageProviderSelect ¶
type StorageProviderSelect struct {
*StorageProviderQuery
// contains filtered or unexported fields
}
StorageProviderSelect is the builder for selecting fields of StorageProvider entities.
func (*StorageProviderSelect) Aggregate ¶
func (sps *StorageProviderSelect) Aggregate(fns ...AggregateFunc) *StorageProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StorageProviderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (StorageProviderSelect) ExecContext ¶
func (c StorageProviderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*StorageProviderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageProviderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (StorageProviderSelect) QueryContext ¶
func (c StorageProviderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderSelect) Scan ¶
func (sps *StorageProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageProviderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageProviderUpdate ¶
type StorageProviderUpdate struct {
// contains filtered or unexported fields
}
StorageProviderUpdate is the builder for updating StorageProvider entities.
func (*StorageProviderUpdate) AddCloudfileIDs ¶
func (spu *StorageProviderUpdate) AddCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdate
AddCloudfileIDs adds the "cloudfiles" edge to the CloudFile entity by IDs.
func (*StorageProviderUpdate) AddCloudfiles ¶
func (spu *StorageProviderUpdate) AddCloudfiles(c ...*CloudFile) *StorageProviderUpdate
AddCloudfiles adds the "cloudfiles" edges to the CloudFile entity.
func (*StorageProviderUpdate) ClearCdnURL ¶
func (spu *StorageProviderUpdate) ClearCdnURL() *StorageProviderUpdate
ClearCdnURL clears the value of the "cdn_url" field.
func (*StorageProviderUpdate) ClearCloudfiles ¶
func (spu *StorageProviderUpdate) ClearCloudfiles() *StorageProviderUpdate
ClearCloudfiles clears all "cloudfiles" edges to the CloudFile entity.
func (*StorageProviderUpdate) ClearFolder ¶
func (spu *StorageProviderUpdate) ClearFolder() *StorageProviderUpdate
ClearFolder clears the value of the "folder" field.
func (*StorageProviderUpdate) ClearState ¶
func (spu *StorageProviderUpdate) ClearState() *StorageProviderUpdate
ClearState clears the value of the "state" field.
func (*StorageProviderUpdate) Exec ¶
func (spu *StorageProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageProviderUpdate) ExecContext ¶
func (c *StorageProviderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderUpdate) ExecX ¶
func (spu *StorageProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderUpdate) Mutation ¶
func (spu *StorageProviderUpdate) Mutation() *StorageProviderMutation
Mutation returns the StorageProviderMutation object of the builder.
func (*StorageProviderUpdate) QueryContext ¶
func (c *StorageProviderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderUpdate) RemoveCloudfileIDs ¶
func (spu *StorageProviderUpdate) RemoveCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdate
RemoveCloudfileIDs removes the "cloudfiles" edge to CloudFile entities by IDs.
func (*StorageProviderUpdate) RemoveCloudfiles ¶
func (spu *StorageProviderUpdate) RemoveCloudfiles(c ...*CloudFile) *StorageProviderUpdate
RemoveCloudfiles removes "cloudfiles" edges to CloudFile entities.
func (*StorageProviderUpdate) Save ¶
func (spu *StorageProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StorageProviderUpdate) SaveX ¶
func (spu *StorageProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StorageProviderUpdate) SetBucket ¶
func (spu *StorageProviderUpdate) SetBucket(s string) *StorageProviderUpdate
SetBucket sets the "bucket" field.
func (*StorageProviderUpdate) SetCdnURL ¶
func (spu *StorageProviderUpdate) SetCdnURL(s string) *StorageProviderUpdate
SetCdnURL sets the "cdn_url" field.
func (*StorageProviderUpdate) SetEndpoint ¶
func (spu *StorageProviderUpdate) SetEndpoint(s string) *StorageProviderUpdate
SetEndpoint sets the "endpoint" field.
func (*StorageProviderUpdate) SetFolder ¶
func (spu *StorageProviderUpdate) SetFolder(s string) *StorageProviderUpdate
SetFolder sets the "folder" field.
func (*StorageProviderUpdate) SetIsDefault ¶
func (spu *StorageProviderUpdate) SetIsDefault(b bool) *StorageProviderUpdate
SetIsDefault sets the "is_default" field.
func (*StorageProviderUpdate) SetName ¶
func (spu *StorageProviderUpdate) SetName(s string) *StorageProviderUpdate
SetName sets the "name" field.
func (*StorageProviderUpdate) SetNillableBucket ¶
func (spu *StorageProviderUpdate) SetNillableBucket(s *string) *StorageProviderUpdate
SetNillableBucket sets the "bucket" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableCdnURL ¶
func (spu *StorageProviderUpdate) SetNillableCdnURL(s *string) *StorageProviderUpdate
SetNillableCdnURL sets the "cdn_url" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableEndpoint ¶
func (spu *StorageProviderUpdate) SetNillableEndpoint(s *string) *StorageProviderUpdate
SetNillableEndpoint sets the "endpoint" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableFolder ¶
func (spu *StorageProviderUpdate) SetNillableFolder(s *string) *StorageProviderUpdate
SetNillableFolder sets the "folder" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableIsDefault ¶
func (spu *StorageProviderUpdate) SetNillableIsDefault(b *bool) *StorageProviderUpdate
SetNillableIsDefault sets the "is_default" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableName ¶
func (spu *StorageProviderUpdate) SetNillableName(s *string) *StorageProviderUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableRegion ¶
func (spu *StorageProviderUpdate) SetNillableRegion(s *string) *StorageProviderUpdate
SetNillableRegion sets the "region" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableSecretID ¶
func (spu *StorageProviderUpdate) SetNillableSecretID(s *string) *StorageProviderUpdate
SetNillableSecretID sets the "secret_id" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableSecretKey ¶
func (spu *StorageProviderUpdate) SetNillableSecretKey(s *string) *StorageProviderUpdate
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableState ¶
func (spu *StorageProviderUpdate) SetNillableState(b *bool) *StorageProviderUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*StorageProviderUpdate) SetNillableUseCdn ¶
func (spu *StorageProviderUpdate) SetNillableUseCdn(b *bool) *StorageProviderUpdate
SetNillableUseCdn sets the "use_cdn" field if the given value is not nil.
func (*StorageProviderUpdate) SetNotNilBucket ¶
func (sp *StorageProviderUpdate) SetNotNilBucket(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilCdnURL ¶
func (sp *StorageProviderUpdate) SetNotNilCdnURL(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilEndpoint ¶
func (sp *StorageProviderUpdate) SetNotNilEndpoint(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilFolder ¶
func (sp *StorageProviderUpdate) SetNotNilFolder(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilIsDefault ¶
func (sp *StorageProviderUpdate) SetNotNilIsDefault(value *bool) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilName ¶
func (sp *StorageProviderUpdate) SetNotNilName(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilRegion ¶
func (sp *StorageProviderUpdate) SetNotNilRegion(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilSecretID ¶
func (sp *StorageProviderUpdate) SetNotNilSecretID(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilSecretKey ¶
func (sp *StorageProviderUpdate) SetNotNilSecretKey(value *string) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilState ¶
func (sp *StorageProviderUpdate) SetNotNilState(value *bool) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilUpdatedAt ¶
func (sp *StorageProviderUpdate) SetNotNilUpdatedAt(value *time.Time) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetNotNilUseCdn ¶
func (sp *StorageProviderUpdate) SetNotNilUseCdn(value *bool) *StorageProviderUpdate
set field if value's pointer is not nil.
func (*StorageProviderUpdate) SetRegion ¶
func (spu *StorageProviderUpdate) SetRegion(s string) *StorageProviderUpdate
SetRegion sets the "region" field.
func (*StorageProviderUpdate) SetSecretID ¶
func (spu *StorageProviderUpdate) SetSecretID(s string) *StorageProviderUpdate
SetSecretID sets the "secret_id" field.
func (*StorageProviderUpdate) SetSecretKey ¶
func (spu *StorageProviderUpdate) SetSecretKey(s string) *StorageProviderUpdate
SetSecretKey sets the "secret_key" field.
func (*StorageProviderUpdate) SetState ¶
func (spu *StorageProviderUpdate) SetState(b bool) *StorageProviderUpdate
SetState sets the "state" field.
func (*StorageProviderUpdate) SetUpdatedAt ¶
func (spu *StorageProviderUpdate) SetUpdatedAt(t time.Time) *StorageProviderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*StorageProviderUpdate) SetUseCdn ¶
func (spu *StorageProviderUpdate) SetUseCdn(b bool) *StorageProviderUpdate
SetUseCdn sets the "use_cdn" field.
func (*StorageProviderUpdate) Where ¶
func (spu *StorageProviderUpdate) Where(ps ...predicate.StorageProvider) *StorageProviderUpdate
Where appends a list predicates to the StorageProviderUpdate builder.
type StorageProviderUpdateOne ¶
type StorageProviderUpdateOne struct {
// contains filtered or unexported fields
}
StorageProviderUpdateOne is the builder for updating a single StorageProvider entity.
func (*StorageProviderUpdateOne) AddCloudfileIDs ¶
func (spuo *StorageProviderUpdateOne) AddCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdateOne
AddCloudfileIDs adds the "cloudfiles" edge to the CloudFile entity by IDs.
func (*StorageProviderUpdateOne) AddCloudfiles ¶
func (spuo *StorageProviderUpdateOne) AddCloudfiles(c ...*CloudFile) *StorageProviderUpdateOne
AddCloudfiles adds the "cloudfiles" edges to the CloudFile entity.
func (*StorageProviderUpdateOne) ClearCdnURL ¶
func (spuo *StorageProviderUpdateOne) ClearCdnURL() *StorageProviderUpdateOne
ClearCdnURL clears the value of the "cdn_url" field.
func (*StorageProviderUpdateOne) ClearCloudfiles ¶
func (spuo *StorageProviderUpdateOne) ClearCloudfiles() *StorageProviderUpdateOne
ClearCloudfiles clears all "cloudfiles" edges to the CloudFile entity.
func (*StorageProviderUpdateOne) ClearFolder ¶
func (spuo *StorageProviderUpdateOne) ClearFolder() *StorageProviderUpdateOne
ClearFolder clears the value of the "folder" field.
func (*StorageProviderUpdateOne) ClearState ¶
func (spuo *StorageProviderUpdateOne) ClearState() *StorageProviderUpdateOne
ClearState clears the value of the "state" field.
func (*StorageProviderUpdateOne) Exec ¶
func (spuo *StorageProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StorageProviderUpdateOne) ExecContext ¶
func (c *StorageProviderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*StorageProviderUpdateOne) ExecX ¶
func (spuo *StorageProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageProviderUpdateOne) Mutation ¶
func (spuo *StorageProviderUpdateOne) Mutation() *StorageProviderMutation
Mutation returns the StorageProviderMutation object of the builder.
func (*StorageProviderUpdateOne) QueryContext ¶
func (c *StorageProviderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*StorageProviderUpdateOne) RemoveCloudfileIDs ¶
func (spuo *StorageProviderUpdateOne) RemoveCloudfileIDs(ids ...uuid.UUID) *StorageProviderUpdateOne
RemoveCloudfileIDs removes the "cloudfiles" edge to CloudFile entities by IDs.
func (*StorageProviderUpdateOne) RemoveCloudfiles ¶
func (spuo *StorageProviderUpdateOne) RemoveCloudfiles(c ...*CloudFile) *StorageProviderUpdateOne
RemoveCloudfiles removes "cloudfiles" edges to CloudFile entities.
func (*StorageProviderUpdateOne) Save ¶
func (spuo *StorageProviderUpdateOne) Save(ctx context.Context) (*StorageProvider, error)
Save executes the query and returns the updated StorageProvider entity.
func (*StorageProviderUpdateOne) SaveX ¶
func (spuo *StorageProviderUpdateOne) SaveX(ctx context.Context) *StorageProvider
SaveX is like Save, but panics if an error occurs.
func (*StorageProviderUpdateOne) Select ¶
func (spuo *StorageProviderUpdateOne) Select(field string, fields ...string) *StorageProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StorageProviderUpdateOne) SetBucket ¶
func (spuo *StorageProviderUpdateOne) SetBucket(s string) *StorageProviderUpdateOne
SetBucket sets the "bucket" field.
func (*StorageProviderUpdateOne) SetCdnURL ¶
func (spuo *StorageProviderUpdateOne) SetCdnURL(s string) *StorageProviderUpdateOne
SetCdnURL sets the "cdn_url" field.
func (*StorageProviderUpdateOne) SetEndpoint ¶
func (spuo *StorageProviderUpdateOne) SetEndpoint(s string) *StorageProviderUpdateOne
SetEndpoint sets the "endpoint" field.
func (*StorageProviderUpdateOne) SetFolder ¶
func (spuo *StorageProviderUpdateOne) SetFolder(s string) *StorageProviderUpdateOne
SetFolder sets the "folder" field.
func (*StorageProviderUpdateOne) SetIsDefault ¶
func (spuo *StorageProviderUpdateOne) SetIsDefault(b bool) *StorageProviderUpdateOne
SetIsDefault sets the "is_default" field.
func (*StorageProviderUpdateOne) SetName ¶
func (spuo *StorageProviderUpdateOne) SetName(s string) *StorageProviderUpdateOne
SetName sets the "name" field.
func (*StorageProviderUpdateOne) SetNillableBucket ¶
func (spuo *StorageProviderUpdateOne) SetNillableBucket(s *string) *StorageProviderUpdateOne
SetNillableBucket sets the "bucket" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableCdnURL ¶
func (spuo *StorageProviderUpdateOne) SetNillableCdnURL(s *string) *StorageProviderUpdateOne
SetNillableCdnURL sets the "cdn_url" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableEndpoint ¶
func (spuo *StorageProviderUpdateOne) SetNillableEndpoint(s *string) *StorageProviderUpdateOne
SetNillableEndpoint sets the "endpoint" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableFolder ¶
func (spuo *StorageProviderUpdateOne) SetNillableFolder(s *string) *StorageProviderUpdateOne
SetNillableFolder sets the "folder" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableIsDefault ¶
func (spuo *StorageProviderUpdateOne) SetNillableIsDefault(b *bool) *StorageProviderUpdateOne
SetNillableIsDefault sets the "is_default" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableName ¶
func (spuo *StorageProviderUpdateOne) SetNillableName(s *string) *StorageProviderUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableRegion ¶
func (spuo *StorageProviderUpdateOne) SetNillableRegion(s *string) *StorageProviderUpdateOne
SetNillableRegion sets the "region" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableSecretID ¶
func (spuo *StorageProviderUpdateOne) SetNillableSecretID(s *string) *StorageProviderUpdateOne
SetNillableSecretID sets the "secret_id" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableSecretKey ¶
func (spuo *StorageProviderUpdateOne) SetNillableSecretKey(s *string) *StorageProviderUpdateOne
SetNillableSecretKey sets the "secret_key" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableState ¶
func (spuo *StorageProviderUpdateOne) SetNillableState(b *bool) *StorageProviderUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNillableUseCdn ¶
func (spuo *StorageProviderUpdateOne) SetNillableUseCdn(b *bool) *StorageProviderUpdateOne
SetNillableUseCdn sets the "use_cdn" field if the given value is not nil.
func (*StorageProviderUpdateOne) SetNotNilBucket ¶
func (sp *StorageProviderUpdateOne) SetNotNilBucket(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilCdnURL ¶
func (sp *StorageProviderUpdateOne) SetNotNilCdnURL(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilEndpoint ¶
func (sp *StorageProviderUpdateOne) SetNotNilEndpoint(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilFolder ¶
func (sp *StorageProviderUpdateOne) SetNotNilFolder(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilIsDefault ¶
func (sp *StorageProviderUpdateOne) SetNotNilIsDefault(value *bool) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilName ¶
func (sp *StorageProviderUpdateOne) SetNotNilName(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilRegion ¶
func (sp *StorageProviderUpdateOne) SetNotNilRegion(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilSecretID ¶
func (sp *StorageProviderUpdateOne) SetNotNilSecretID(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilSecretKey ¶
func (sp *StorageProviderUpdateOne) SetNotNilSecretKey(value *string) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilState ¶
func (sp *StorageProviderUpdateOne) SetNotNilState(value *bool) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilUpdatedAt ¶
func (sp *StorageProviderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetNotNilUseCdn ¶
func (sp *StorageProviderUpdateOne) SetNotNilUseCdn(value *bool) *StorageProviderUpdateOne
set field if value's pointer is not nil.
func (*StorageProviderUpdateOne) SetRegion ¶
func (spuo *StorageProviderUpdateOne) SetRegion(s string) *StorageProviderUpdateOne
SetRegion sets the "region" field.
func (*StorageProviderUpdateOne) SetSecretID ¶
func (spuo *StorageProviderUpdateOne) SetSecretID(s string) *StorageProviderUpdateOne
SetSecretID sets the "secret_id" field.
func (*StorageProviderUpdateOne) SetSecretKey ¶
func (spuo *StorageProviderUpdateOne) SetSecretKey(s string) *StorageProviderUpdateOne
SetSecretKey sets the "secret_key" field.
func (*StorageProviderUpdateOne) SetState ¶
func (spuo *StorageProviderUpdateOne) SetState(b bool) *StorageProviderUpdateOne
SetState sets the "state" field.
func (*StorageProviderUpdateOne) SetUpdatedAt ¶
func (spuo *StorageProviderUpdateOne) SetUpdatedAt(t time.Time) *StorageProviderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*StorageProviderUpdateOne) SetUseCdn ¶
func (spuo *StorageProviderUpdateOne) SetUseCdn(b bool) *StorageProviderUpdateOne
SetUseCdn sets the "use_cdn" field.
func (*StorageProviderUpdateOne) Where ¶
func (spuo *StorageProviderUpdateOne) Where(ps ...predicate.StorageProvider) *StorageProviderUpdateOne
Where appends a list predicates to the StorageProviderUpdate builder.
type StorageProviders ¶
type StorageProviders []*StorageProvider
StorageProviders is a parsable slice of StorageProvider.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// CloudFile is the client for interacting with the CloudFile builders.
CloudFile *CloudFileClient
// CloudFileTag is the client for interacting with the CloudFileTag builders.
CloudFileTag *CloudFileTagClient
// File is the client for interacting with the File builders.
File *FileClient
// FileTag is the client for interacting with the FileTag builders.
FileTag *FileTagClient
// StorageProvider is the client for interacting with the StorageProvider builders.
StorageProvider *StorageProviderClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
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.
Source Files
¶
- client.go
- cloudfile.go
- cloudfile_create.go
- cloudfile_delete.go
- cloudfile_query.go
- cloudfile_update.go
- cloudfiletag.go
- cloudfiletag_create.go
- cloudfiletag_delete.go
- cloudfiletag_query.go
- cloudfiletag_update.go
- ent.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- filetag.go
- filetag_create.go
- filetag_delete.go
- filetag_query.go
- filetag_update.go
- generate.go
- mutation.go
- pagination.go
- runtime.go
- set_not_nil.go
- storageprovider.go
- storageprovider_create.go
- storageprovider_delete.go
- storageprovider_query.go
- storageprovider_update.go
- tx.go