Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- type Aggregate
- type Classroom
- type ClassroomClient
- func (c *ClassroomClient) Create() *ClassroomCreate
- func (c *ClassroomClient) Delete() *ClassroomDelete
- func (c *ClassroomClient) DeleteOne(cl *Classroom) *ClassroomDeleteOne
- func (c *ClassroomClient) DeleteOneID(id uint) *ClassroomDeleteOne
- func (c *ClassroomClient) Get(ctx context.Context, id uint) (*Classroom, error)
- func (c *ClassroomClient) GetX(ctx context.Context, id uint) *Classroom
- func (c *ClassroomClient) Hooks() []Hook
- func (c *ClassroomClient) Query() *ClassroomQuery
- func (c *ClassroomClient) QueryLevel(cl *Classroom) *LevelQuery
- func (c *ClassroomClient) QueryStudents(cl *Classroom) *UserQuery
- func (c *ClassroomClient) QueryTeacher(cl *Classroom) *UserQuery
- func (c *ClassroomClient) Update() *ClassroomUpdate
- func (c *ClassroomClient) UpdateOne(cl *Classroom) *ClassroomUpdateOne
- func (c *ClassroomClient) UpdateOneID(id uint) *ClassroomUpdateOne
- func (c *ClassroomClient) Use(hooks ...Hook)
- type ClassroomCreate
- func (cc *ClassroomCreate) AddStudentIDs(ids ...uint) *ClassroomCreate
- func (cc *ClassroomCreate) AddStudents(u ...*User) *ClassroomCreate
- func (cc *ClassroomCreate) Save(ctx context.Context) (*Classroom, error)
- func (cc *ClassroomCreate) SaveX(ctx context.Context) *Classroom
- func (cc *ClassroomCreate) SetCreatedAt(t time.Time) *ClassroomCreate
- func (cc *ClassroomCreate) SetID(u uint) *ClassroomCreate
- func (cc *ClassroomCreate) SetLevel(l *Level) *ClassroomCreate
- func (cc *ClassroomCreate) SetLevelID(id uint) *ClassroomCreate
- func (cc *ClassroomCreate) SetNillableCreatedAt(t *time.Time) *ClassroomCreate
- func (cc *ClassroomCreate) SetNillableLevelID(id *uint) *ClassroomCreate
- func (cc *ClassroomCreate) SetNillableUpdatedAt(t *time.Time) *ClassroomCreate
- func (cc *ClassroomCreate) SetTeacher(u *User) *ClassroomCreate
- func (cc *ClassroomCreate) SetTeacherID(id uint) *ClassroomCreate
- func (cc *ClassroomCreate) SetUpdatedAt(t time.Time) *ClassroomCreate
- type ClassroomDelete
- type ClassroomDeleteOne
- type ClassroomEdges
- type ClassroomGroupBy
- func (cgb *ClassroomGroupBy) Aggregate(fns ...Aggregate) *ClassroomGroupBy
- func (cgb *ClassroomGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cgb *ClassroomGroupBy) BoolsX(ctx context.Context) []bool
- func (cgb *ClassroomGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cgb *ClassroomGroupBy) Float64sX(ctx context.Context) []float64
- func (cgb *ClassroomGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cgb *ClassroomGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ClassroomGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cgb *ClassroomGroupBy) ScanX(ctx context.Context, v interface{})
- func (cgb *ClassroomGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cgb *ClassroomGroupBy) StringsX(ctx context.Context) []string
- type ClassroomMutation
- func (m *ClassroomMutation) AddField(name string, value ent.Value) error
- func (m *ClassroomMutation) AddStudentIDs(ids ...uint)
- func (m *ClassroomMutation) AddedEdges() []string
- func (m *ClassroomMutation) AddedField(name string) (ent.Value, bool)
- func (m *ClassroomMutation) AddedFields() []string
- func (m *ClassroomMutation) AddedIDs(name string) []ent.Value
- func (m *ClassroomMutation) ClearEdge(name string) error
- func (m *ClassroomMutation) ClearField(name string) error
- func (m *ClassroomMutation) ClearLevel()
- func (m *ClassroomMutation) ClearTeacher()
- func (m *ClassroomMutation) ClearedEdges() []string
- func (m *ClassroomMutation) ClearedFields() []string
- func (m ClassroomMutation) Client() *Client
- func (m *ClassroomMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ClassroomMutation) EdgeCleared(name string) bool
- func (m *ClassroomMutation) Field(name string) (ent.Value, bool)
- func (m *ClassroomMutation) FieldCleared(name string) bool
- func (m *ClassroomMutation) Fields() []string
- func (m *ClassroomMutation) ID() (id uint, exists bool)
- func (m *ClassroomMutation) LevelCleared() bool
- func (m *ClassroomMutation) LevelID() (id uint, exists bool)
- func (m *ClassroomMutation) LevelIDs() (ids []uint)
- func (m *ClassroomMutation) Op() Op
- func (m *ClassroomMutation) RemoveStudentIDs(ids ...uint)
- func (m *ClassroomMutation) RemovedEdges() []string
- func (m *ClassroomMutation) RemovedIDs(name string) []ent.Value
- func (m *ClassroomMutation) RemovedStudentsIDs() (ids []uint)
- func (m *ClassroomMutation) ResetCreatedAt()
- func (m *ClassroomMutation) ResetEdge(name string) error
- func (m *ClassroomMutation) ResetField(name string) error
- func (m *ClassroomMutation) ResetLevel()
- func (m *ClassroomMutation) ResetStudents()
- func (m *ClassroomMutation) ResetTeacher()
- func (m *ClassroomMutation) ResetUpdatedAt()
- func (m *ClassroomMutation) SetCreatedAt(t time.Time)
- func (m *ClassroomMutation) SetField(name string, value ent.Value) error
- func (m *ClassroomMutation) SetID(id uint)
- func (m *ClassroomMutation) SetLevelID(id uint)
- func (m *ClassroomMutation) SetTeacherID(id uint)
- func (m *ClassroomMutation) SetUpdatedAt(t time.Time)
- func (m *ClassroomMutation) StudentsIDs() (ids []uint)
- func (m *ClassroomMutation) TeacherCleared() bool
- func (m *ClassroomMutation) TeacherID() (id uint, exists bool)
- func (m *ClassroomMutation) TeacherIDs() (ids []uint)
- func (m ClassroomMutation) Tx() (*Tx, error)
- func (m *ClassroomMutation) Type() string
- func (m *ClassroomMutation) UpdatedAt() (r time.Time, exists bool)
- type ClassroomQuery
- func (cq *ClassroomQuery) All(ctx context.Context) ([]*Classroom, error)
- func (cq *ClassroomQuery) AllX(ctx context.Context) []*Classroom
- func (cq *ClassroomQuery) Clone() *ClassroomQuery
- func (cq *ClassroomQuery) Count(ctx context.Context) (int, error)
- func (cq *ClassroomQuery) CountX(ctx context.Context) int
- func (cq *ClassroomQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ClassroomQuery) ExistX(ctx context.Context) bool
- func (cq *ClassroomQuery) First(ctx context.Context) (*Classroom, error)
- func (cq *ClassroomQuery) FirstID(ctx context.Context) (id uint, err error)
- func (cq *ClassroomQuery) FirstX(ctx context.Context) *Classroom
- func (cq *ClassroomQuery) FirstXID(ctx context.Context) uint
- func (cq *ClassroomQuery) GroupBy(field string, fields ...string) *ClassroomGroupBy
- func (cq *ClassroomQuery) IDs(ctx context.Context) ([]uint, error)
- func (cq *ClassroomQuery) IDsX(ctx context.Context) []uint
- func (cq *ClassroomQuery) Limit(limit int) *ClassroomQuery
- func (cq *ClassroomQuery) Offset(offset int) *ClassroomQuery
- func (cq *ClassroomQuery) Only(ctx context.Context) (*Classroom, error)
- func (cq *ClassroomQuery) OnlyID(ctx context.Context) (id uint, err error)
- func (cq *ClassroomQuery) OnlyX(ctx context.Context) *Classroom
- func (cq *ClassroomQuery) OnlyXID(ctx context.Context) uint
- func (cq *ClassroomQuery) Order(o ...Order) *ClassroomQuery
- func (cq *ClassroomQuery) QueryLevel() *LevelQuery
- func (cq *ClassroomQuery) QueryStudents() *UserQuery
- func (cq *ClassroomQuery) QueryTeacher() *UserQuery
- func (cq *ClassroomQuery) Select(field string, fields ...string) *ClassroomSelect
- func (cq *ClassroomQuery) Where(ps ...predicate.Classroom) *ClassroomQuery
- func (cq *ClassroomQuery) WithLevel(opts ...func(*LevelQuery)) *ClassroomQuery
- func (cq *ClassroomQuery) WithStudents(opts ...func(*UserQuery)) *ClassroomQuery
- func (cq *ClassroomQuery) WithTeacher(opts ...func(*UserQuery)) *ClassroomQuery
- type ClassroomSelect
- func (cs *ClassroomSelect) Bools(ctx context.Context) ([]bool, error)
- func (cs *ClassroomSelect) BoolsX(ctx context.Context) []bool
- func (cs *ClassroomSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cs *ClassroomSelect) Float64sX(ctx context.Context) []float64
- func (cs *ClassroomSelect) Ints(ctx context.Context) ([]int, error)
- func (cs *ClassroomSelect) IntsX(ctx context.Context) []int
- func (cs *ClassroomSelect) Scan(ctx context.Context, v interface{}) error
- func (cs *ClassroomSelect) ScanX(ctx context.Context, v interface{})
- func (cs *ClassroomSelect) Strings(ctx context.Context) ([]string, error)
- func (cs *ClassroomSelect) StringsX(ctx context.Context) []string
- type ClassroomUpdate
- func (cu *ClassroomUpdate) AddStudentIDs(ids ...uint) *ClassroomUpdate
- func (cu *ClassroomUpdate) AddStudents(u ...*User) *ClassroomUpdate
- func (cu *ClassroomUpdate) ClearLevel() *ClassroomUpdate
- func (cu *ClassroomUpdate) ClearTeacher() *ClassroomUpdate
- func (cu *ClassroomUpdate) Exec(ctx context.Context) error
- func (cu *ClassroomUpdate) ExecX(ctx context.Context)
- func (cu *ClassroomUpdate) RemoveStudentIDs(ids ...uint) *ClassroomUpdate
- func (cu *ClassroomUpdate) RemoveStudents(u ...*User) *ClassroomUpdate
- func (cu *ClassroomUpdate) Save(ctx context.Context) (int, error)
- func (cu *ClassroomUpdate) SaveX(ctx context.Context) int
- func (cu *ClassroomUpdate) SetLevel(l *Level) *ClassroomUpdate
- func (cu *ClassroomUpdate) SetLevelID(id uint) *ClassroomUpdate
- func (cu *ClassroomUpdate) SetNillableLevelID(id *uint) *ClassroomUpdate
- func (cu *ClassroomUpdate) SetTeacher(u *User) *ClassroomUpdate
- func (cu *ClassroomUpdate) SetTeacherID(id uint) *ClassroomUpdate
- func (cu *ClassroomUpdate) SetUpdatedAt(t time.Time) *ClassroomUpdate
- func (cu *ClassroomUpdate) Where(ps ...predicate.Classroom) *ClassroomUpdate
- type ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) AddStudentIDs(ids ...uint) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) AddStudents(u ...*User) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) ClearLevel() *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) ClearTeacher() *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) Exec(ctx context.Context) error
- func (cuo *ClassroomUpdateOne) ExecX(ctx context.Context)
- func (cuo *ClassroomUpdateOne) RemoveStudentIDs(ids ...uint) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) RemoveStudents(u ...*User) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) Save(ctx context.Context) (*Classroom, error)
- func (cuo *ClassroomUpdateOne) SaveX(ctx context.Context) *Classroom
- func (cuo *ClassroomUpdateOne) SetLevel(l *Level) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) SetLevelID(id uint) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) SetNillableLevelID(id *uint) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) SetTeacher(u *User) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) SetTeacherID(id uint) *ClassroomUpdateOne
- func (cuo *ClassroomUpdateOne) SetUpdatedAt(t time.Time) *ClassroomUpdateOne
- type Classrooms
- type Client
- type ConstraintError
- type Credential
- type CredentialClient
- func (c *CredentialClient) Create() *CredentialCreate
- func (c *CredentialClient) Delete() *CredentialDelete
- func (c *CredentialClient) DeleteOne(cr *Credential) *CredentialDeleteOne
- func (c *CredentialClient) DeleteOneID(id int) *CredentialDeleteOne
- func (c *CredentialClient) Get(ctx context.Context, id int) (*Credential, error)
- func (c *CredentialClient) GetX(ctx context.Context, id int) *Credential
- func (c *CredentialClient) Hooks() []Hook
- func (c *CredentialClient) Query() *CredentialQuery
- func (c *CredentialClient) QueryHolder(cr *Credential) *UserQuery
- func (c *CredentialClient) Update() *CredentialUpdate
- func (c *CredentialClient) UpdateOne(cr *Credential) *CredentialUpdateOne
- func (c *CredentialClient) UpdateOneID(id int) *CredentialUpdateOne
- func (c *CredentialClient) Use(hooks ...Hook)
- type CredentialCreate
- func (cc *CredentialCreate) Save(ctx context.Context) (*Credential, error)
- func (cc *CredentialCreate) SaveX(ctx context.Context) *Credential
- func (cc *CredentialCreate) SetHolder(u *User) *CredentialCreate
- func (cc *CredentialCreate) SetHolderID(id uint) *CredentialCreate
- func (cc *CredentialCreate) SetPasswordHash(b []byte) *CredentialCreate
- func (cc *CredentialCreate) SetSalt(b []byte) *CredentialCreate
- type CredentialDelete
- type CredentialDeleteOne
- type CredentialEdges
- type CredentialGroupBy
- func (cgb *CredentialGroupBy) Aggregate(fns ...Aggregate) *CredentialGroupBy
- func (cgb *CredentialGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cgb *CredentialGroupBy) BoolsX(ctx context.Context) []bool
- func (cgb *CredentialGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cgb *CredentialGroupBy) Float64sX(ctx context.Context) []float64
- func (cgb *CredentialGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cgb *CredentialGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CredentialGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cgb *CredentialGroupBy) ScanX(ctx context.Context, v interface{})
- func (cgb *CredentialGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cgb *CredentialGroupBy) StringsX(ctx context.Context) []string
- type CredentialMutation
- func (m *CredentialMutation) AddField(name string, value ent.Value) error
- func (m *CredentialMutation) AddedEdges() []string
- func (m *CredentialMutation) AddedField(name string) (ent.Value, bool)
- func (m *CredentialMutation) AddedFields() []string
- func (m *CredentialMutation) AddedIDs(name string) []ent.Value
- func (m *CredentialMutation) ClearEdge(name string) error
- func (m *CredentialMutation) ClearField(name string) error
- func (m *CredentialMutation) ClearHolder()
- func (m *CredentialMutation) ClearedEdges() []string
- func (m *CredentialMutation) ClearedFields() []string
- func (m CredentialMutation) Client() *Client
- func (m *CredentialMutation) EdgeCleared(name string) bool
- func (m *CredentialMutation) Field(name string) (ent.Value, bool)
- func (m *CredentialMutation) FieldCleared(name string) bool
- func (m *CredentialMutation) Fields() []string
- func (m *CredentialMutation) HolderCleared() bool
- func (m *CredentialMutation) HolderID() (id uint, exists bool)
- func (m *CredentialMutation) HolderIDs() (ids []uint)
- func (m *CredentialMutation) ID() (id int, exists bool)
- func (m *CredentialMutation) Op() Op
- func (m *CredentialMutation) PasswordHash() (r []byte, exists bool)
- func (m *CredentialMutation) RemovedEdges() []string
- func (m *CredentialMutation) RemovedIDs(name string) []ent.Value
- func (m *CredentialMutation) ResetEdge(name string) error
- func (m *CredentialMutation) ResetField(name string) error
- func (m *CredentialMutation) ResetHolder()
- func (m *CredentialMutation) ResetPasswordHash()
- func (m *CredentialMutation) ResetSalt()
- func (m *CredentialMutation) Salt() (r []byte, exists bool)
- func (m *CredentialMutation) SetField(name string, value ent.Value) error
- func (m *CredentialMutation) SetHolderID(id uint)
- func (m *CredentialMutation) SetPasswordHash(b []byte)
- func (m *CredentialMutation) SetSalt(b []byte)
- func (m CredentialMutation) Tx() (*Tx, error)
- func (m *CredentialMutation) Type() string
- type CredentialQuery
- func (cq *CredentialQuery) All(ctx context.Context) ([]*Credential, error)
- func (cq *CredentialQuery) AllX(ctx context.Context) []*Credential
- func (cq *CredentialQuery) Clone() *CredentialQuery
- func (cq *CredentialQuery) Count(ctx context.Context) (int, error)
- func (cq *CredentialQuery) CountX(ctx context.Context) int
- func (cq *CredentialQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CredentialQuery) ExistX(ctx context.Context) bool
- func (cq *CredentialQuery) First(ctx context.Context) (*Credential, error)
- func (cq *CredentialQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CredentialQuery) FirstX(ctx context.Context) *Credential
- func (cq *CredentialQuery) FirstXID(ctx context.Context) int
- func (cq *CredentialQuery) GroupBy(field string, fields ...string) *CredentialGroupBy
- func (cq *CredentialQuery) IDs(ctx context.Context) ([]int, error)
- func (cq *CredentialQuery) IDsX(ctx context.Context) []int
- func (cq *CredentialQuery) Limit(limit int) *CredentialQuery
- func (cq *CredentialQuery) Offset(offset int) *CredentialQuery
- func (cq *CredentialQuery) Only(ctx context.Context) (*Credential, error)
- func (cq *CredentialQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CredentialQuery) OnlyX(ctx context.Context) *Credential
- func (cq *CredentialQuery) OnlyXID(ctx context.Context) int
- func (cq *CredentialQuery) Order(o ...Order) *CredentialQuery
- func (cq *CredentialQuery) QueryHolder() *UserQuery
- func (cq *CredentialQuery) Select(field string, fields ...string) *CredentialSelect
- func (cq *CredentialQuery) Where(ps ...predicate.Credential) *CredentialQuery
- func (cq *CredentialQuery) WithHolder(opts ...func(*UserQuery)) *CredentialQuery
- type CredentialSelect
- func (cs *CredentialSelect) Bools(ctx context.Context) ([]bool, error)
- func (cs *CredentialSelect) BoolsX(ctx context.Context) []bool
- func (cs *CredentialSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cs *CredentialSelect) Float64sX(ctx context.Context) []float64
- func (cs *CredentialSelect) Ints(ctx context.Context) ([]int, error)
- func (cs *CredentialSelect) IntsX(ctx context.Context) []int
- func (cs *CredentialSelect) Scan(ctx context.Context, v interface{}) error
- func (cs *CredentialSelect) ScanX(ctx context.Context, v interface{})
- func (cs *CredentialSelect) Strings(ctx context.Context) ([]string, error)
- func (cs *CredentialSelect) StringsX(ctx context.Context) []string
- type CredentialUpdate
- func (cu *CredentialUpdate) ClearHolder() *CredentialUpdate
- func (cu *CredentialUpdate) Exec(ctx context.Context) error
- func (cu *CredentialUpdate) ExecX(ctx context.Context)
- func (cu *CredentialUpdate) Save(ctx context.Context) (int, error)
- func (cu *CredentialUpdate) SaveX(ctx context.Context) int
- func (cu *CredentialUpdate) SetHolder(u *User) *CredentialUpdate
- func (cu *CredentialUpdate) SetHolderID(id uint) *CredentialUpdate
- func (cu *CredentialUpdate) SetPasswordHash(b []byte) *CredentialUpdate
- func (cu *CredentialUpdate) Where(ps ...predicate.Credential) *CredentialUpdate
- type CredentialUpdateOne
- func (cuo *CredentialUpdateOne) ClearHolder() *CredentialUpdateOne
- func (cuo *CredentialUpdateOne) Exec(ctx context.Context) error
- func (cuo *CredentialUpdateOne) ExecX(ctx context.Context)
- func (cuo *CredentialUpdateOne) Save(ctx context.Context) (*Credential, error)
- func (cuo *CredentialUpdateOne) SaveX(ctx context.Context) *Credential
- func (cuo *CredentialUpdateOne) SetHolder(u *User) *CredentialUpdateOne
- func (cuo *CredentialUpdateOne) SetHolderID(id uint) *CredentialUpdateOne
- func (cuo *CredentialUpdateOne) SetPasswordHash(b []byte) *CredentialUpdateOne
- type Credentials
- type Hook
- type Level
- type LevelClient
- func (c *LevelClient) Create() *LevelCreate
- func (c *LevelClient) Delete() *LevelDelete
- func (c *LevelClient) DeleteOne(l *Level) *LevelDeleteOne
- func (c *LevelClient) DeleteOneID(id uint) *LevelDeleteOne
- func (c *LevelClient) Get(ctx context.Context, id uint) (*Level, error)
- func (c *LevelClient) GetX(ctx context.Context, id uint) *Level
- func (c *LevelClient) Hooks() []Hook
- func (c *LevelClient) Query() *LevelQuery
- func (c *LevelClient) Update() *LevelUpdate
- func (c *LevelClient) UpdateOne(l *Level) *LevelUpdateOne
- func (c *LevelClient) UpdateOneID(id uint) *LevelUpdateOne
- func (c *LevelClient) Use(hooks ...Hook)
- type LevelCreate
- func (lc *LevelCreate) Save(ctx context.Context) (*Level, error)
- func (lc *LevelCreate) SaveX(ctx context.Context) *Level
- func (lc *LevelCreate) SetCreatedAt(t time.Time) *LevelCreate
- func (lc *LevelCreate) SetDefinition(sd *schema.LevelDefinition) *LevelCreate
- func (lc *LevelCreate) SetDescription(s string) *LevelCreate
- func (lc *LevelCreate) SetID(u uint) *LevelCreate
- func (lc *LevelCreate) SetName(s string) *LevelCreate
- func (lc *LevelCreate) SetNillableCreatedAt(t *time.Time) *LevelCreate
- func (lc *LevelCreate) SetNillableUpdatedAt(t *time.Time) *LevelCreate
- func (lc *LevelCreate) SetUpdatedAt(t time.Time) *LevelCreate
- type LevelDelete
- type LevelDeleteOne
- type LevelGroupBy
- func (lgb *LevelGroupBy) Aggregate(fns ...Aggregate) *LevelGroupBy
- func (lgb *LevelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (lgb *LevelGroupBy) BoolsX(ctx context.Context) []bool
- func (lgb *LevelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (lgb *LevelGroupBy) Float64sX(ctx context.Context) []float64
- func (lgb *LevelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (lgb *LevelGroupBy) IntsX(ctx context.Context) []int
- func (lgb *LevelGroupBy) Scan(ctx context.Context, v interface{}) error
- func (lgb *LevelGroupBy) ScanX(ctx context.Context, v interface{})
- func (lgb *LevelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (lgb *LevelGroupBy) StringsX(ctx context.Context) []string
- type LevelMutation
- func (m *LevelMutation) AddField(name string, value ent.Value) error
- func (m *LevelMutation) AddedEdges() []string
- func (m *LevelMutation) AddedField(name string) (ent.Value, bool)
- func (m *LevelMutation) AddedFields() []string
- func (m *LevelMutation) AddedIDs(name string) []ent.Value
- func (m *LevelMutation) ClearEdge(name string) error
- func (m *LevelMutation) ClearField(name string) error
- func (m *LevelMutation) ClearedEdges() []string
- func (m *LevelMutation) ClearedFields() []string
- func (m LevelMutation) Client() *Client
- func (m *LevelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *LevelMutation) Definition() (r *schema.LevelDefinition, exists bool)
- func (m *LevelMutation) Description() (r string, exists bool)
- func (m *LevelMutation) EdgeCleared(name string) bool
- func (m *LevelMutation) Field(name string) (ent.Value, bool)
- func (m *LevelMutation) FieldCleared(name string) bool
- func (m *LevelMutation) Fields() []string
- func (m *LevelMutation) ID() (id uint, exists bool)
- func (m *LevelMutation) Name() (r string, exists bool)
- func (m *LevelMutation) Op() Op
- func (m *LevelMutation) RemovedEdges() []string
- func (m *LevelMutation) RemovedIDs(name string) []ent.Value
- func (m *LevelMutation) ResetCreatedAt()
- func (m *LevelMutation) ResetDefinition()
- func (m *LevelMutation) ResetDescription()
- func (m *LevelMutation) ResetEdge(name string) error
- func (m *LevelMutation) ResetField(name string) error
- func (m *LevelMutation) ResetName()
- func (m *LevelMutation) ResetUpdatedAt()
- func (m *LevelMutation) SetCreatedAt(t time.Time)
- func (m *LevelMutation) SetDefinition(sd *schema.LevelDefinition)
- func (m *LevelMutation) SetDescription(s string)
- func (m *LevelMutation) SetField(name string, value ent.Value) error
- func (m *LevelMutation) SetID(id uint)
- func (m *LevelMutation) SetName(s string)
- func (m *LevelMutation) SetUpdatedAt(t time.Time)
- func (m LevelMutation) Tx() (*Tx, error)
- func (m *LevelMutation) Type() string
- func (m *LevelMutation) UpdatedAt() (r time.Time, exists bool)
- type LevelQuery
- func (lq *LevelQuery) All(ctx context.Context) ([]*Level, error)
- func (lq *LevelQuery) AllX(ctx context.Context) []*Level
- func (lq *LevelQuery) Clone() *LevelQuery
- func (lq *LevelQuery) Count(ctx context.Context) (int, error)
- func (lq *LevelQuery) CountX(ctx context.Context) int
- func (lq *LevelQuery) Exist(ctx context.Context) (bool, error)
- func (lq *LevelQuery) ExistX(ctx context.Context) bool
- func (lq *LevelQuery) First(ctx context.Context) (*Level, error)
- func (lq *LevelQuery) FirstID(ctx context.Context) (id uint, err error)
- func (lq *LevelQuery) FirstX(ctx context.Context) *Level
- func (lq *LevelQuery) FirstXID(ctx context.Context) uint
- func (lq *LevelQuery) GroupBy(field string, fields ...string) *LevelGroupBy
- func (lq *LevelQuery) IDs(ctx context.Context) ([]uint, error)
- func (lq *LevelQuery) IDsX(ctx context.Context) []uint
- func (lq *LevelQuery) Limit(limit int) *LevelQuery
- func (lq *LevelQuery) Offset(offset int) *LevelQuery
- func (lq *LevelQuery) Only(ctx context.Context) (*Level, error)
- func (lq *LevelQuery) OnlyID(ctx context.Context) (id uint, err error)
- func (lq *LevelQuery) OnlyX(ctx context.Context) *Level
- func (lq *LevelQuery) OnlyXID(ctx context.Context) uint
- func (lq *LevelQuery) Order(o ...Order) *LevelQuery
- func (lq *LevelQuery) Select(field string, fields ...string) *LevelSelect
- func (lq *LevelQuery) Where(ps ...predicate.Level) *LevelQuery
- type LevelSelect
- func (ls *LevelSelect) Bools(ctx context.Context) ([]bool, error)
- func (ls *LevelSelect) BoolsX(ctx context.Context) []bool
- func (ls *LevelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ls *LevelSelect) Float64sX(ctx context.Context) []float64
- func (ls *LevelSelect) Ints(ctx context.Context) ([]int, error)
- func (ls *LevelSelect) IntsX(ctx context.Context) []int
- func (ls *LevelSelect) Scan(ctx context.Context, v interface{}) error
- func (ls *LevelSelect) ScanX(ctx context.Context, v interface{})
- func (ls *LevelSelect) Strings(ctx context.Context) ([]string, error)
- func (ls *LevelSelect) StringsX(ctx context.Context) []string
- type LevelUpdate
- func (lu *LevelUpdate) Exec(ctx context.Context) error
- func (lu *LevelUpdate) ExecX(ctx context.Context)
- func (lu *LevelUpdate) Save(ctx context.Context) (int, error)
- func (lu *LevelUpdate) SaveX(ctx context.Context) int
- func (lu *LevelUpdate) SetDefinition(sd *schema.LevelDefinition) *LevelUpdate
- func (lu *LevelUpdate) SetDescription(s string) *LevelUpdate
- func (lu *LevelUpdate) SetName(s string) *LevelUpdate
- func (lu *LevelUpdate) SetUpdatedAt(t time.Time) *LevelUpdate
- func (lu *LevelUpdate) Where(ps ...predicate.Level) *LevelUpdate
- type LevelUpdateOne
- func (luo *LevelUpdateOne) Exec(ctx context.Context) error
- func (luo *LevelUpdateOne) ExecX(ctx context.Context)
- func (luo *LevelUpdateOne) Save(ctx context.Context) (*Level, error)
- func (luo *LevelUpdateOne) SaveX(ctx context.Context) *Level
- func (luo *LevelUpdateOne) SetDefinition(sd *schema.LevelDefinition) *LevelUpdateOne
- func (luo *LevelUpdateOne) SetDescription(s string) *LevelUpdateOne
- func (luo *LevelUpdateOne) SetName(s string) *LevelUpdateOne
- func (luo *LevelUpdateOne) SetUpdatedAt(t time.Time) *LevelUpdateOne
- type Levels
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- type Query
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uint) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uint) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryCredentials(u *User) *CredentialQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetCredentials(c *Credential) *UserCreate
- func (uc *UserCreate) SetCredentialsID(id int) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetID(u uint) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableCredentialsID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetSurname(s string) *UserCreate
- func (uc *UserCreate) SetType(u user.Type) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...Aggregate) *UserGroupBy
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserLevel
- type UserLevelClient
- func (c *UserLevelClient) Create() *UserLevelCreate
- func (c *UserLevelClient) Delete() *UserLevelDelete
- func (c *UserLevelClient) DeleteOne(ul *UserLevel) *UserLevelDeleteOne
- func (c *UserLevelClient) DeleteOneID(id int) *UserLevelDeleteOne
- func (c *UserLevelClient) Get(ctx context.Context, id int) (*UserLevel, error)
- func (c *UserLevelClient) GetX(ctx context.Context, id int) *UserLevel
- func (c *UserLevelClient) Hooks() []Hook
- func (c *UserLevelClient) Query() *UserLevelQuery
- func (c *UserLevelClient) QueryDeveloper(ul *UserLevel) *UserQuery
- func (c *UserLevelClient) QueryLevel(ul *UserLevel) *LevelQuery
- func (c *UserLevelClient) Update() *UserLevelUpdate
- func (c *UserLevelClient) UpdateOne(ul *UserLevel) *UserLevelUpdateOne
- func (c *UserLevelClient) UpdateOneID(id int) *UserLevelUpdateOne
- func (c *UserLevelClient) Use(hooks ...Hook)
- type UserLevelCreate
- func (ulc *UserLevelCreate) Save(ctx context.Context) (*UserLevel, error)
- func (ulc *UserLevelCreate) SaveX(ctx context.Context) *UserLevel
- func (ulc *UserLevelCreate) SetCode(s string) *UserLevelCreate
- func (ulc *UserLevelCreate) SetCreatedAt(t time.Time) *UserLevelCreate
- func (ulc *UserLevelCreate) SetDeveloper(u *User) *UserLevelCreate
- func (ulc *UserLevelCreate) SetDeveloperID(id uint) *UserLevelCreate
- func (ulc *UserLevelCreate) SetLevel(l *Level) *UserLevelCreate
- func (ulc *UserLevelCreate) SetLevelID(id uint) *UserLevelCreate
- func (ulc *UserLevelCreate) SetNillableCreatedAt(t *time.Time) *UserLevelCreate
- func (ulc *UserLevelCreate) SetNillableUpdatedAt(t *time.Time) *UserLevelCreate
- func (ulc *UserLevelCreate) SetUpdatedAt(t time.Time) *UserLevelCreate
- func (ulc *UserLevelCreate) SetWorkspace(s string) *UserLevelCreate
- type UserLevelDelete
- type UserLevelDeleteOne
- type UserLevelEdges
- type UserLevelGroupBy
- func (ulgb *UserLevelGroupBy) Aggregate(fns ...Aggregate) *UserLevelGroupBy
- func (ulgb *UserLevelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ulgb *UserLevelGroupBy) BoolsX(ctx context.Context) []bool
- func (ulgb *UserLevelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ulgb *UserLevelGroupBy) Float64sX(ctx context.Context) []float64
- func (ulgb *UserLevelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ulgb *UserLevelGroupBy) IntsX(ctx context.Context) []int
- func (ulgb *UserLevelGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ulgb *UserLevelGroupBy) ScanX(ctx context.Context, v interface{})
- func (ulgb *UserLevelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ulgb *UserLevelGroupBy) StringsX(ctx context.Context) []string
- type UserLevelMutation
- func (m *UserLevelMutation) AddField(name string, value ent.Value) error
- func (m *UserLevelMutation) AddedEdges() []string
- func (m *UserLevelMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserLevelMutation) AddedFields() []string
- func (m *UserLevelMutation) AddedIDs(name string) []ent.Value
- func (m *UserLevelMutation) ClearDeveloper()
- func (m *UserLevelMutation) ClearEdge(name string) error
- func (m *UserLevelMutation) ClearField(name string) error
- func (m *UserLevelMutation) ClearLevel()
- func (m *UserLevelMutation) ClearedEdges() []string
- func (m *UserLevelMutation) ClearedFields() []string
- func (m UserLevelMutation) Client() *Client
- func (m *UserLevelMutation) Code() (r string, exists bool)
- func (m *UserLevelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserLevelMutation) DeveloperCleared() bool
- func (m *UserLevelMutation) DeveloperID() (id uint, exists bool)
- func (m *UserLevelMutation) DeveloperIDs() (ids []uint)
- func (m *UserLevelMutation) EdgeCleared(name string) bool
- func (m *UserLevelMutation) Field(name string) (ent.Value, bool)
- func (m *UserLevelMutation) FieldCleared(name string) bool
- func (m *UserLevelMutation) Fields() []string
- func (m *UserLevelMutation) ID() (id int, exists bool)
- func (m *UserLevelMutation) LevelCleared() bool
- func (m *UserLevelMutation) LevelID() (id uint, exists bool)
- func (m *UserLevelMutation) LevelIDs() (ids []uint)
- func (m *UserLevelMutation) Op() Op
- func (m *UserLevelMutation) RemovedEdges() []string
- func (m *UserLevelMutation) RemovedIDs(name string) []ent.Value
- func (m *UserLevelMutation) ResetCode()
- func (m *UserLevelMutation) ResetCreatedAt()
- func (m *UserLevelMutation) ResetDeveloper()
- func (m *UserLevelMutation) ResetEdge(name string) error
- func (m *UserLevelMutation) ResetField(name string) error
- func (m *UserLevelMutation) ResetLevel()
- func (m *UserLevelMutation) ResetUpdatedAt()
- func (m *UserLevelMutation) ResetWorkspace()
- func (m *UserLevelMutation) SetCode(s string)
- func (m *UserLevelMutation) SetCreatedAt(t time.Time)
- func (m *UserLevelMutation) SetDeveloperID(id uint)
- func (m *UserLevelMutation) SetField(name string, value ent.Value) error
- func (m *UserLevelMutation) SetLevelID(id uint)
- func (m *UserLevelMutation) SetUpdatedAt(t time.Time)
- func (m *UserLevelMutation) SetWorkspace(s string)
- func (m UserLevelMutation) Tx() (*Tx, error)
- func (m *UserLevelMutation) Type() string
- func (m *UserLevelMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserLevelMutation) Workspace() (r string, exists bool)
- type UserLevelQuery
- func (ulq *UserLevelQuery) All(ctx context.Context) ([]*UserLevel, error)
- func (ulq *UserLevelQuery) AllX(ctx context.Context) []*UserLevel
- func (ulq *UserLevelQuery) Clone() *UserLevelQuery
- func (ulq *UserLevelQuery) Count(ctx context.Context) (int, error)
- func (ulq *UserLevelQuery) CountX(ctx context.Context) int
- func (ulq *UserLevelQuery) Exist(ctx context.Context) (bool, error)
- func (ulq *UserLevelQuery) ExistX(ctx context.Context) bool
- func (ulq *UserLevelQuery) First(ctx context.Context) (*UserLevel, error)
- func (ulq *UserLevelQuery) FirstID(ctx context.Context) (id int, err error)
- func (ulq *UserLevelQuery) FirstX(ctx context.Context) *UserLevel
- func (ulq *UserLevelQuery) FirstXID(ctx context.Context) int
- func (ulq *UserLevelQuery) GroupBy(field string, fields ...string) *UserLevelGroupBy
- func (ulq *UserLevelQuery) IDs(ctx context.Context) ([]int, error)
- func (ulq *UserLevelQuery) IDsX(ctx context.Context) []int
- func (ulq *UserLevelQuery) Limit(limit int) *UserLevelQuery
- func (ulq *UserLevelQuery) Offset(offset int) *UserLevelQuery
- func (ulq *UserLevelQuery) Only(ctx context.Context) (*UserLevel, error)
- func (ulq *UserLevelQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ulq *UserLevelQuery) OnlyX(ctx context.Context) *UserLevel
- func (ulq *UserLevelQuery) OnlyXID(ctx context.Context) int
- func (ulq *UserLevelQuery) Order(o ...Order) *UserLevelQuery
- func (ulq *UserLevelQuery) QueryDeveloper() *UserQuery
- func (ulq *UserLevelQuery) QueryLevel() *LevelQuery
- func (ulq *UserLevelQuery) Select(field string, fields ...string) *UserLevelSelect
- func (ulq *UserLevelQuery) Where(ps ...predicate.UserLevel) *UserLevelQuery
- func (ulq *UserLevelQuery) WithDeveloper(opts ...func(*UserQuery)) *UserLevelQuery
- func (ulq *UserLevelQuery) WithLevel(opts ...func(*LevelQuery)) *UserLevelQuery
- type UserLevelSelect
- func (uls *UserLevelSelect) Bools(ctx context.Context) ([]bool, error)
- func (uls *UserLevelSelect) BoolsX(ctx context.Context) []bool
- func (uls *UserLevelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uls *UserLevelSelect) Float64sX(ctx context.Context) []float64
- func (uls *UserLevelSelect) Ints(ctx context.Context) ([]int, error)
- func (uls *UserLevelSelect) IntsX(ctx context.Context) []int
- func (uls *UserLevelSelect) Scan(ctx context.Context, v interface{}) error
- func (uls *UserLevelSelect) ScanX(ctx context.Context, v interface{})
- func (uls *UserLevelSelect) Strings(ctx context.Context) ([]string, error)
- func (uls *UserLevelSelect) StringsX(ctx context.Context) []string
- type UserLevelUpdate
- func (ulu *UserLevelUpdate) ClearDeveloper() *UserLevelUpdate
- func (ulu *UserLevelUpdate) ClearLevel() *UserLevelUpdate
- func (ulu *UserLevelUpdate) Exec(ctx context.Context) error
- func (ulu *UserLevelUpdate) ExecX(ctx context.Context)
- func (ulu *UserLevelUpdate) Save(ctx context.Context) (int, error)
- func (ulu *UserLevelUpdate) SaveX(ctx context.Context) int
- func (ulu *UserLevelUpdate) SetCode(s string) *UserLevelUpdate
- func (ulu *UserLevelUpdate) SetDeveloper(u *User) *UserLevelUpdate
- func (ulu *UserLevelUpdate) SetDeveloperID(id uint) *UserLevelUpdate
- func (ulu *UserLevelUpdate) SetLevel(l *Level) *UserLevelUpdate
- func (ulu *UserLevelUpdate) SetLevelID(id uint) *UserLevelUpdate
- func (ulu *UserLevelUpdate) SetUpdatedAt(t time.Time) *UserLevelUpdate
- func (ulu *UserLevelUpdate) SetWorkspace(s string) *UserLevelUpdate
- func (ulu *UserLevelUpdate) Where(ps ...predicate.UserLevel) *UserLevelUpdate
- type UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) ClearDeveloper() *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) ClearLevel() *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) Exec(ctx context.Context) error
- func (uluo *UserLevelUpdateOne) ExecX(ctx context.Context)
- func (uluo *UserLevelUpdateOne) Save(ctx context.Context) (*UserLevel, error)
- func (uluo *UserLevelUpdateOne) SaveX(ctx context.Context) *UserLevel
- func (uluo *UserLevelUpdateOne) SetCode(s string) *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) SetDeveloper(u *User) *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) SetDeveloperID(id uint) *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) SetLevel(l *Level) *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) SetLevelID(id uint) *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) SetUpdatedAt(t time.Time) *UserLevelUpdateOne
- func (uluo *UserLevelUpdateOne) SetWorkspace(s string) *UserLevelUpdateOne
- type UserLevels
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearCredentials()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) CredentialsCleared() bool
- func (m *UserMutation) CredentialsID() (id int, exists bool)
- func (m *UserMutation) CredentialsIDs() (ids []int)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) GetType() (r user.Type, exists bool)
- func (m *UserMutation) ID() (id uint, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetCredentials()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetSurname()
- func (m *UserMutation) ResetType()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetCredentialsID(id int)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uint)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetSurname(s string)
- func (m *UserMutation) SetType(u user.Type)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) Surname() (r string, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uint, err error)
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) FirstXID(ctx context.Context) uint
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]uint, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uint, err error)
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) OnlyXID(ctx context.Context) uint
- func (uq *UserQuery) Order(o ...Order) *UserQuery
- func (uq *UserQuery) QueryCredentials() *CredentialQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithCredentials(opts ...func(*CredentialQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) ClearCredentials() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCredentials(c *Credential) *UserUpdate
- func (uu *UserUpdate) SetCredentialsID(id int) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableCredentialsID(id *int) *UserUpdate
- func (uu *UserUpdate) SetSurname(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) ClearCredentials() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetCredentials(c *Credential) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCredentialsID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCredentialsID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSurname(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- type Users
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeClassroom = "Classroom" TypeCredential = "Credential" TypeLevel = "Level" TypeUser = "User" TypeUserLevel = "UserLevel" )
Variables ¶
This section is empty.
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.
Types ¶
type Aggregate ¶
Aggregate applies an aggregation step on the group-by traversal/selector.
func As ¶
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
type Classroom ¶
type Classroom struct { // ID of the ent. ID uint `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ClassroomQuery when eager-loading is set. Edges ClassroomEdges `json:"edges"` // contains filtered or unexported fields }
Classroom is the model entity for the Classroom schema.
func (*Classroom) QueryLevel ¶
func (c *Classroom) QueryLevel() *LevelQuery
QueryLevel queries the level edge of the Classroom.
func (*Classroom) QueryStudents ¶
QueryStudents queries the students edge of the Classroom.
func (*Classroom) QueryTeacher ¶
QueryTeacher queries the teacher edge of the Classroom.
func (*Classroom) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Classroom) Update ¶
func (c *Classroom) Update() *ClassroomUpdateOne
Update returns a builder for updating this Classroom. Note that, you need to call Classroom.Unwrap() before calling this method, if this Classroom was returned from a transaction, and the transaction was committed or rolled back.
type ClassroomClient ¶
type ClassroomClient struct {
// contains filtered or unexported fields
}
ClassroomClient is a client for the Classroom schema.
func NewClassroomClient ¶
func NewClassroomClient(c config) *ClassroomClient
NewClassroomClient returns a client for the Classroom from the given config.
func (*ClassroomClient) Create ¶
func (c *ClassroomClient) Create() *ClassroomCreate
Create returns a create builder for Classroom.
func (*ClassroomClient) Delete ¶
func (c *ClassroomClient) Delete() *ClassroomDelete
Delete returns a delete builder for Classroom.
func (*ClassroomClient) DeleteOne ¶
func (c *ClassroomClient) DeleteOne(cl *Classroom) *ClassroomDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ClassroomClient) DeleteOneID ¶
func (c *ClassroomClient) DeleteOneID(id uint) *ClassroomDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ClassroomClient) GetX ¶
func (c *ClassroomClient) GetX(ctx context.Context, id uint) *Classroom
GetX is like Get, but panics if an error occurs.
func (*ClassroomClient) Hooks ¶
func (c *ClassroomClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ClassroomClient) Query ¶
func (c *ClassroomClient) Query() *ClassroomQuery
Create returns a query builder for Classroom.
func (*ClassroomClient) QueryLevel ¶
func (c *ClassroomClient) QueryLevel(cl *Classroom) *LevelQuery
QueryLevel queries the level edge of a Classroom.
func (*ClassroomClient) QueryStudents ¶
func (c *ClassroomClient) QueryStudents(cl *Classroom) *UserQuery
QueryStudents queries the students edge of a Classroom.
func (*ClassroomClient) QueryTeacher ¶
func (c *ClassroomClient) QueryTeacher(cl *Classroom) *UserQuery
QueryTeacher queries the teacher edge of a Classroom.
func (*ClassroomClient) Update ¶
func (c *ClassroomClient) Update() *ClassroomUpdate
Update returns an update builder for Classroom.
func (*ClassroomClient) UpdateOne ¶
func (c *ClassroomClient) UpdateOne(cl *Classroom) *ClassroomUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ClassroomClient) UpdateOneID ¶
func (c *ClassroomClient) UpdateOneID(id uint) *ClassroomUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ClassroomClient) Use ¶
func (c *ClassroomClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `classroom.Hooks(f(g(h())))`.
type ClassroomCreate ¶
type ClassroomCreate struct {
// contains filtered or unexported fields
}
ClassroomCreate is the builder for creating a Classroom entity.
func (*ClassroomCreate) AddStudentIDs ¶
func (cc *ClassroomCreate) AddStudentIDs(ids ...uint) *ClassroomCreate
AddStudentIDs adds the students edge to User by ids.
func (*ClassroomCreate) AddStudents ¶
func (cc *ClassroomCreate) AddStudents(u ...*User) *ClassroomCreate
AddStudents adds the students edges to User.
func (*ClassroomCreate) Save ¶
func (cc *ClassroomCreate) Save(ctx context.Context) (*Classroom, error)
Save creates the Classroom in the database.
func (*ClassroomCreate) SaveX ¶
func (cc *ClassroomCreate) SaveX(ctx context.Context) *Classroom
SaveX calls Save and panics if Save returns an error.
func (*ClassroomCreate) SetCreatedAt ¶
func (cc *ClassroomCreate) SetCreatedAt(t time.Time) *ClassroomCreate
SetCreatedAt sets the created_at field.
func (*ClassroomCreate) SetID ¶
func (cc *ClassroomCreate) SetID(u uint) *ClassroomCreate
SetID sets the id field.
func (*ClassroomCreate) SetLevel ¶
func (cc *ClassroomCreate) SetLevel(l *Level) *ClassroomCreate
SetLevel sets the level edge to Level.
func (*ClassroomCreate) SetLevelID ¶
func (cc *ClassroomCreate) SetLevelID(id uint) *ClassroomCreate
SetLevelID sets the level edge to Level by id.
func (*ClassroomCreate) SetNillableCreatedAt ¶
func (cc *ClassroomCreate) SetNillableCreatedAt(t *time.Time) *ClassroomCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*ClassroomCreate) SetNillableLevelID ¶
func (cc *ClassroomCreate) SetNillableLevelID(id *uint) *ClassroomCreate
SetNillableLevelID sets the level edge to Level by id if the given value is not nil.
func (*ClassroomCreate) SetNillableUpdatedAt ¶
func (cc *ClassroomCreate) SetNillableUpdatedAt(t *time.Time) *ClassroomCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*ClassroomCreate) SetTeacher ¶
func (cc *ClassroomCreate) SetTeacher(u *User) *ClassroomCreate
SetTeacher sets the teacher edge to User.
func (*ClassroomCreate) SetTeacherID ¶
func (cc *ClassroomCreate) SetTeacherID(id uint) *ClassroomCreate
SetTeacherID sets the teacher edge to User by id.
func (*ClassroomCreate) SetUpdatedAt ¶
func (cc *ClassroomCreate) SetUpdatedAt(t time.Time) *ClassroomCreate
SetUpdatedAt sets the updated_at field.
type ClassroomDelete ¶
type ClassroomDelete struct {
// contains filtered or unexported fields
}
ClassroomDelete is the builder for deleting a Classroom entity.
func (*ClassroomDelete) Exec ¶
func (cd *ClassroomDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ClassroomDelete) ExecX ¶
func (cd *ClassroomDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ClassroomDelete) Where ¶
func (cd *ClassroomDelete) Where(ps ...predicate.Classroom) *ClassroomDelete
Where adds a new predicate to the delete builder.
type ClassroomDeleteOne ¶
type ClassroomDeleteOne struct {
// contains filtered or unexported fields
}
ClassroomDeleteOne is the builder for deleting a single Classroom entity.
func (*ClassroomDeleteOne) Exec ¶
func (cdo *ClassroomDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ClassroomDeleteOne) ExecX ¶
func (cdo *ClassroomDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ClassroomEdges ¶
type ClassroomEdges struct { // Teacher holds the value of the teacher edge. Teacher *User // Students holds the value of the students edge. Students []*User // Level holds the value of the level edge. Level *Level // contains filtered or unexported fields }
ClassroomEdges holds the relations/edges for other nodes in the graph.
func (ClassroomEdges) LevelOrErr ¶
func (e ClassroomEdges) LevelOrErr() (*Level, error)
LevelOrErr returns the Level value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ClassroomEdges) StudentsOrErr ¶
func (e ClassroomEdges) StudentsOrErr() ([]*User, error)
StudentsOrErr returns the Students value or an error if the edge was not loaded in eager-loading.
func (ClassroomEdges) TeacherOrErr ¶
func (e ClassroomEdges) TeacherOrErr() (*User, error)
TeacherOrErr returns the Teacher value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ClassroomGroupBy ¶
type ClassroomGroupBy struct {
// contains filtered or unexported fields
}
ClassroomGroupBy is the builder for group-by Classroom entities.
func (*ClassroomGroupBy) Aggregate ¶
func (cgb *ClassroomGroupBy) Aggregate(fns ...Aggregate) *ClassroomGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ClassroomGroupBy) Bools ¶
func (cgb *ClassroomGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*ClassroomGroupBy) BoolsX ¶
func (cgb *ClassroomGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ClassroomGroupBy) Float64s ¶
func (cgb *ClassroomGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*ClassroomGroupBy) Float64sX ¶
func (cgb *ClassroomGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ClassroomGroupBy) Ints ¶
func (cgb *ClassroomGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*ClassroomGroupBy) IntsX ¶
func (cgb *ClassroomGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ClassroomGroupBy) Scan ¶
func (cgb *ClassroomGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*ClassroomGroupBy) ScanX ¶
func (cgb *ClassroomGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ClassroomMutation ¶
type ClassroomMutation struct {
// contains filtered or unexported fields
}
ClassroomMutation represents an operation that mutate the Classrooms nodes in the graph.
func (*ClassroomMutation) AddField ¶
func (m *ClassroomMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ClassroomMutation) AddStudentIDs ¶
func (m *ClassroomMutation) AddStudentIDs(ids ...uint)
AddStudentIDs adds the students edge to User by ids.
func (*ClassroomMutation) AddedEdges ¶
func (m *ClassroomMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ClassroomMutation) AddedField ¶
func (m *ClassroomMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*ClassroomMutation) AddedFields ¶
func (m *ClassroomMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*ClassroomMutation) AddedIDs ¶
func (m *ClassroomMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*ClassroomMutation) ClearEdge ¶
func (m *ClassroomMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*ClassroomMutation) ClearField ¶
func (m *ClassroomMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*ClassroomMutation) ClearLevel ¶
func (m *ClassroomMutation) ClearLevel()
ClearLevel clears the level edge to Level.
func (*ClassroomMutation) ClearTeacher ¶
func (m *ClassroomMutation) ClearTeacher()
ClearTeacher clears the teacher edge to User.
func (*ClassroomMutation) ClearedEdges ¶
func (m *ClassroomMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ClassroomMutation) ClearedFields ¶
func (m *ClassroomMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ClassroomMutation) Client ¶
func (m ClassroomMutation) 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 (*ClassroomMutation) CreatedAt ¶
func (m *ClassroomMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*ClassroomMutation) EdgeCleared ¶
func (m *ClassroomMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*ClassroomMutation) Field ¶
func (m *ClassroomMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*ClassroomMutation) FieldCleared ¶
func (m *ClassroomMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*ClassroomMutation) Fields ¶
func (m *ClassroomMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*ClassroomMutation) ID ¶
func (m *ClassroomMutation) ID() (id uint, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*ClassroomMutation) LevelCleared ¶
func (m *ClassroomMutation) LevelCleared() bool
LevelCleared returns if the edge level was cleared.
func (*ClassroomMutation) LevelID ¶
func (m *ClassroomMutation) LevelID() (id uint, exists bool)
LevelID returns the level id in the mutation.
func (*ClassroomMutation) LevelIDs ¶
func (m *ClassroomMutation) LevelIDs() (ids []uint)
LevelIDs returns the level ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use LevelID instead. It exists only for internal usage by the builders.
func (*ClassroomMutation) RemoveStudentIDs ¶
func (m *ClassroomMutation) RemoveStudentIDs(ids ...uint)
RemoveStudentIDs removes the students edge to User by ids.
func (*ClassroomMutation) RemovedEdges ¶
func (m *ClassroomMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ClassroomMutation) RemovedIDs ¶
func (m *ClassroomMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*ClassroomMutation) RemovedStudentsIDs ¶
func (m *ClassroomMutation) RemovedStudentsIDs() (ids []uint)
RemovedStudents returns the removed ids of students.
func (*ClassroomMutation) ResetCreatedAt ¶
func (m *ClassroomMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the created_at field.
func (*ClassroomMutation) ResetEdge ¶
func (m *ClassroomMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*ClassroomMutation) ResetField ¶
func (m *ClassroomMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*ClassroomMutation) ResetLevel ¶
func (m *ClassroomMutation) ResetLevel()
ResetLevel reset all changes of the level edge.
func (*ClassroomMutation) ResetStudents ¶
func (m *ClassroomMutation) ResetStudents()
ResetStudents reset all changes of the students edge.
func (*ClassroomMutation) ResetTeacher ¶
func (m *ClassroomMutation) ResetTeacher()
ResetTeacher reset all changes of the teacher edge.
func (*ClassroomMutation) ResetUpdatedAt ¶
func (m *ClassroomMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the updated_at field.
func (*ClassroomMutation) SetCreatedAt ¶
func (m *ClassroomMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*ClassroomMutation) SetField ¶
func (m *ClassroomMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*ClassroomMutation) SetID ¶
func (m *ClassroomMutation) SetID(id uint)
SetID sets the value of the id field. Note that, this operation is accepted only on Classroom creation.
func (*ClassroomMutation) SetLevelID ¶
func (m *ClassroomMutation) SetLevelID(id uint)
SetLevelID sets the level edge to Level by id.
func (*ClassroomMutation) SetTeacherID ¶
func (m *ClassroomMutation) SetTeacherID(id uint)
SetTeacherID sets the teacher edge to User by id.
func (*ClassroomMutation) SetUpdatedAt ¶
func (m *ClassroomMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*ClassroomMutation) StudentsIDs ¶
func (m *ClassroomMutation) StudentsIDs() (ids []uint)
StudentsIDs returns the students ids in the mutation.
func (*ClassroomMutation) TeacherCleared ¶
func (m *ClassroomMutation) TeacherCleared() bool
TeacherCleared returns if the edge teacher was cleared.
func (*ClassroomMutation) TeacherID ¶
func (m *ClassroomMutation) TeacherID() (id uint, exists bool)
TeacherID returns the teacher id in the mutation.
func (*ClassroomMutation) TeacherIDs ¶
func (m *ClassroomMutation) TeacherIDs() (ids []uint)
TeacherIDs returns the teacher ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use TeacherID instead. It exists only for internal usage by the builders.
func (ClassroomMutation) Tx ¶
func (m ClassroomMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ClassroomMutation) Type ¶
func (m *ClassroomMutation) Type() string
Type returns the node type of this mutation (Classroom).
type ClassroomQuery ¶
type ClassroomQuery struct {
// contains filtered or unexported fields
}
ClassroomQuery is the builder for querying Classroom entities.
func (*ClassroomQuery) All ¶
func (cq *ClassroomQuery) All(ctx context.Context) ([]*Classroom, error)
All executes the query and returns a list of Classrooms.
func (*ClassroomQuery) AllX ¶
func (cq *ClassroomQuery) AllX(ctx context.Context) []*Classroom
AllX is like All, but panics if an error occurs.
func (*ClassroomQuery) Clone ¶
func (cq *ClassroomQuery) Clone() *ClassroomQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ClassroomQuery) Count ¶
func (cq *ClassroomQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ClassroomQuery) CountX ¶
func (cq *ClassroomQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ClassroomQuery) Exist ¶
func (cq *ClassroomQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ClassroomQuery) ExistX ¶
func (cq *ClassroomQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ClassroomQuery) First ¶
func (cq *ClassroomQuery) First(ctx context.Context) (*Classroom, error)
First returns the first Classroom entity in the query. Returns *NotFoundError when no classroom was found.
func (*ClassroomQuery) FirstID ¶
func (cq *ClassroomQuery) FirstID(ctx context.Context) (id uint, err error)
FirstID returns the first Classroom id in the query. Returns *NotFoundError when no id was found.
func (*ClassroomQuery) FirstX ¶
func (cq *ClassroomQuery) FirstX(ctx context.Context) *Classroom
FirstX is like First, but panics if an error occurs.
func (*ClassroomQuery) FirstXID ¶
func (cq *ClassroomQuery) FirstXID(ctx context.Context) uint
FirstXID is like FirstID, but panics if an error occurs.
func (*ClassroomQuery) GroupBy ¶
func (cq *ClassroomQuery) GroupBy(field string, fields ...string) *ClassroomGroupBy
GroupBy 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.Classroom.Query(). GroupBy(classroom.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ClassroomQuery) IDs ¶
func (cq *ClassroomQuery) IDs(ctx context.Context) ([]uint, error)
IDs executes the query and returns a list of Classroom ids.
func (*ClassroomQuery) IDsX ¶
func (cq *ClassroomQuery) IDsX(ctx context.Context) []uint
IDsX is like IDs, but panics if an error occurs.
func (*ClassroomQuery) Limit ¶
func (cq *ClassroomQuery) Limit(limit int) *ClassroomQuery
Limit adds a limit step to the query.
func (*ClassroomQuery) Offset ¶
func (cq *ClassroomQuery) Offset(offset int) *ClassroomQuery
Offset adds an offset step to the query.
func (*ClassroomQuery) Only ¶
func (cq *ClassroomQuery) Only(ctx context.Context) (*Classroom, error)
Only returns the only Classroom entity in the query, returns an error if not exactly one entity was returned.
func (*ClassroomQuery) OnlyID ¶
func (cq *ClassroomQuery) OnlyID(ctx context.Context) (id uint, err error)
OnlyID returns the only Classroom id in the query, returns an error if not exactly one id was returned.
func (*ClassroomQuery) OnlyX ¶
func (cq *ClassroomQuery) OnlyX(ctx context.Context) *Classroom
OnlyX is like Only, but panics if an error occurs.
func (*ClassroomQuery) OnlyXID ¶
func (cq *ClassroomQuery) OnlyXID(ctx context.Context) uint
OnlyXID is like OnlyID, but panics if an error occurs.
func (*ClassroomQuery) Order ¶
func (cq *ClassroomQuery) Order(o ...Order) *ClassroomQuery
Order adds an order step to the query.
func (*ClassroomQuery) QueryLevel ¶
func (cq *ClassroomQuery) QueryLevel() *LevelQuery
QueryLevel chains the current query on the level edge.
func (*ClassroomQuery) QueryStudents ¶
func (cq *ClassroomQuery) QueryStudents() *UserQuery
QueryStudents chains the current query on the students edge.
func (*ClassroomQuery) QueryTeacher ¶
func (cq *ClassroomQuery) QueryTeacher() *UserQuery
QueryTeacher chains the current query on the teacher edge.
func (*ClassroomQuery) Select ¶
func (cq *ClassroomQuery) Select(field string, fields ...string) *ClassroomSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Classroom.Query(). Select(classroom.FieldCreatedAt). Scan(ctx, &v)
func (*ClassroomQuery) Where ¶
func (cq *ClassroomQuery) Where(ps ...predicate.Classroom) *ClassroomQuery
Where adds a new predicate for the builder.
func (*ClassroomQuery) WithLevel ¶
func (cq *ClassroomQuery) WithLevel(opts ...func(*LevelQuery)) *ClassroomQuery
WithLevel tells the query-builder to eager-loads the nodes that are connected to
the "level" edge. The optional arguments used to configure the query builder of the edge.
func (*ClassroomQuery) WithStudents ¶
func (cq *ClassroomQuery) WithStudents(opts ...func(*UserQuery)) *ClassroomQuery
WithStudents tells the query-builder to eager-loads the nodes that are connected to
the "students" edge. The optional arguments used to configure the query builder of the edge.
func (*ClassroomQuery) WithTeacher ¶
func (cq *ClassroomQuery) WithTeacher(opts ...func(*UserQuery)) *ClassroomQuery
WithTeacher tells the query-builder to eager-loads the nodes that are connected to
the "teacher" edge. The optional arguments used to configure the query builder of the edge.
type ClassroomSelect ¶
type ClassroomSelect struct {
// contains filtered or unexported fields
}
ClassroomSelect is the builder for select fields of Classroom entities.
func (*ClassroomSelect) Bools ¶
func (cs *ClassroomSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*ClassroomSelect) BoolsX ¶
func (cs *ClassroomSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ClassroomSelect) Float64s ¶
func (cs *ClassroomSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*ClassroomSelect) Float64sX ¶
func (cs *ClassroomSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ClassroomSelect) Ints ¶
func (cs *ClassroomSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*ClassroomSelect) IntsX ¶
func (cs *ClassroomSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ClassroomSelect) Scan ¶
func (cs *ClassroomSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*ClassroomSelect) ScanX ¶
func (cs *ClassroomSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type ClassroomUpdate ¶
type ClassroomUpdate struct {
// contains filtered or unexported fields
}
ClassroomUpdate is the builder for updating Classroom entities.
func (*ClassroomUpdate) AddStudentIDs ¶
func (cu *ClassroomUpdate) AddStudentIDs(ids ...uint) *ClassroomUpdate
AddStudentIDs adds the students edge to User by ids.
func (*ClassroomUpdate) AddStudents ¶
func (cu *ClassroomUpdate) AddStudents(u ...*User) *ClassroomUpdate
AddStudents adds the students edges to User.
func (*ClassroomUpdate) ClearLevel ¶
func (cu *ClassroomUpdate) ClearLevel() *ClassroomUpdate
ClearLevel clears the level edge to Level.
func (*ClassroomUpdate) ClearTeacher ¶
func (cu *ClassroomUpdate) ClearTeacher() *ClassroomUpdate
ClearTeacher clears the teacher edge to User.
func (*ClassroomUpdate) Exec ¶
func (cu *ClassroomUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ClassroomUpdate) ExecX ¶
func (cu *ClassroomUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ClassroomUpdate) RemoveStudentIDs ¶
func (cu *ClassroomUpdate) RemoveStudentIDs(ids ...uint) *ClassroomUpdate
RemoveStudentIDs removes the students edge to User by ids.
func (*ClassroomUpdate) RemoveStudents ¶
func (cu *ClassroomUpdate) RemoveStudents(u ...*User) *ClassroomUpdate
RemoveStudents removes students edges to User.
func (*ClassroomUpdate) Save ¶
func (cu *ClassroomUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*ClassroomUpdate) SaveX ¶
func (cu *ClassroomUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ClassroomUpdate) SetLevel ¶
func (cu *ClassroomUpdate) SetLevel(l *Level) *ClassroomUpdate
SetLevel sets the level edge to Level.
func (*ClassroomUpdate) SetLevelID ¶
func (cu *ClassroomUpdate) SetLevelID(id uint) *ClassroomUpdate
SetLevelID sets the level edge to Level by id.
func (*ClassroomUpdate) SetNillableLevelID ¶
func (cu *ClassroomUpdate) SetNillableLevelID(id *uint) *ClassroomUpdate
SetNillableLevelID sets the level edge to Level by id if the given value is not nil.
func (*ClassroomUpdate) SetTeacher ¶
func (cu *ClassroomUpdate) SetTeacher(u *User) *ClassroomUpdate
SetTeacher sets the teacher edge to User.
func (*ClassroomUpdate) SetTeacherID ¶
func (cu *ClassroomUpdate) SetTeacherID(id uint) *ClassroomUpdate
SetTeacherID sets the teacher edge to User by id.
func (*ClassroomUpdate) SetUpdatedAt ¶
func (cu *ClassroomUpdate) SetUpdatedAt(t time.Time) *ClassroomUpdate
SetUpdatedAt sets the updated_at field.
func (*ClassroomUpdate) Where ¶
func (cu *ClassroomUpdate) Where(ps ...predicate.Classroom) *ClassroomUpdate
Where adds a new predicate for the builder.
type ClassroomUpdateOne ¶
type ClassroomUpdateOne struct {
// contains filtered or unexported fields
}
ClassroomUpdateOne is the builder for updating a single Classroom entity.
func (*ClassroomUpdateOne) AddStudentIDs ¶
func (cuo *ClassroomUpdateOne) AddStudentIDs(ids ...uint) *ClassroomUpdateOne
AddStudentIDs adds the students edge to User by ids.
func (*ClassroomUpdateOne) AddStudents ¶
func (cuo *ClassroomUpdateOne) AddStudents(u ...*User) *ClassroomUpdateOne
AddStudents adds the students edges to User.
func (*ClassroomUpdateOne) ClearLevel ¶
func (cuo *ClassroomUpdateOne) ClearLevel() *ClassroomUpdateOne
ClearLevel clears the level edge to Level.
func (*ClassroomUpdateOne) ClearTeacher ¶
func (cuo *ClassroomUpdateOne) ClearTeacher() *ClassroomUpdateOne
ClearTeacher clears the teacher edge to User.
func (*ClassroomUpdateOne) Exec ¶
func (cuo *ClassroomUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ClassroomUpdateOne) ExecX ¶
func (cuo *ClassroomUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ClassroomUpdateOne) RemoveStudentIDs ¶
func (cuo *ClassroomUpdateOne) RemoveStudentIDs(ids ...uint) *ClassroomUpdateOne
RemoveStudentIDs removes the students edge to User by ids.
func (*ClassroomUpdateOne) RemoveStudents ¶
func (cuo *ClassroomUpdateOne) RemoveStudents(u ...*User) *ClassroomUpdateOne
RemoveStudents removes students edges to User.
func (*ClassroomUpdateOne) Save ¶
func (cuo *ClassroomUpdateOne) Save(ctx context.Context) (*Classroom, error)
Save executes the query and returns the updated entity.
func (*ClassroomUpdateOne) SaveX ¶
func (cuo *ClassroomUpdateOne) SaveX(ctx context.Context) *Classroom
SaveX is like Save, but panics if an error occurs.
func (*ClassroomUpdateOne) SetLevel ¶
func (cuo *ClassroomUpdateOne) SetLevel(l *Level) *ClassroomUpdateOne
SetLevel sets the level edge to Level.
func (*ClassroomUpdateOne) SetLevelID ¶
func (cuo *ClassroomUpdateOne) SetLevelID(id uint) *ClassroomUpdateOne
SetLevelID sets the level edge to Level by id.
func (*ClassroomUpdateOne) SetNillableLevelID ¶
func (cuo *ClassroomUpdateOne) SetNillableLevelID(id *uint) *ClassroomUpdateOne
SetNillableLevelID sets the level edge to Level by id if the given value is not nil.
func (*ClassroomUpdateOne) SetTeacher ¶
func (cuo *ClassroomUpdateOne) SetTeacher(u *User) *ClassroomUpdateOne
SetTeacher sets the teacher edge to User.
func (*ClassroomUpdateOne) SetTeacherID ¶
func (cuo *ClassroomUpdateOne) SetTeacherID(id uint) *ClassroomUpdateOne
SetTeacherID sets the teacher edge to User by id.
func (*ClassroomUpdateOne) SetUpdatedAt ¶
func (cuo *ClassroomUpdateOne) SetUpdatedAt(t time.Time) *ClassroomUpdateOne
SetUpdatedAt sets the updated_at field.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Classroom is the client for interacting with the Classroom builders. Classroom *ClassroomClient // Credential is the client for interacting with the Credential builders. Credential *CredentialClient // Level is the client for interacting with the Level builders. Level *LevelClient // User is the client for interacting with the User builders. User *UserClient // UserLevel is the client for interacting with the UserLevel builders. UserLevel *UserLevelClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns the Client stored in a context, or nil if there isn't one.
func Open ¶
Open opens a connection to the database specified by the driver name and a driver-specific 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(). Classroom. Query(). Count(ctx)
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 Credential ¶
type Credential struct { // ID of the ent. ID int `json:"id,omitempty"` // Salt holds the value of the "salt" field. Salt []byte `json:"salt,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash []byte `json:"password_hash,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CredentialQuery when eager-loading is set. Edges CredentialEdges `json:"edges"` // contains filtered or unexported fields }
Credential is the model entity for the Credential schema.
func (*Credential) QueryHolder ¶
func (c *Credential) QueryHolder() *UserQuery
QueryHolder queries the holder edge of the Credential.
func (*Credential) String ¶
func (c *Credential) String() string
String implements the fmt.Stringer.
func (*Credential) Unwrap ¶
func (c *Credential) Unwrap() *Credential
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Credential) Update ¶
func (c *Credential) Update() *CredentialUpdateOne
Update returns a builder for updating this Credential. Note that, you need to call Credential.Unwrap() before calling this method, if this Credential was returned from a transaction, and the transaction was committed or rolled back.
type CredentialClient ¶
type CredentialClient struct {
// contains filtered or unexported fields
}
CredentialClient is a client for the Credential schema.
func NewCredentialClient ¶
func NewCredentialClient(c config) *CredentialClient
NewCredentialClient returns a client for the Credential from the given config.
func (*CredentialClient) Create ¶
func (c *CredentialClient) Create() *CredentialCreate
Create returns a create builder for Credential.
func (*CredentialClient) Delete ¶
func (c *CredentialClient) Delete() *CredentialDelete
Delete returns a delete builder for Credential.
func (*CredentialClient) DeleteOne ¶
func (c *CredentialClient) DeleteOne(cr *Credential) *CredentialDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*CredentialClient) DeleteOneID ¶
func (c *CredentialClient) DeleteOneID(id int) *CredentialDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*CredentialClient) Get ¶
func (c *CredentialClient) Get(ctx context.Context, id int) (*Credential, error)
Get returns a Credential entity by its id.
func (*CredentialClient) GetX ¶
func (c *CredentialClient) GetX(ctx context.Context, id int) *Credential
GetX is like Get, but panics if an error occurs.
func (*CredentialClient) Hooks ¶
func (c *CredentialClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CredentialClient) Query ¶
func (c *CredentialClient) Query() *CredentialQuery
Create returns a query builder for Credential.
func (*CredentialClient) QueryHolder ¶
func (c *CredentialClient) QueryHolder(cr *Credential) *UserQuery
QueryHolder queries the holder edge of a Credential.
func (*CredentialClient) Update ¶
func (c *CredentialClient) Update() *CredentialUpdate
Update returns an update builder for Credential.
func (*CredentialClient) UpdateOne ¶
func (c *CredentialClient) UpdateOne(cr *Credential) *CredentialUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CredentialClient) UpdateOneID ¶
func (c *CredentialClient) UpdateOneID(id int) *CredentialUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CredentialClient) Use ¶
func (c *CredentialClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `credential.Hooks(f(g(h())))`.
type CredentialCreate ¶
type CredentialCreate struct {
// contains filtered or unexported fields
}
CredentialCreate is the builder for creating a Credential entity.
func (*CredentialCreate) Save ¶
func (cc *CredentialCreate) Save(ctx context.Context) (*Credential, error)
Save creates the Credential in the database.
func (*CredentialCreate) SaveX ¶
func (cc *CredentialCreate) SaveX(ctx context.Context) *Credential
SaveX calls Save and panics if Save returns an error.
func (*CredentialCreate) SetHolder ¶
func (cc *CredentialCreate) SetHolder(u *User) *CredentialCreate
SetHolder sets the holder edge to User.
func (*CredentialCreate) SetHolderID ¶
func (cc *CredentialCreate) SetHolderID(id uint) *CredentialCreate
SetHolderID sets the holder edge to User by id.
func (*CredentialCreate) SetPasswordHash ¶
func (cc *CredentialCreate) SetPasswordHash(b []byte) *CredentialCreate
SetPasswordHash sets the password_hash field.
func (*CredentialCreate) SetSalt ¶
func (cc *CredentialCreate) SetSalt(b []byte) *CredentialCreate
SetSalt sets the salt field.
type CredentialDelete ¶
type CredentialDelete struct {
// contains filtered or unexported fields
}
CredentialDelete is the builder for deleting a Credential entity.
func (*CredentialDelete) Exec ¶
func (cd *CredentialDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CredentialDelete) ExecX ¶
func (cd *CredentialDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CredentialDelete) Where ¶
func (cd *CredentialDelete) Where(ps ...predicate.Credential) *CredentialDelete
Where adds a new predicate to the delete builder.
type CredentialDeleteOne ¶
type CredentialDeleteOne struct {
// contains filtered or unexported fields
}
CredentialDeleteOne is the builder for deleting a single Credential entity.
func (*CredentialDeleteOne) Exec ¶
func (cdo *CredentialDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CredentialDeleteOne) ExecX ¶
func (cdo *CredentialDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CredentialEdges ¶
type CredentialEdges struct { // Holder holds the value of the holder edge. Holder *User // contains filtered or unexported fields }
CredentialEdges holds the relations/edges for other nodes in the graph.
func (CredentialEdges) HolderOrErr ¶
func (e CredentialEdges) HolderOrErr() (*User, error)
HolderOrErr returns the Holder value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CredentialGroupBy ¶
type CredentialGroupBy struct {
// contains filtered or unexported fields
}
CredentialGroupBy is the builder for group-by Credential entities.
func (*CredentialGroupBy) Aggregate ¶
func (cgb *CredentialGroupBy) Aggregate(fns ...Aggregate) *CredentialGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CredentialGroupBy) Bools ¶
func (cgb *CredentialGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*CredentialGroupBy) BoolsX ¶
func (cgb *CredentialGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CredentialGroupBy) Float64s ¶
func (cgb *CredentialGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*CredentialGroupBy) Float64sX ¶
func (cgb *CredentialGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CredentialGroupBy) Ints ¶
func (cgb *CredentialGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*CredentialGroupBy) IntsX ¶
func (cgb *CredentialGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CredentialGroupBy) Scan ¶
func (cgb *CredentialGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*CredentialGroupBy) ScanX ¶
func (cgb *CredentialGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type CredentialMutation ¶
type CredentialMutation struct {
// contains filtered or unexported fields
}
CredentialMutation represents an operation that mutate the Credentials nodes in the graph.
func (*CredentialMutation) AddField ¶
func (m *CredentialMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*CredentialMutation) AddedEdges ¶
func (m *CredentialMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CredentialMutation) AddedField ¶
func (m *CredentialMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*CredentialMutation) AddedFields ¶
func (m *CredentialMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*CredentialMutation) AddedIDs ¶
func (m *CredentialMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*CredentialMutation) ClearEdge ¶
func (m *CredentialMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*CredentialMutation) ClearField ¶
func (m *CredentialMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*CredentialMutation) ClearHolder ¶
func (m *CredentialMutation) ClearHolder()
ClearHolder clears the holder edge to User.
func (*CredentialMutation) ClearedEdges ¶
func (m *CredentialMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CredentialMutation) ClearedFields ¶
func (m *CredentialMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CredentialMutation) Client ¶
func (m CredentialMutation) 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 (*CredentialMutation) EdgeCleared ¶
func (m *CredentialMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*CredentialMutation) Field ¶
func (m *CredentialMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*CredentialMutation) FieldCleared ¶
func (m *CredentialMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*CredentialMutation) Fields ¶
func (m *CredentialMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*CredentialMutation) HolderCleared ¶
func (m *CredentialMutation) HolderCleared() bool
HolderCleared returns if the edge holder was cleared.
func (*CredentialMutation) HolderID ¶
func (m *CredentialMutation) HolderID() (id uint, exists bool)
HolderID returns the holder id in the mutation.
func (*CredentialMutation) HolderIDs ¶
func (m *CredentialMutation) HolderIDs() (ids []uint)
HolderIDs returns the holder ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use HolderID instead. It exists only for internal usage by the builders.
func (*CredentialMutation) ID ¶
func (m *CredentialMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*CredentialMutation) PasswordHash ¶
func (m *CredentialMutation) PasswordHash() (r []byte, exists bool)
PasswordHash returns the password_hash value in the mutation.
func (*CredentialMutation) RemovedEdges ¶
func (m *CredentialMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CredentialMutation) RemovedIDs ¶
func (m *CredentialMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*CredentialMutation) ResetEdge ¶
func (m *CredentialMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*CredentialMutation) ResetField ¶
func (m *CredentialMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*CredentialMutation) ResetHolder ¶
func (m *CredentialMutation) ResetHolder()
ResetHolder reset all changes of the holder edge.
func (*CredentialMutation) ResetPasswordHash ¶
func (m *CredentialMutation) ResetPasswordHash()
ResetPasswordHash reset all changes of the password_hash field.
func (*CredentialMutation) ResetSalt ¶
func (m *CredentialMutation) ResetSalt()
ResetSalt reset all changes of the salt field.
func (*CredentialMutation) Salt ¶
func (m *CredentialMutation) Salt() (r []byte, exists bool)
Salt returns the salt value in the mutation.
func (*CredentialMutation) SetField ¶
func (m *CredentialMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*CredentialMutation) SetHolderID ¶
func (m *CredentialMutation) SetHolderID(id uint)
SetHolderID sets the holder edge to User by id.
func (*CredentialMutation) SetPasswordHash ¶
func (m *CredentialMutation) SetPasswordHash(b []byte)
SetPasswordHash sets the password_hash field.
func (*CredentialMutation) SetSalt ¶
func (m *CredentialMutation) SetSalt(b []byte)
SetSalt sets the salt field.
func (CredentialMutation) Tx ¶
func (m CredentialMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CredentialMutation) Type ¶
func (m *CredentialMutation) Type() string
Type returns the node type of this mutation (Credential).
type CredentialQuery ¶
type CredentialQuery struct {
// contains filtered or unexported fields
}
CredentialQuery is the builder for querying Credential entities.
func (*CredentialQuery) All ¶
func (cq *CredentialQuery) All(ctx context.Context) ([]*Credential, error)
All executes the query and returns a list of Credentials.
func (*CredentialQuery) AllX ¶
func (cq *CredentialQuery) AllX(ctx context.Context) []*Credential
AllX is like All, but panics if an error occurs.
func (*CredentialQuery) Clone ¶
func (cq *CredentialQuery) Clone() *CredentialQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CredentialQuery) Count ¶
func (cq *CredentialQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CredentialQuery) CountX ¶
func (cq *CredentialQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CredentialQuery) Exist ¶
func (cq *CredentialQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CredentialQuery) ExistX ¶
func (cq *CredentialQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CredentialQuery) First ¶
func (cq *CredentialQuery) First(ctx context.Context) (*Credential, error)
First returns the first Credential entity in the query. Returns *NotFoundError when no credential was found.
func (*CredentialQuery) FirstID ¶
func (cq *CredentialQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Credential id in the query. Returns *NotFoundError when no id was found.
func (*CredentialQuery) FirstX ¶
func (cq *CredentialQuery) FirstX(ctx context.Context) *Credential
FirstX is like First, but panics if an error occurs.
func (*CredentialQuery) FirstXID ¶
func (cq *CredentialQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*CredentialQuery) GroupBy ¶
func (cq *CredentialQuery) GroupBy(field string, fields ...string) *CredentialGroupBy
GroupBy 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 { Salt []byte `json:"salt,omitempty"` Count int `json:"count,omitempty"` } client.Credential.Query(). GroupBy(credential.FieldSalt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CredentialQuery) IDs ¶
func (cq *CredentialQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Credential ids.
func (*CredentialQuery) IDsX ¶
func (cq *CredentialQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CredentialQuery) Limit ¶
func (cq *CredentialQuery) Limit(limit int) *CredentialQuery
Limit adds a limit step to the query.
func (*CredentialQuery) Offset ¶
func (cq *CredentialQuery) Offset(offset int) *CredentialQuery
Offset adds an offset step to the query.
func (*CredentialQuery) Only ¶
func (cq *CredentialQuery) Only(ctx context.Context) (*Credential, error)
Only returns the only Credential entity in the query, returns an error if not exactly one entity was returned.
func (*CredentialQuery) OnlyID ¶
func (cq *CredentialQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only Credential id in the query, returns an error if not exactly one id was returned.
func (*CredentialQuery) OnlyX ¶
func (cq *CredentialQuery) OnlyX(ctx context.Context) *Credential
OnlyX is like Only, but panics if an error occurs.
func (*CredentialQuery) OnlyXID ¶
func (cq *CredentialQuery) OnlyXID(ctx context.Context) int
OnlyXID is like OnlyID, but panics if an error occurs.
func (*CredentialQuery) Order ¶
func (cq *CredentialQuery) Order(o ...Order) *CredentialQuery
Order adds an order step to the query.
func (*CredentialQuery) QueryHolder ¶
func (cq *CredentialQuery) QueryHolder() *UserQuery
QueryHolder chains the current query on the holder edge.
func (*CredentialQuery) Select ¶
func (cq *CredentialQuery) Select(field string, fields ...string) *CredentialSelect
Select one or more fields from the given query.
Example:
var v []struct { Salt []byte `json:"salt,omitempty"` } client.Credential.Query(). Select(credential.FieldSalt). Scan(ctx, &v)
func (*CredentialQuery) Where ¶
func (cq *CredentialQuery) Where(ps ...predicate.Credential) *CredentialQuery
Where adds a new predicate for the builder.
func (*CredentialQuery) WithHolder ¶
func (cq *CredentialQuery) WithHolder(opts ...func(*UserQuery)) *CredentialQuery
WithHolder tells the query-builder to eager-loads the nodes that are connected to
the "holder" edge. The optional arguments used to configure the query builder of the edge.
type CredentialSelect ¶
type CredentialSelect struct {
// contains filtered or unexported fields
}
CredentialSelect is the builder for select fields of Credential entities.
func (*CredentialSelect) Bools ¶
func (cs *CredentialSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*CredentialSelect) BoolsX ¶
func (cs *CredentialSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*CredentialSelect) Float64s ¶
func (cs *CredentialSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*CredentialSelect) Float64sX ¶
func (cs *CredentialSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*CredentialSelect) Ints ¶
func (cs *CredentialSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*CredentialSelect) IntsX ¶
func (cs *CredentialSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*CredentialSelect) Scan ¶
func (cs *CredentialSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*CredentialSelect) ScanX ¶
func (cs *CredentialSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type CredentialUpdate ¶
type CredentialUpdate struct {
// contains filtered or unexported fields
}
CredentialUpdate is the builder for updating Credential entities.
func (*CredentialUpdate) ClearHolder ¶
func (cu *CredentialUpdate) ClearHolder() *CredentialUpdate
ClearHolder clears the holder edge to User.
func (*CredentialUpdate) Exec ¶
func (cu *CredentialUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CredentialUpdate) ExecX ¶
func (cu *CredentialUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CredentialUpdate) Save ¶
func (cu *CredentialUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*CredentialUpdate) SaveX ¶
func (cu *CredentialUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CredentialUpdate) SetHolder ¶
func (cu *CredentialUpdate) SetHolder(u *User) *CredentialUpdate
SetHolder sets the holder edge to User.
func (*CredentialUpdate) SetHolderID ¶
func (cu *CredentialUpdate) SetHolderID(id uint) *CredentialUpdate
SetHolderID sets the holder edge to User by id.
func (*CredentialUpdate) SetPasswordHash ¶
func (cu *CredentialUpdate) SetPasswordHash(b []byte) *CredentialUpdate
SetPasswordHash sets the password_hash field.
func (*CredentialUpdate) Where ¶
func (cu *CredentialUpdate) Where(ps ...predicate.Credential) *CredentialUpdate
Where adds a new predicate for the builder.
type CredentialUpdateOne ¶
type CredentialUpdateOne struct {
// contains filtered or unexported fields
}
CredentialUpdateOne is the builder for updating a single Credential entity.
func (*CredentialUpdateOne) ClearHolder ¶
func (cuo *CredentialUpdateOne) ClearHolder() *CredentialUpdateOne
ClearHolder clears the holder edge to User.
func (*CredentialUpdateOne) Exec ¶
func (cuo *CredentialUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CredentialUpdateOne) ExecX ¶
func (cuo *CredentialUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CredentialUpdateOne) Save ¶
func (cuo *CredentialUpdateOne) Save(ctx context.Context) (*Credential, error)
Save executes the query and returns the updated entity.
func (*CredentialUpdateOne) SaveX ¶
func (cuo *CredentialUpdateOne) SaveX(ctx context.Context) *Credential
SaveX is like Save, but panics if an error occurs.
func (*CredentialUpdateOne) SetHolder ¶
func (cuo *CredentialUpdateOne) SetHolder(u *User) *CredentialUpdateOne
SetHolder sets the holder edge to User.
func (*CredentialUpdateOne) SetHolderID ¶
func (cuo *CredentialUpdateOne) SetHolderID(id uint) *CredentialUpdateOne
SetHolderID sets the holder edge to User by id.
func (*CredentialUpdateOne) SetPasswordHash ¶
func (cuo *CredentialUpdateOne) SetPasswordHash(b []byte) *CredentialUpdateOne
SetPasswordHash sets the password_hash field.
type Level ¶
type Level struct { // ID of the ent. ID uint `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Definition holds the value of the "definition" field. Definition *schema.LevelDefinition `json:"definition,omitempty"` // contains filtered or unexported fields }
Level is the model entity for the Level schema.
func (*Level) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Level) Update ¶
func (l *Level) Update() *LevelUpdateOne
Update returns a builder for updating this Level. Note that, you need to call Level.Unwrap() before calling this method, if this Level was returned from a transaction, and the transaction was committed or rolled back.
type LevelClient ¶
type LevelClient struct {
// contains filtered or unexported fields
}
LevelClient is a client for the Level schema.
func NewLevelClient ¶
func NewLevelClient(c config) *LevelClient
NewLevelClient returns a client for the Level from the given config.
func (*LevelClient) Create ¶
func (c *LevelClient) Create() *LevelCreate
Create returns a create builder for Level.
func (*LevelClient) Delete ¶
func (c *LevelClient) Delete() *LevelDelete
Delete returns a delete builder for Level.
func (*LevelClient) DeleteOne ¶
func (c *LevelClient) DeleteOne(l *Level) *LevelDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*LevelClient) DeleteOneID ¶
func (c *LevelClient) DeleteOneID(id uint) *LevelDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*LevelClient) GetX ¶
func (c *LevelClient) GetX(ctx context.Context, id uint) *Level
GetX is like Get, but panics if an error occurs.
func (*LevelClient) Query ¶
func (c *LevelClient) Query() *LevelQuery
Create returns a query builder for Level.
func (*LevelClient) Update ¶
func (c *LevelClient) Update() *LevelUpdate
Update returns an update builder for Level.
func (*LevelClient) UpdateOne ¶
func (c *LevelClient) UpdateOne(l *Level) *LevelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LevelClient) UpdateOneID ¶
func (c *LevelClient) UpdateOneID(id uint) *LevelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LevelClient) Use ¶
func (c *LevelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `level.Hooks(f(g(h())))`.
type LevelCreate ¶
type LevelCreate struct {
// contains filtered or unexported fields
}
LevelCreate is the builder for creating a Level entity.
func (*LevelCreate) Save ¶
func (lc *LevelCreate) Save(ctx context.Context) (*Level, error)
Save creates the Level in the database.
func (*LevelCreate) SaveX ¶
func (lc *LevelCreate) SaveX(ctx context.Context) *Level
SaveX calls Save and panics if Save returns an error.
func (*LevelCreate) SetCreatedAt ¶
func (lc *LevelCreate) SetCreatedAt(t time.Time) *LevelCreate
SetCreatedAt sets the created_at field.
func (*LevelCreate) SetDefinition ¶
func (lc *LevelCreate) SetDefinition(sd *schema.LevelDefinition) *LevelCreate
SetDefinition sets the definition field.
func (*LevelCreate) SetDescription ¶
func (lc *LevelCreate) SetDescription(s string) *LevelCreate
SetDescription sets the description field.
func (*LevelCreate) SetID ¶
func (lc *LevelCreate) SetID(u uint) *LevelCreate
SetID sets the id field.
func (*LevelCreate) SetName ¶
func (lc *LevelCreate) SetName(s string) *LevelCreate
SetName sets the name field.
func (*LevelCreate) SetNillableCreatedAt ¶
func (lc *LevelCreate) SetNillableCreatedAt(t *time.Time) *LevelCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*LevelCreate) SetNillableUpdatedAt ¶
func (lc *LevelCreate) SetNillableUpdatedAt(t *time.Time) *LevelCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*LevelCreate) SetUpdatedAt ¶
func (lc *LevelCreate) SetUpdatedAt(t time.Time) *LevelCreate
SetUpdatedAt sets the updated_at field.
type LevelDelete ¶
type LevelDelete struct {
// contains filtered or unexported fields
}
LevelDelete is the builder for deleting a Level entity.
func (*LevelDelete) Exec ¶
func (ld *LevelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LevelDelete) ExecX ¶
func (ld *LevelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LevelDelete) Where ¶
func (ld *LevelDelete) Where(ps ...predicate.Level) *LevelDelete
Where adds a new predicate to the delete builder.
type LevelDeleteOne ¶
type LevelDeleteOne struct {
// contains filtered or unexported fields
}
LevelDeleteOne is the builder for deleting a single Level entity.
func (*LevelDeleteOne) Exec ¶
func (ldo *LevelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LevelDeleteOne) ExecX ¶
func (ldo *LevelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type LevelGroupBy ¶
type LevelGroupBy struct {
// contains filtered or unexported fields
}
LevelGroupBy is the builder for group-by Level entities.
func (*LevelGroupBy) Aggregate ¶
func (lgb *LevelGroupBy) Aggregate(fns ...Aggregate) *LevelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LevelGroupBy) Bools ¶
func (lgb *LevelGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*LevelGroupBy) BoolsX ¶
func (lgb *LevelGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*LevelGroupBy) Float64s ¶
func (lgb *LevelGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*LevelGroupBy) Float64sX ¶
func (lgb *LevelGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*LevelGroupBy) Ints ¶
func (lgb *LevelGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*LevelGroupBy) IntsX ¶
func (lgb *LevelGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*LevelGroupBy) Scan ¶
func (lgb *LevelGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*LevelGroupBy) ScanX ¶
func (lgb *LevelGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type LevelMutation ¶
type LevelMutation struct {
// contains filtered or unexported fields
}
LevelMutation represents an operation that mutate the Levels nodes in the graph.
func (*LevelMutation) AddField ¶
func (m *LevelMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*LevelMutation) AddedEdges ¶
func (m *LevelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LevelMutation) AddedField ¶
func (m *LevelMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*LevelMutation) AddedFields ¶
func (m *LevelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*LevelMutation) AddedIDs ¶
func (m *LevelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*LevelMutation) ClearEdge ¶
func (m *LevelMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*LevelMutation) ClearField ¶
func (m *LevelMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*LevelMutation) ClearedEdges ¶
func (m *LevelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LevelMutation) ClearedFields ¶
func (m *LevelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LevelMutation) Client ¶
func (m LevelMutation) 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 (*LevelMutation) CreatedAt ¶
func (m *LevelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*LevelMutation) Definition ¶
func (m *LevelMutation) Definition() (r *schema.LevelDefinition, exists bool)
Definition returns the definition value in the mutation.
func (*LevelMutation) Description ¶
func (m *LevelMutation) Description() (r string, exists bool)
Description returns the description value in the mutation.
func (*LevelMutation) EdgeCleared ¶
func (m *LevelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*LevelMutation) Field ¶
func (m *LevelMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*LevelMutation) FieldCleared ¶
func (m *LevelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*LevelMutation) Fields ¶
func (m *LevelMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*LevelMutation) ID ¶
func (m *LevelMutation) ID() (id uint, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*LevelMutation) Name ¶
func (m *LevelMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*LevelMutation) RemovedEdges ¶
func (m *LevelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LevelMutation) RemovedIDs ¶
func (m *LevelMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*LevelMutation) ResetCreatedAt ¶
func (m *LevelMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the created_at field.
func (*LevelMutation) ResetDefinition ¶
func (m *LevelMutation) ResetDefinition()
ResetDefinition reset all changes of the definition field.
func (*LevelMutation) ResetDescription ¶
func (m *LevelMutation) ResetDescription()
ResetDescription reset all changes of the description field.
func (*LevelMutation) ResetEdge ¶
func (m *LevelMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*LevelMutation) ResetField ¶
func (m *LevelMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*LevelMutation) ResetName ¶
func (m *LevelMutation) ResetName()
ResetName reset all changes of the name field.
func (*LevelMutation) ResetUpdatedAt ¶
func (m *LevelMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the updated_at field.
func (*LevelMutation) SetCreatedAt ¶
func (m *LevelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*LevelMutation) SetDefinition ¶
func (m *LevelMutation) SetDefinition(sd *schema.LevelDefinition)
SetDefinition sets the definition field.
func (*LevelMutation) SetDescription ¶
func (m *LevelMutation) SetDescription(s string)
SetDescription sets the description field.
func (*LevelMutation) SetField ¶
func (m *LevelMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*LevelMutation) SetID ¶
func (m *LevelMutation) SetID(id uint)
SetID sets the value of the id field. Note that, this operation is accepted only on Level creation.
func (*LevelMutation) SetName ¶
func (m *LevelMutation) SetName(s string)
SetName sets the name field.
func (*LevelMutation) SetUpdatedAt ¶
func (m *LevelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (LevelMutation) Tx ¶
func (m LevelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LevelMutation) Type ¶
func (m *LevelMutation) Type() string
Type returns the node type of this mutation (Level).
type LevelQuery ¶
type LevelQuery struct {
// contains filtered or unexported fields
}
LevelQuery is the builder for querying Level entities.
func (*LevelQuery) All ¶
func (lq *LevelQuery) All(ctx context.Context) ([]*Level, error)
All executes the query and returns a list of Levels.
func (*LevelQuery) AllX ¶
func (lq *LevelQuery) AllX(ctx context.Context) []*Level
AllX is like All, but panics if an error occurs.
func (*LevelQuery) Clone ¶
func (lq *LevelQuery) Clone() *LevelQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LevelQuery) Count ¶
func (lq *LevelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LevelQuery) CountX ¶
func (lq *LevelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LevelQuery) Exist ¶
func (lq *LevelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LevelQuery) ExistX ¶
func (lq *LevelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LevelQuery) First ¶
func (lq *LevelQuery) First(ctx context.Context) (*Level, error)
First returns the first Level entity in the query. Returns *NotFoundError when no level was found.
func (*LevelQuery) FirstID ¶
func (lq *LevelQuery) FirstID(ctx context.Context) (id uint, err error)
FirstID returns the first Level id in the query. Returns *NotFoundError when no id was found.
func (*LevelQuery) FirstX ¶
func (lq *LevelQuery) FirstX(ctx context.Context) *Level
FirstX is like First, but panics if an error occurs.
func (*LevelQuery) FirstXID ¶
func (lq *LevelQuery) FirstXID(ctx context.Context) uint
FirstXID is like FirstID, but panics if an error occurs.
func (*LevelQuery) GroupBy ¶
func (lq *LevelQuery) GroupBy(field string, fields ...string) *LevelGroupBy
GroupBy 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.Level.Query(). GroupBy(level.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*LevelQuery) IDs ¶
func (lq *LevelQuery) IDs(ctx context.Context) ([]uint, error)
IDs executes the query and returns a list of Level ids.
func (*LevelQuery) IDsX ¶
func (lq *LevelQuery) IDsX(ctx context.Context) []uint
IDsX is like IDs, but panics if an error occurs.
func (*LevelQuery) Limit ¶
func (lq *LevelQuery) Limit(limit int) *LevelQuery
Limit adds a limit step to the query.
func (*LevelQuery) Offset ¶
func (lq *LevelQuery) Offset(offset int) *LevelQuery
Offset adds an offset step to the query.
func (*LevelQuery) Only ¶
func (lq *LevelQuery) Only(ctx context.Context) (*Level, error)
Only returns the only Level entity in the query, returns an error if not exactly one entity was returned.
func (*LevelQuery) OnlyID ¶
func (lq *LevelQuery) OnlyID(ctx context.Context) (id uint, err error)
OnlyID returns the only Level id in the query, returns an error if not exactly one id was returned.
func (*LevelQuery) OnlyX ¶
func (lq *LevelQuery) OnlyX(ctx context.Context) *Level
OnlyX is like Only, but panics if an error occurs.
func (*LevelQuery) OnlyXID ¶
func (lq *LevelQuery) OnlyXID(ctx context.Context) uint
OnlyXID is like OnlyID, but panics if an error occurs.
func (*LevelQuery) Order ¶
func (lq *LevelQuery) Order(o ...Order) *LevelQuery
Order adds an order step to the query.
func (*LevelQuery) Select ¶
func (lq *LevelQuery) Select(field string, fields ...string) *LevelSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Level.Query(). Select(level.FieldCreatedAt). Scan(ctx, &v)
func (*LevelQuery) Where ¶
func (lq *LevelQuery) Where(ps ...predicate.Level) *LevelQuery
Where adds a new predicate for the builder.
type LevelSelect ¶
type LevelSelect struct {
// contains filtered or unexported fields
}
LevelSelect is the builder for select fields of Level entities.
func (*LevelSelect) Bools ¶
func (ls *LevelSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*LevelSelect) BoolsX ¶
func (ls *LevelSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*LevelSelect) Float64s ¶
func (ls *LevelSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*LevelSelect) Float64sX ¶
func (ls *LevelSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*LevelSelect) Ints ¶
func (ls *LevelSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*LevelSelect) IntsX ¶
func (ls *LevelSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*LevelSelect) Scan ¶
func (ls *LevelSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*LevelSelect) ScanX ¶
func (ls *LevelSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type LevelUpdate ¶
type LevelUpdate struct {
// contains filtered or unexported fields
}
LevelUpdate is the builder for updating Level entities.
func (*LevelUpdate) Exec ¶
func (lu *LevelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LevelUpdate) ExecX ¶
func (lu *LevelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LevelUpdate) Save ¶
func (lu *LevelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*LevelUpdate) SaveX ¶
func (lu *LevelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LevelUpdate) SetDefinition ¶
func (lu *LevelUpdate) SetDefinition(sd *schema.LevelDefinition) *LevelUpdate
SetDefinition sets the definition field.
func (*LevelUpdate) SetDescription ¶
func (lu *LevelUpdate) SetDescription(s string) *LevelUpdate
SetDescription sets the description field.
func (*LevelUpdate) SetName ¶
func (lu *LevelUpdate) SetName(s string) *LevelUpdate
SetName sets the name field.
func (*LevelUpdate) SetUpdatedAt ¶
func (lu *LevelUpdate) SetUpdatedAt(t time.Time) *LevelUpdate
SetUpdatedAt sets the updated_at field.
func (*LevelUpdate) Where ¶
func (lu *LevelUpdate) Where(ps ...predicate.Level) *LevelUpdate
Where adds a new predicate for the builder.
type LevelUpdateOne ¶
type LevelUpdateOne struct {
// contains filtered or unexported fields
}
LevelUpdateOne is the builder for updating a single Level entity.
func (*LevelUpdateOne) Exec ¶
func (luo *LevelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LevelUpdateOne) ExecX ¶
func (luo *LevelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LevelUpdateOne) Save ¶
func (luo *LevelUpdateOne) Save(ctx context.Context) (*Level, error)
Save executes the query and returns the updated entity.
func (*LevelUpdateOne) SaveX ¶
func (luo *LevelUpdateOne) SaveX(ctx context.Context) *Level
SaveX is like Save, but panics if an error occurs.
func (*LevelUpdateOne) SetDefinition ¶
func (luo *LevelUpdateOne) SetDefinition(sd *schema.LevelDefinition) *LevelUpdateOne
SetDefinition sets the definition field.
func (*LevelUpdateOne) SetDescription ¶
func (luo *LevelUpdateOne) SetDescription(s string) *LevelUpdateOne
SetDescription sets the description field.
func (*LevelUpdateOne) SetName ¶
func (luo *LevelUpdateOne) SetName(s string) *LevelUpdateOne
SetName sets the name field.
func (*LevelUpdateOne) SetUpdatedAt ¶
func (luo *LevelUpdateOne) SetUpdatedAt(t time.Time) *LevelUpdateOne
SetUpdatedAt sets the updated_at field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflict 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 Tx ¶
type Tx struct { // Classroom is the client for interacting with the Classroom builders. Classroom *ClassroomClient // Credential is the client for interacting with the Credential builders. Credential *CredentialClient // Level is the client for interacting with the Level builders. Level *LevelClient // User is the client for interacting with the User builders. User *UserClient // UserLevel is the client for interacting with the UserLevel builders. UserLevel *UserLevelClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
type User ¶
type User struct { // ID of the ent. ID uint `json:"id,omitempty"` // Type holds the value of the "type" field. Type user.Type `json:"type,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Surname holds the value of the "surname" field. Surname string `json:"surname,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryCredentials ¶
func (u *User) QueryCredentials() *CredentialQuery
QueryCredentials queries the credentials edge of the User.
func (*User) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that, you need to call User.Unwrap() before calling this method, if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a create builder for User.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uint) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Create returns a query builder for User.
func (*UserClient) QueryCredentials ¶
func (c *UserClient) QueryCredentials(u *User) *CredentialQuery
QueryCredentials queries the credentials edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uint) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the created_at field.
func (*UserCreate) SetCredentials ¶
func (uc *UserCreate) SetCredentials(c *Credential) *UserCreate
SetCredentials sets the credentials edge to Credential.
func (*UserCreate) SetCredentialsID ¶
func (uc *UserCreate) SetCredentialsID(id int) *UserCreate
SetCredentialsID sets the credentials edge to Credential by id.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the email field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the name field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*UserCreate) SetNillableCredentialsID ¶
func (uc *UserCreate) SetNillableCredentialsID(id *int) *UserCreate
SetNillableCredentialsID sets the credentials edge to Credential by id if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*UserCreate) SetSurname ¶
func (uc *UserCreate) SetSurname(s string) *UserCreate
SetSurname sets the surname field.
func (*UserCreate) SetType ¶
func (uc *UserCreate) SetType(u user.Type) *UserCreate
SetType sets the type field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the updated_at field.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where adds a new predicate to the delete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Credentials holds the value of the credentials edge. Credentials *Credential // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) CredentialsOrErr ¶
func (e UserEdges) CredentialsOrErr() (*Credential, error)
CredentialsOrErr returns the Credentials value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the builder for group-by User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...Aggregate) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type UserLevel ¶
type UserLevel struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Workspace holds the value of the "workspace" field. Workspace string `json:"workspace,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserLevelQuery when eager-loading is set. Edges UserLevelEdges `json:"edges"` // contains filtered or unexported fields }
UserLevel is the model entity for the UserLevel schema.
func (*UserLevel) QueryDeveloper ¶
QueryDeveloper queries the developer edge of the UserLevel.
func (*UserLevel) QueryLevel ¶
func (ul *UserLevel) QueryLevel() *LevelQuery
QueryLevel queries the level edge of the UserLevel.
func (*UserLevel) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*UserLevel) Update ¶
func (ul *UserLevel) Update() *UserLevelUpdateOne
Update returns a builder for updating this UserLevel. Note that, you need to call UserLevel.Unwrap() before calling this method, if this UserLevel was returned from a transaction, and the transaction was committed or rolled back.
type UserLevelClient ¶
type UserLevelClient struct {
// contains filtered or unexported fields
}
UserLevelClient is a client for the UserLevel schema.
func NewUserLevelClient ¶
func NewUserLevelClient(c config) *UserLevelClient
NewUserLevelClient returns a client for the UserLevel from the given config.
func (*UserLevelClient) Create ¶
func (c *UserLevelClient) Create() *UserLevelCreate
Create returns a create builder for UserLevel.
func (*UserLevelClient) Delete ¶
func (c *UserLevelClient) Delete() *UserLevelDelete
Delete returns a delete builder for UserLevel.
func (*UserLevelClient) DeleteOne ¶
func (c *UserLevelClient) DeleteOne(ul *UserLevel) *UserLevelDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserLevelClient) DeleteOneID ¶
func (c *UserLevelClient) DeleteOneID(id int) *UserLevelDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserLevelClient) GetX ¶
func (c *UserLevelClient) GetX(ctx context.Context, id int) *UserLevel
GetX is like Get, but panics if an error occurs.
func (*UserLevelClient) Hooks ¶
func (c *UserLevelClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserLevelClient) Query ¶
func (c *UserLevelClient) Query() *UserLevelQuery
Create returns a query builder for UserLevel.
func (*UserLevelClient) QueryDeveloper ¶
func (c *UserLevelClient) QueryDeveloper(ul *UserLevel) *UserQuery
QueryDeveloper queries the developer edge of a UserLevel.
func (*UserLevelClient) QueryLevel ¶
func (c *UserLevelClient) QueryLevel(ul *UserLevel) *LevelQuery
QueryLevel queries the level edge of a UserLevel.
func (*UserLevelClient) Update ¶
func (c *UserLevelClient) Update() *UserLevelUpdate
Update returns an update builder for UserLevel.
func (*UserLevelClient) UpdateOne ¶
func (c *UserLevelClient) UpdateOne(ul *UserLevel) *UserLevelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserLevelClient) UpdateOneID ¶
func (c *UserLevelClient) UpdateOneID(id int) *UserLevelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserLevelClient) Use ¶
func (c *UserLevelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userlevel.Hooks(f(g(h())))`.
type UserLevelCreate ¶
type UserLevelCreate struct {
// contains filtered or unexported fields
}
UserLevelCreate is the builder for creating a UserLevel entity.
func (*UserLevelCreate) Save ¶
func (ulc *UserLevelCreate) Save(ctx context.Context) (*UserLevel, error)
Save creates the UserLevel in the database.
func (*UserLevelCreate) SaveX ¶
func (ulc *UserLevelCreate) SaveX(ctx context.Context) *UserLevel
SaveX calls Save and panics if Save returns an error.
func (*UserLevelCreate) SetCode ¶
func (ulc *UserLevelCreate) SetCode(s string) *UserLevelCreate
SetCode sets the code field.
func (*UserLevelCreate) SetCreatedAt ¶
func (ulc *UserLevelCreate) SetCreatedAt(t time.Time) *UserLevelCreate
SetCreatedAt sets the created_at field.
func (*UserLevelCreate) SetDeveloper ¶
func (ulc *UserLevelCreate) SetDeveloper(u *User) *UserLevelCreate
SetDeveloper sets the developer edge to User.
func (*UserLevelCreate) SetDeveloperID ¶
func (ulc *UserLevelCreate) SetDeveloperID(id uint) *UserLevelCreate
SetDeveloperID sets the developer edge to User by id.
func (*UserLevelCreate) SetLevel ¶
func (ulc *UserLevelCreate) SetLevel(l *Level) *UserLevelCreate
SetLevel sets the level edge to Level.
func (*UserLevelCreate) SetLevelID ¶
func (ulc *UserLevelCreate) SetLevelID(id uint) *UserLevelCreate
SetLevelID sets the level edge to Level by id.
func (*UserLevelCreate) SetNillableCreatedAt ¶
func (ulc *UserLevelCreate) SetNillableCreatedAt(t *time.Time) *UserLevelCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*UserLevelCreate) SetNillableUpdatedAt ¶
func (ulc *UserLevelCreate) SetNillableUpdatedAt(t *time.Time) *UserLevelCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*UserLevelCreate) SetUpdatedAt ¶
func (ulc *UserLevelCreate) SetUpdatedAt(t time.Time) *UserLevelCreate
SetUpdatedAt sets the updated_at field.
func (*UserLevelCreate) SetWorkspace ¶
func (ulc *UserLevelCreate) SetWorkspace(s string) *UserLevelCreate
SetWorkspace sets the workspace field.
type UserLevelDelete ¶
type UserLevelDelete struct {
// contains filtered or unexported fields
}
UserLevelDelete is the builder for deleting a UserLevel entity.
func (*UserLevelDelete) Exec ¶
func (uld *UserLevelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserLevelDelete) ExecX ¶
func (uld *UserLevelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserLevelDelete) Where ¶
func (uld *UserLevelDelete) Where(ps ...predicate.UserLevel) *UserLevelDelete
Where adds a new predicate to the delete builder.
type UserLevelDeleteOne ¶
type UserLevelDeleteOne struct {
// contains filtered or unexported fields
}
UserLevelDeleteOne is the builder for deleting a single UserLevel entity.
func (*UserLevelDeleteOne) Exec ¶
func (uldo *UserLevelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserLevelDeleteOne) ExecX ¶
func (uldo *UserLevelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserLevelEdges ¶
type UserLevelEdges struct { // Developer holds the value of the developer edge. Developer *User // Level holds the value of the level edge. Level *Level // contains filtered or unexported fields }
UserLevelEdges holds the relations/edges for other nodes in the graph.
func (UserLevelEdges) DeveloperOrErr ¶
func (e UserLevelEdges) DeveloperOrErr() (*User, error)
DeveloperOrErr returns the Developer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserLevelEdges) LevelOrErr ¶
func (e UserLevelEdges) LevelOrErr() (*Level, error)
LevelOrErr returns the Level value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserLevelGroupBy ¶
type UserLevelGroupBy struct {
// contains filtered or unexported fields
}
UserLevelGroupBy is the builder for group-by UserLevel entities.
func (*UserLevelGroupBy) Aggregate ¶
func (ulgb *UserLevelGroupBy) Aggregate(fns ...Aggregate) *UserLevelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserLevelGroupBy) Bools ¶
func (ulgb *UserLevelGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*UserLevelGroupBy) BoolsX ¶
func (ulgb *UserLevelGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserLevelGroupBy) Float64s ¶
func (ulgb *UserLevelGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*UserLevelGroupBy) Float64sX ¶
func (ulgb *UserLevelGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserLevelGroupBy) Ints ¶
func (ulgb *UserLevelGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*UserLevelGroupBy) IntsX ¶
func (ulgb *UserLevelGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserLevelGroupBy) Scan ¶
func (ulgb *UserLevelGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*UserLevelGroupBy) ScanX ¶
func (ulgb *UserLevelGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type UserLevelMutation ¶
type UserLevelMutation struct {
// contains filtered or unexported fields
}
UserLevelMutation represents an operation that mutate the UserLevels nodes in the graph.
func (*UserLevelMutation) AddField ¶
func (m *UserLevelMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserLevelMutation) AddedEdges ¶
func (m *UserLevelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserLevelMutation) AddedField ¶
func (m *UserLevelMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*UserLevelMutation) AddedFields ¶
func (m *UserLevelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*UserLevelMutation) AddedIDs ¶
func (m *UserLevelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*UserLevelMutation) ClearDeveloper ¶
func (m *UserLevelMutation) ClearDeveloper()
ClearDeveloper clears the developer edge to User.
func (*UserLevelMutation) ClearEdge ¶
func (m *UserLevelMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*UserLevelMutation) ClearField ¶
func (m *UserLevelMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*UserLevelMutation) ClearLevel ¶
func (m *UserLevelMutation) ClearLevel()
ClearLevel clears the level edge to Level.
func (*UserLevelMutation) ClearedEdges ¶
func (m *UserLevelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserLevelMutation) ClearedFields ¶
func (m *UserLevelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserLevelMutation) Client ¶
func (m UserLevelMutation) 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 (*UserLevelMutation) Code ¶
func (m *UserLevelMutation) Code() (r string, exists bool)
Code returns the code value in the mutation.
func (*UserLevelMutation) CreatedAt ¶
func (m *UserLevelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*UserLevelMutation) DeveloperCleared ¶
func (m *UserLevelMutation) DeveloperCleared() bool
DeveloperCleared returns if the edge developer was cleared.
func (*UserLevelMutation) DeveloperID ¶
func (m *UserLevelMutation) DeveloperID() (id uint, exists bool)
DeveloperID returns the developer id in the mutation.
func (*UserLevelMutation) DeveloperIDs ¶
func (m *UserLevelMutation) DeveloperIDs() (ids []uint)
DeveloperIDs returns the developer ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use DeveloperID instead. It exists only for internal usage by the builders.
func (*UserLevelMutation) EdgeCleared ¶
func (m *UserLevelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*UserLevelMutation) Field ¶
func (m *UserLevelMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*UserLevelMutation) FieldCleared ¶
func (m *UserLevelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*UserLevelMutation) Fields ¶
func (m *UserLevelMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*UserLevelMutation) ID ¶
func (m *UserLevelMutation) ID() (id int, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*UserLevelMutation) LevelCleared ¶
func (m *UserLevelMutation) LevelCleared() bool
LevelCleared returns if the edge level was cleared.
func (*UserLevelMutation) LevelID ¶
func (m *UserLevelMutation) LevelID() (id uint, exists bool)
LevelID returns the level id in the mutation.
func (*UserLevelMutation) LevelIDs ¶
func (m *UserLevelMutation) LevelIDs() (ids []uint)
LevelIDs returns the level ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use LevelID instead. It exists only for internal usage by the builders.
func (*UserLevelMutation) RemovedEdges ¶
func (m *UserLevelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserLevelMutation) RemovedIDs ¶
func (m *UserLevelMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*UserLevelMutation) ResetCode ¶
func (m *UserLevelMutation) ResetCode()
ResetCode reset all changes of the code field.
func (*UserLevelMutation) ResetCreatedAt ¶
func (m *UserLevelMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the created_at field.
func (*UserLevelMutation) ResetDeveloper ¶
func (m *UserLevelMutation) ResetDeveloper()
ResetDeveloper reset all changes of the developer edge.
func (*UserLevelMutation) ResetEdge ¶
func (m *UserLevelMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*UserLevelMutation) ResetField ¶
func (m *UserLevelMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*UserLevelMutation) ResetLevel ¶
func (m *UserLevelMutation) ResetLevel()
ResetLevel reset all changes of the level edge.
func (*UserLevelMutation) ResetUpdatedAt ¶
func (m *UserLevelMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the updated_at field.
func (*UserLevelMutation) ResetWorkspace ¶
func (m *UserLevelMutation) ResetWorkspace()
ResetWorkspace reset all changes of the workspace field.
func (*UserLevelMutation) SetCode ¶
func (m *UserLevelMutation) SetCode(s string)
SetCode sets the code field.
func (*UserLevelMutation) SetCreatedAt ¶
func (m *UserLevelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*UserLevelMutation) SetDeveloperID ¶
func (m *UserLevelMutation) SetDeveloperID(id uint)
SetDeveloperID sets the developer edge to User by id.
func (*UserLevelMutation) SetField ¶
func (m *UserLevelMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserLevelMutation) SetLevelID ¶
func (m *UserLevelMutation) SetLevelID(id uint)
SetLevelID sets the level edge to Level by id.
func (*UserLevelMutation) SetUpdatedAt ¶
func (m *UserLevelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*UserLevelMutation) SetWorkspace ¶
func (m *UserLevelMutation) SetWorkspace(s string)
SetWorkspace sets the workspace field.
func (UserLevelMutation) Tx ¶
func (m UserLevelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserLevelMutation) Type ¶
func (m *UserLevelMutation) Type() string
Type returns the node type of this mutation (UserLevel).
func (*UserLevelMutation) UpdatedAt ¶
func (m *UserLevelMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*UserLevelMutation) Workspace ¶
func (m *UserLevelMutation) Workspace() (r string, exists bool)
Workspace returns the workspace value in the mutation.
type UserLevelQuery ¶
type UserLevelQuery struct {
// contains filtered or unexported fields
}
UserLevelQuery is the builder for querying UserLevel entities.
func (*UserLevelQuery) All ¶
func (ulq *UserLevelQuery) All(ctx context.Context) ([]*UserLevel, error)
All executes the query and returns a list of UserLevels.
func (*UserLevelQuery) AllX ¶
func (ulq *UserLevelQuery) AllX(ctx context.Context) []*UserLevel
AllX is like All, but panics if an error occurs.
func (*UserLevelQuery) Clone ¶
func (ulq *UserLevelQuery) Clone() *UserLevelQuery
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserLevelQuery) Count ¶
func (ulq *UserLevelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserLevelQuery) CountX ¶
func (ulq *UserLevelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserLevelQuery) Exist ¶
func (ulq *UserLevelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserLevelQuery) ExistX ¶
func (ulq *UserLevelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserLevelQuery) First ¶
func (ulq *UserLevelQuery) First(ctx context.Context) (*UserLevel, error)
First returns the first UserLevel entity in the query. Returns *NotFoundError when no userlevel was found.
func (*UserLevelQuery) FirstID ¶
func (ulq *UserLevelQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserLevel id in the query. Returns *NotFoundError when no id was found.
func (*UserLevelQuery) FirstX ¶
func (ulq *UserLevelQuery) FirstX(ctx context.Context) *UserLevel
FirstX is like First, but panics if an error occurs.
func (*UserLevelQuery) FirstXID ¶
func (ulq *UserLevelQuery) FirstXID(ctx context.Context) int
FirstXID is like FirstID, but panics if an error occurs.
func (*UserLevelQuery) GroupBy ¶
func (ulq *UserLevelQuery) GroupBy(field string, fields ...string) *UserLevelGroupBy
GroupBy 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.UserLevel.Query(). GroupBy(userlevel.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserLevelQuery) IDs ¶
func (ulq *UserLevelQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserLevel ids.
func (*UserLevelQuery) IDsX ¶
func (ulq *UserLevelQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserLevelQuery) Limit ¶
func (ulq *UserLevelQuery) Limit(limit int) *UserLevelQuery
Limit adds a limit step to the query.
func (*UserLevelQuery) Offset ¶
func (ulq *UserLevelQuery) Offset(offset int) *UserLevelQuery
Offset adds an offset step to the query.
func (*UserLevelQuery) Only ¶
func (ulq *UserLevelQuery) Only(ctx context.Context) (*UserLevel, error)
Only returns the only UserLevel entity in the query, returns an error if not exactly one entity was returned.
func (*UserLevelQuery) OnlyID ¶
func (ulq *UserLevelQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID returns the only UserLevel id in the query, returns an error if not exactly one id was returned.
func (*UserLevelQuery) OnlyX ¶
func (ulq *UserLevelQuery) OnlyX(ctx context.Context) *UserLevel
OnlyX is like Only, but panics if an error occurs.
func (*UserLevelQuery) OnlyXID ¶
func (ulq *UserLevelQuery) OnlyXID(ctx context.Context) int
OnlyXID is like OnlyID, but panics if an error occurs.
func (*UserLevelQuery) Order ¶
func (ulq *UserLevelQuery) Order(o ...Order) *UserLevelQuery
Order adds an order step to the query.
func (*UserLevelQuery) QueryDeveloper ¶
func (ulq *UserLevelQuery) QueryDeveloper() *UserQuery
QueryDeveloper chains the current query on the developer edge.
func (*UserLevelQuery) QueryLevel ¶
func (ulq *UserLevelQuery) QueryLevel() *LevelQuery
QueryLevel chains the current query on the level edge.
func (*UserLevelQuery) Select ¶
func (ulq *UserLevelQuery) Select(field string, fields ...string) *UserLevelSelect
Select one or more fields from the given query.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.UserLevel.Query(). Select(userlevel.FieldCreatedAt). Scan(ctx, &v)
func (*UserLevelQuery) Where ¶
func (ulq *UserLevelQuery) Where(ps ...predicate.UserLevel) *UserLevelQuery
Where adds a new predicate for the builder.
func (*UserLevelQuery) WithDeveloper ¶
func (ulq *UserLevelQuery) WithDeveloper(opts ...func(*UserQuery)) *UserLevelQuery
WithDeveloper tells the query-builder to eager-loads the nodes that are connected to
the "developer" edge. The optional arguments used to configure the query builder of the edge.
func (*UserLevelQuery) WithLevel ¶
func (ulq *UserLevelQuery) WithLevel(opts ...func(*LevelQuery)) *UserLevelQuery
WithLevel tells the query-builder to eager-loads the nodes that are connected to
the "level" edge. The optional arguments used to configure the query builder of the edge.
type UserLevelSelect ¶
type UserLevelSelect struct {
// contains filtered or unexported fields
}
UserLevelSelect is the builder for select fields of UserLevel entities.
func (*UserLevelSelect) Bools ¶
func (uls *UserLevelSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*UserLevelSelect) BoolsX ¶
func (uls *UserLevelSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserLevelSelect) Float64s ¶
func (uls *UserLevelSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*UserLevelSelect) Float64sX ¶
func (uls *UserLevelSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserLevelSelect) Ints ¶
func (uls *UserLevelSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*UserLevelSelect) IntsX ¶
func (uls *UserLevelSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserLevelSelect) Scan ¶
func (uls *UserLevelSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*UserLevelSelect) ScanX ¶
func (uls *UserLevelSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type UserLevelUpdate ¶
type UserLevelUpdate struct {
// contains filtered or unexported fields
}
UserLevelUpdate is the builder for updating UserLevel entities.
func (*UserLevelUpdate) ClearDeveloper ¶
func (ulu *UserLevelUpdate) ClearDeveloper() *UserLevelUpdate
ClearDeveloper clears the developer edge to User.
func (*UserLevelUpdate) ClearLevel ¶
func (ulu *UserLevelUpdate) ClearLevel() *UserLevelUpdate
ClearLevel clears the level edge to Level.
func (*UserLevelUpdate) Exec ¶
func (ulu *UserLevelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserLevelUpdate) ExecX ¶
func (ulu *UserLevelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLevelUpdate) Save ¶
func (ulu *UserLevelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*UserLevelUpdate) SaveX ¶
func (ulu *UserLevelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserLevelUpdate) SetCode ¶
func (ulu *UserLevelUpdate) SetCode(s string) *UserLevelUpdate
SetCode sets the code field.
func (*UserLevelUpdate) SetDeveloper ¶
func (ulu *UserLevelUpdate) SetDeveloper(u *User) *UserLevelUpdate
SetDeveloper sets the developer edge to User.
func (*UserLevelUpdate) SetDeveloperID ¶
func (ulu *UserLevelUpdate) SetDeveloperID(id uint) *UserLevelUpdate
SetDeveloperID sets the developer edge to User by id.
func (*UserLevelUpdate) SetLevel ¶
func (ulu *UserLevelUpdate) SetLevel(l *Level) *UserLevelUpdate
SetLevel sets the level edge to Level.
func (*UserLevelUpdate) SetLevelID ¶
func (ulu *UserLevelUpdate) SetLevelID(id uint) *UserLevelUpdate
SetLevelID sets the level edge to Level by id.
func (*UserLevelUpdate) SetUpdatedAt ¶
func (ulu *UserLevelUpdate) SetUpdatedAt(t time.Time) *UserLevelUpdate
SetUpdatedAt sets the updated_at field.
func (*UserLevelUpdate) SetWorkspace ¶
func (ulu *UserLevelUpdate) SetWorkspace(s string) *UserLevelUpdate
SetWorkspace sets the workspace field.
func (*UserLevelUpdate) Where ¶
func (ulu *UserLevelUpdate) Where(ps ...predicate.UserLevel) *UserLevelUpdate
Where adds a new predicate for the builder.
type UserLevelUpdateOne ¶
type UserLevelUpdateOne struct {
// contains filtered or unexported fields
}
UserLevelUpdateOne is the builder for updating a single UserLevel entity.
func (*UserLevelUpdateOne) ClearDeveloper ¶
func (uluo *UserLevelUpdateOne) ClearDeveloper() *UserLevelUpdateOne
ClearDeveloper clears the developer edge to User.
func (*UserLevelUpdateOne) ClearLevel ¶
func (uluo *UserLevelUpdateOne) ClearLevel() *UserLevelUpdateOne
ClearLevel clears the level edge to Level.
func (*UserLevelUpdateOne) Exec ¶
func (uluo *UserLevelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserLevelUpdateOne) ExecX ¶
func (uluo *UserLevelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLevelUpdateOne) Save ¶
func (uluo *UserLevelUpdateOne) Save(ctx context.Context) (*UserLevel, error)
Save executes the query and returns the updated entity.
func (*UserLevelUpdateOne) SaveX ¶
func (uluo *UserLevelUpdateOne) SaveX(ctx context.Context) *UserLevel
SaveX is like Save, but panics if an error occurs.
func (*UserLevelUpdateOne) SetCode ¶
func (uluo *UserLevelUpdateOne) SetCode(s string) *UserLevelUpdateOne
SetCode sets the code field.
func (*UserLevelUpdateOne) SetDeveloper ¶
func (uluo *UserLevelUpdateOne) SetDeveloper(u *User) *UserLevelUpdateOne
SetDeveloper sets the developer edge to User.
func (*UserLevelUpdateOne) SetDeveloperID ¶
func (uluo *UserLevelUpdateOne) SetDeveloperID(id uint) *UserLevelUpdateOne
SetDeveloperID sets the developer edge to User by id.
func (*UserLevelUpdateOne) SetLevel ¶
func (uluo *UserLevelUpdateOne) SetLevel(l *Level) *UserLevelUpdateOne
SetLevel sets the level edge to Level.
func (*UserLevelUpdateOne) SetLevelID ¶
func (uluo *UserLevelUpdateOne) SetLevelID(id uint) *UserLevelUpdateOne
SetLevelID sets the level edge to Level by id.
func (*UserLevelUpdateOne) SetUpdatedAt ¶
func (uluo *UserLevelUpdateOne) SetUpdatedAt(t time.Time) *UserLevelUpdateOne
SetUpdatedAt sets the updated_at field.
func (*UserLevelUpdateOne) SetWorkspace ¶
func (uluo *UserLevelUpdateOne) SetWorkspace(s string) *UserLevelUpdateOne
SetWorkspace sets the workspace field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutate the Users nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was in/decremented from a field with the given name. The second value indicates that this field was not set, or was not define in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*UserMutation) ClearCredentials ¶
func (m *UserMutation) ClearCredentials()
ClearCredentials clears the credentials edge to Credential.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value for the given name. It returns an error if the edge name is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value for the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*UserMutation) CredentialsCleared ¶
func (m *UserMutation) CredentialsCleared() bool
CredentialsCleared returns if the edge credentials was cleared.
func (*UserMutation) CredentialsID ¶
func (m *UserMutation) CredentialsID() (id int, exists bool)
CredentialsID returns the credentials id in the mutation.
func (*UserMutation) CredentialsIDs ¶
func (m *UserMutation) CredentialsIDs() (ids []int)
CredentialsIDs returns the credentials ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use CredentialsID instead. It exists only for internal usage by the builders.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the email value in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean value indicates that this field was not set, or was not define in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that, in order to get all numeric fields that were in/decremented, call AddedFields().
func (*UserMutation) GetType ¶
func (m *UserMutation) GetType() (r user.Type, exists bool)
GetType returns the type value in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uint, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the created_at field.
func (*UserMutation) ResetCredentials ¶
func (m *UserMutation) ResetCredentials()
ResetCredentials reset all changes of the credentials edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes in the mutation regarding the given edge name. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail reset all changes of the email field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation regarding the given field name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName reset all changes of the name field.
func (*UserMutation) ResetSurname ¶
func (m *UserMutation) ResetSurname()
ResetSurname reset all changes of the surname field.
func (*UserMutation) ResetType ¶
func (m *UserMutation) ResetType()
ResetType reset all changes of the type field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the updated_at field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*UserMutation) SetCredentialsID ¶
func (m *UserMutation) SetCredentialsID(id int)
SetCredentialsID sets the credentials edge to Credential by id.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the email field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value for the given name. It returns an error if the field is not defined in the schema, or if the type mismatch the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uint)
SetID sets the value of the id field. Note that, this operation is accepted only on User creation.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the name field.
func (*UserMutation) SetSurname ¶
func (m *UserMutation) SetSurname(s string)
SetSurname sets the surname field.
func (*UserMutation) SetType ¶
func (m *UserMutation) SetType(u user.Type)
SetType sets the type field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*UserMutation) Surname ¶
func (m *UserMutation) Surname() (r string, exists bool)
Surname returns the surname value in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity in the query. Returns *NotFoundError when no user was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User id in the query. Returns *NotFoundError when no id was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy 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 { Type user.Type `json:"type,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldType). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns the only User entity in the query, returns an error if not exactly one entity was returned.
func (*UserQuery) OnlyID ¶
OnlyID returns the only User id in the query, returns an error if not exactly one id was returned.
func (*UserQuery) QueryCredentials ¶
func (uq *UserQuery) QueryCredentials() *CredentialQuery
QueryCredentials chains the current query on the credentials edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
Select one or more fields from the given query.
Example:
var v []struct { Type user.Type `json:"type,omitempty"` } client.User.Query(). Select(user.FieldType). Scan(ctx, &v)
func (*UserQuery) WithCredentials ¶
func (uq *UserQuery) WithCredentials(opts ...func(*CredentialQuery)) *UserQuery
WithCredentials tells the query-builder to eager-loads the nodes that are connected to
the "credentials" edge. The optional arguments used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct {
// contains filtered or unexported fields
}
UserSelect is the builder for select fields of User entities.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) ClearCredentials ¶
func (uu *UserUpdate) ClearCredentials() *UserUpdate
ClearCredentials clears the credentials edge to Credential.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCredentials ¶
func (uu *UserUpdate) SetCredentials(c *Credential) *UserUpdate
SetCredentials sets the credentials edge to Credential.
func (*UserUpdate) SetCredentialsID ¶
func (uu *UserUpdate) SetCredentialsID(id int) *UserUpdate
SetCredentialsID sets the credentials edge to Credential by id.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the email field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the name field.
func (*UserUpdate) SetNillableCredentialsID ¶
func (uu *UserUpdate) SetNillableCredentialsID(id *int) *UserUpdate
SetNillableCredentialsID sets the credentials edge to Credential by id if the given value is not nil.
func (*UserUpdate) SetSurname ¶
func (uu *UserUpdate) SetSurname(s string) *UserUpdate
SetSurname sets the surname field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the updated_at field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) ClearCredentials ¶
func (uuo *UserUpdateOne) ClearCredentials() *UserUpdateOne
ClearCredentials clears the credentials edge to Credential.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) SetCredentials ¶
func (uuo *UserUpdateOne) SetCredentials(c *Credential) *UserUpdateOne
SetCredentials sets the credentials edge to Credential.
func (*UserUpdateOne) SetCredentialsID ¶
func (uuo *UserUpdateOne) SetCredentialsID(id int) *UserUpdateOne
SetCredentialsID sets the credentials edge to Credential by id.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the email field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the name field.
func (*UserUpdateOne) SetNillableCredentialsID ¶
func (uuo *UserUpdateOne) SetNillableCredentialsID(id *int) *UserUpdateOne
SetNillableCredentialsID sets the credentials edge to Credential by id if the given value is not nil.
func (*UserUpdateOne) SetSurname ¶
func (uuo *UserUpdateOne) SetSurname(s string) *UserUpdateOne
SetSurname sets the surname field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the updated_at field.
Source Files ¶
- classroom.go
- classroom_create.go
- classroom_delete.go
- classroom_query.go
- classroom_update.go
- client.go
- config.go
- context.go
- credential.go
- credential_create.go
- credential_delete.go
- credential_query.go
- credential_update.go
- ent.go
- generate.go
- level.go
- level_create.go
- level_delete.go
- level_query.go
- level_update.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userlevel.go
- userlevel_create.go
- userlevel_delete.go
- userlevel_query.go
- userlevel_update.go