Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Group
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id uuid.UUID) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id uuid.UUID) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id uuid.UUID) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryGroupRoles(gr *Group) *GroupRoleQuery
- func (c *GroupClient) QueryWorkspaces(gr *Group) *WorkspaceQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id uuid.UUID) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddGroupRoleIDs(ids ...uuid.UUID) *GroupCreate
- func (gc *GroupCreate) AddGroupRoles(g ...*GroupRole) *GroupCreate
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetDescription(s string) *GroupCreate
- func (gc *GroupCreate) SetID(u uuid.UUID) *GroupCreate
- func (gc *GroupCreate) SetMetadata(m map[string]interface{}) *GroupCreate
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetNillableDescription(s *string) *GroupCreate
- func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate
- func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate
- func (gc *GroupCreate) SetWorkspaces(w *Workspace) *GroupCreate
- func (gc *GroupCreate) SetWorkspacesID(id uuid.UUID) *GroupCreate
- type GroupCreateBulk
- type GroupDelete
- type GroupDeleteOne
- type GroupEdges
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (ggb *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool
- func (ggb *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (ggb *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64
- func (ggb *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (ggb *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ggb *GroupGroupBy) IntX(ctx context.Context) int
- func (ggb *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{})
- func (ggb *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (ggb *GroupGroupBy) StringX(ctx context.Context) string
- func (ggb *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ggb *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupMutation
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddGroupRoleIDs(ids ...uuid.UUID)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearDescription()
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearGroupRoles()
- func (m *GroupMutation) ClearMetadata()
- func (m *GroupMutation) ClearWorkspaces()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroupMutation) Description() (r string, exists bool)
- func (m *GroupMutation) DescriptionCleared() bool
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) GroupRolesCleared() bool
- func (m *GroupMutation) GroupRolesIDs() (ids []uuid.UUID)
- func (m *GroupMutation) ID() (id uuid.UUID, exists bool)
- func (m *GroupMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *GroupMutation) MetadataCleared() bool
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveGroupRoleIDs(ids ...uuid.UUID)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedGroupRolesIDs() (ids []uuid.UUID)
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) ResetCreatedAt()
- func (m *GroupMutation) ResetDescription()
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetGroupRoles()
- func (m *GroupMutation) ResetMetadata()
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetUpdatedAt()
- func (m *GroupMutation) ResetWorkspaces()
- func (m *GroupMutation) SetCreatedAt(t time.Time)
- func (m *GroupMutation) SetDescription(s string)
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetID(id uuid.UUID)
- func (m *GroupMutation) SetMetadata(value map[string]interface{})
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetUpdatedAt(t time.Time)
- func (m *GroupMutation) SetWorkspacesID(id uuid.UUID)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GroupMutation) WorkspacesCleared() bool
- func (m *GroupMutation) WorkspacesID() (id uuid.UUID, exists bool)
- func (m *GroupMutation) WorkspacesIDs() (ids []uuid.UUID)
- type GroupQuery
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []uuid.UUID
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
- func (gq *GroupQuery) QueryGroupRoles() *GroupRoleQuery
- func (gq *GroupQuery) QueryWorkspaces() *WorkspaceQuery
- func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithGroupRoles(opts ...func(*GroupRoleQuery)) *GroupQuery
- func (gq *GroupQuery) WithWorkspaces(opts ...func(*WorkspaceQuery)) *GroupQuery
- type GroupRole
- type GroupRoleClient
- func (c *GroupRoleClient) Create() *GroupRoleCreate
- func (c *GroupRoleClient) CreateBulk(builders ...*GroupRoleCreate) *GroupRoleCreateBulk
- func (c *GroupRoleClient) Delete() *GroupRoleDelete
- func (c *GroupRoleClient) DeleteOne(gr *GroupRole) *GroupRoleDeleteOne
- func (c *GroupRoleClient) DeleteOneID(id uuid.UUID) *GroupRoleDeleteOne
- func (c *GroupRoleClient) Get(ctx context.Context, id uuid.UUID) (*GroupRole, error)
- func (c *GroupRoleClient) GetX(ctx context.Context, id uuid.UUID) *GroupRole
- func (c *GroupRoleClient) Hooks() []Hook
- func (c *GroupRoleClient) Query() *GroupRoleQuery
- func (c *GroupRoleClient) QueryGroups(gr *GroupRole) *GroupQuery
- func (c *GroupRoleClient) QueryUsers(gr *GroupRole) *UserQuery
- func (c *GroupRoleClient) Update() *GroupRoleUpdate
- func (c *GroupRoleClient) UpdateOne(gr *GroupRole) *GroupRoleUpdateOne
- func (c *GroupRoleClient) UpdateOneID(id uuid.UUID) *GroupRoleUpdateOne
- func (c *GroupRoleClient) Use(hooks ...Hook)
- type GroupRoleCreate
- func (grc *GroupRoleCreate) Mutation() *GroupRoleMutation
- func (grc *GroupRoleCreate) Save(ctx context.Context) (*GroupRole, error)
- func (grc *GroupRoleCreate) SaveX(ctx context.Context) *GroupRole
- func (grc *GroupRoleCreate) SetCreatedAt(t time.Time) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetGroupID(u uuid.UUID) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetGroups(g *Group) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetGroupsID(id uuid.UUID) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetID(u uuid.UUID) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetMetadata(m map[string]interface{}) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetName(s string) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetNillableCreatedAt(t *time.Time) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetNillableUpdatedAt(t *time.Time) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetUpdatedAt(t time.Time) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetUserID(u uuid.UUID) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetUsers(u *User) *GroupRoleCreate
- func (grc *GroupRoleCreate) SetUsersID(id uuid.UUID) *GroupRoleCreate
- type GroupRoleCreateBulk
- type GroupRoleDelete
- type GroupRoleDeleteOne
- type GroupRoleEdges
- type GroupRoleGroupBy
- func (grgb *GroupRoleGroupBy) Aggregate(fns ...AggregateFunc) *GroupRoleGroupBy
- func (grgb *GroupRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (grgb *GroupRoleGroupBy) BoolX(ctx context.Context) bool
- func (grgb *GroupRoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (grgb *GroupRoleGroupBy) BoolsX(ctx context.Context) []bool
- func (grgb *GroupRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (grgb *GroupRoleGroupBy) Float64X(ctx context.Context) float64
- func (grgb *GroupRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (grgb *GroupRoleGroupBy) Float64sX(ctx context.Context) []float64
- func (grgb *GroupRoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (grgb *GroupRoleGroupBy) IntX(ctx context.Context) int
- func (grgb *GroupRoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (grgb *GroupRoleGroupBy) IntsX(ctx context.Context) []int
- func (grgb *GroupRoleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (grgb *GroupRoleGroupBy) ScanX(ctx context.Context, v interface{})
- func (grgb *GroupRoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (grgb *GroupRoleGroupBy) StringX(ctx context.Context) string
- func (grgb *GroupRoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (grgb *GroupRoleGroupBy) StringsX(ctx context.Context) []string
- type GroupRoleMutation
- func (m *GroupRoleMutation) AddField(name string, value ent.Value) error
- func (m *GroupRoleMutation) AddedEdges() []string
- func (m *GroupRoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupRoleMutation) AddedFields() []string
- func (m *GroupRoleMutation) AddedIDs(name string) []ent.Value
- func (m *GroupRoleMutation) ClearEdge(name string) error
- func (m *GroupRoleMutation) ClearField(name string) error
- func (m *GroupRoleMutation) ClearGroups()
- func (m *GroupRoleMutation) ClearMetadata()
- func (m *GroupRoleMutation) ClearUsers()
- func (m *GroupRoleMutation) ClearedEdges() []string
- func (m *GroupRoleMutation) ClearedFields() []string
- func (m GroupRoleMutation) Client() *Client
- func (m *GroupRoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GroupRoleMutation) EdgeCleared(name string) bool
- func (m *GroupRoleMutation) Field(name string) (ent.Value, bool)
- func (m *GroupRoleMutation) FieldCleared(name string) bool
- func (m *GroupRoleMutation) Fields() []string
- func (m *GroupRoleMutation) GroupID() (r uuid.UUID, exists bool)
- func (m *GroupRoleMutation) GroupsCleared() bool
- func (m *GroupRoleMutation) GroupsID() (id uuid.UUID, exists bool)
- func (m *GroupRoleMutation) GroupsIDs() (ids []uuid.UUID)
- func (m *GroupRoleMutation) ID() (id uuid.UUID, exists bool)
- func (m *GroupRoleMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *GroupRoleMutation) MetadataCleared() bool
- func (m *GroupRoleMutation) Name() (r string, exists bool)
- func (m *GroupRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupRoleMutation) OldGroupID(ctx context.Context) (v uuid.UUID, err error)
- func (m *GroupRoleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *GroupRoleMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupRoleMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *GroupRoleMutation) Op() Op
- func (m *GroupRoleMutation) RemovedEdges() []string
- func (m *GroupRoleMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupRoleMutation) ResetCreatedAt()
- func (m *GroupRoleMutation) ResetEdge(name string) error
- func (m *GroupRoleMutation) ResetField(name string) error
- func (m *GroupRoleMutation) ResetGroupID()
- func (m *GroupRoleMutation) ResetGroups()
- func (m *GroupRoleMutation) ResetMetadata()
- func (m *GroupRoleMutation) ResetName()
- func (m *GroupRoleMutation) ResetUpdatedAt()
- func (m *GroupRoleMutation) ResetUserID()
- func (m *GroupRoleMutation) ResetUsers()
- func (m *GroupRoleMutation) SetCreatedAt(t time.Time)
- func (m *GroupRoleMutation) SetField(name string, value ent.Value) error
- func (m *GroupRoleMutation) SetGroupID(u uuid.UUID)
- func (m *GroupRoleMutation) SetGroupsID(id uuid.UUID)
- func (m *GroupRoleMutation) SetID(id uuid.UUID)
- func (m *GroupRoleMutation) SetMetadata(value map[string]interface{})
- func (m *GroupRoleMutation) SetName(s string)
- func (m *GroupRoleMutation) SetUpdatedAt(t time.Time)
- func (m *GroupRoleMutation) SetUserID(u uuid.UUID)
- func (m *GroupRoleMutation) SetUsersID(id uuid.UUID)
- func (m GroupRoleMutation) Tx() (*Tx, error)
- func (m *GroupRoleMutation) Type() string
- func (m *GroupRoleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GroupRoleMutation) UserID() (r uuid.UUID, exists bool)
- func (m *GroupRoleMutation) UsersCleared() bool
- func (m *GroupRoleMutation) UsersID() (id uuid.UUID, exists bool)
- func (m *GroupRoleMutation) UsersIDs() (ids []uuid.UUID)
- type GroupRoleQuery
- func (grq *GroupRoleQuery) All(ctx context.Context) ([]*GroupRole, error)
- func (grq *GroupRoleQuery) AllX(ctx context.Context) []*GroupRole
- func (grq *GroupRoleQuery) Clone() *GroupRoleQuery
- func (grq *GroupRoleQuery) Count(ctx context.Context) (int, error)
- func (grq *GroupRoleQuery) CountX(ctx context.Context) int
- func (grq *GroupRoleQuery) Exist(ctx context.Context) (bool, error)
- func (grq *GroupRoleQuery) ExistX(ctx context.Context) bool
- func (grq *GroupRoleQuery) First(ctx context.Context) (*GroupRole, error)
- func (grq *GroupRoleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (grq *GroupRoleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (grq *GroupRoleQuery) FirstX(ctx context.Context) *GroupRole
- func (grq *GroupRoleQuery) GroupBy(field string, fields ...string) *GroupRoleGroupBy
- func (grq *GroupRoleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (grq *GroupRoleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (grq *GroupRoleQuery) Limit(limit int) *GroupRoleQuery
- func (grq *GroupRoleQuery) Offset(offset int) *GroupRoleQuery
- func (grq *GroupRoleQuery) Only(ctx context.Context) (*GroupRole, error)
- func (grq *GroupRoleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (grq *GroupRoleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (grq *GroupRoleQuery) OnlyX(ctx context.Context) *GroupRole
- func (grq *GroupRoleQuery) Order(o ...OrderFunc) *GroupRoleQuery
- func (grq *GroupRoleQuery) QueryGroups() *GroupQuery
- func (grq *GroupRoleQuery) QueryUsers() *UserQuery
- func (grq *GroupRoleQuery) Select(field string, fields ...string) *GroupRoleSelect
- func (grq *GroupRoleQuery) Where(ps ...predicate.GroupRole) *GroupRoleQuery
- func (grq *GroupRoleQuery) WithGroups(opts ...func(*GroupQuery)) *GroupRoleQuery
- func (grq *GroupRoleQuery) WithUsers(opts ...func(*UserQuery)) *GroupRoleQuery
- type GroupRoleSelect
- func (grs *GroupRoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (grs *GroupRoleSelect) BoolX(ctx context.Context) bool
- func (grs *GroupRoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (grs *GroupRoleSelect) BoolsX(ctx context.Context) []bool
- func (grs *GroupRoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (grs *GroupRoleSelect) Float64X(ctx context.Context) float64
- func (grs *GroupRoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (grs *GroupRoleSelect) Float64sX(ctx context.Context) []float64
- func (grs *GroupRoleSelect) Int(ctx context.Context) (_ int, err error)
- func (grs *GroupRoleSelect) IntX(ctx context.Context) int
- func (grs *GroupRoleSelect) Ints(ctx context.Context) ([]int, error)
- func (grs *GroupRoleSelect) IntsX(ctx context.Context) []int
- func (grs *GroupRoleSelect) Scan(ctx context.Context, v interface{}) error
- func (grs *GroupRoleSelect) ScanX(ctx context.Context, v interface{})
- func (grs *GroupRoleSelect) String(ctx context.Context) (_ string, err error)
- func (grs *GroupRoleSelect) StringX(ctx context.Context) string
- func (grs *GroupRoleSelect) Strings(ctx context.Context) ([]string, error)
- func (grs *GroupRoleSelect) StringsX(ctx context.Context) []string
- type GroupRoleUpdate
- func (gru *GroupRoleUpdate) ClearGroups() *GroupRoleUpdate
- func (gru *GroupRoleUpdate) ClearMetadata() *GroupRoleUpdate
- func (gru *GroupRoleUpdate) ClearUsers() *GroupRoleUpdate
- func (gru *GroupRoleUpdate) Exec(ctx context.Context) error
- func (gru *GroupRoleUpdate) ExecX(ctx context.Context)
- func (gru *GroupRoleUpdate) Mutation() *GroupRoleMutation
- func (gru *GroupRoleUpdate) Save(ctx context.Context) (int, error)
- func (gru *GroupRoleUpdate) SaveX(ctx context.Context) int
- func (gru *GroupRoleUpdate) SetGroupID(u uuid.UUID) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetGroups(g *Group) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetGroupsID(id uuid.UUID) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetMetadata(m map[string]interface{}) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetName(s string) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetUpdatedAt(t time.Time) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetUserID(u uuid.UUID) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetUsers(u *User) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) SetUsersID(id uuid.UUID) *GroupRoleUpdate
- func (gru *GroupRoleUpdate) Where(ps ...predicate.GroupRole) *GroupRoleUpdate
- type GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) ClearGroups() *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) ClearMetadata() *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) ClearUsers() *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) Exec(ctx context.Context) error
- func (gruo *GroupRoleUpdateOne) ExecX(ctx context.Context)
- func (gruo *GroupRoleUpdateOne) Mutation() *GroupRoleMutation
- func (gruo *GroupRoleUpdateOne) Save(ctx context.Context) (*GroupRole, error)
- func (gruo *GroupRoleUpdateOne) SaveX(ctx context.Context) *GroupRole
- func (gruo *GroupRoleUpdateOne) SetGroupID(u uuid.UUID) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetGroups(g *Group) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetGroupsID(id uuid.UUID) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetMetadata(m map[string]interface{}) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetName(s string) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetUpdatedAt(t time.Time) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetUserID(u uuid.UUID) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetUsers(u *User) *GroupRoleUpdateOne
- func (gruo *GroupRoleUpdateOne) SetUsersID(id uuid.UUID) *GroupRoleUpdateOne
- type GroupRoles
- type GroupSelect
- func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (gs *GroupSelect) BoolX(ctx context.Context) bool
- func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (gs *GroupSelect) BoolsX(ctx context.Context) []bool
- func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (gs *GroupSelect) Float64X(ctx context.Context) float64
- func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (gs *GroupSelect) Float64sX(ctx context.Context) []float64
- func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (gs *GroupSelect) IntX(ctx context.Context) int
- func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (gs *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error
- func (gs *GroupSelect) ScanX(ctx context.Context, v interface{})
- func (gs *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (gs *GroupSelect) StringX(ctx context.Context) string
- func (gs *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (gs *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddGroupRoleIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) AddGroupRoles(g ...*GroupRole) *GroupUpdate
- func (gu *GroupUpdate) ClearDescription() *GroupUpdate
- func (gu *GroupUpdate) ClearGroupRoles() *GroupUpdate
- func (gu *GroupUpdate) ClearMetadata() *GroupUpdate
- func (gu *GroupUpdate) ClearWorkspaces() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveGroupRoleIDs(ids ...uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) RemoveGroupRoles(g ...*GroupRole) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetDescription(s string) *GroupUpdate
- func (gu *GroupUpdate) SetMetadata(m map[string]interface{}) *GroupUpdate
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableDescription(s *string) *GroupUpdate
- func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate
- func (gu *GroupUpdate) SetWorkspaces(w *Workspace) *GroupUpdate
- func (gu *GroupUpdate) SetWorkspacesID(id uuid.UUID) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddGroupRoleIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddGroupRoles(g ...*GroupRole) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearDescription() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearGroupRoles() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearMetadata() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearWorkspaces() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveGroupRoleIDs(ids ...uuid.UUID) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveGroupRoles(g ...*GroupRole) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) SetDescription(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetMetadata(m map[string]interface{}) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableDescription(s *string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetWorkspaces(w *Workspace) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetWorkspacesID(id uuid.UUID) *GroupUpdateOne
- type Groups
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Permission
- type PermissionClient
- func (c *PermissionClient) Create() *PermissionCreate
- func (c *PermissionClient) CreateBulk(builders ...*PermissionCreate) *PermissionCreateBulk
- func (c *PermissionClient) Delete() *PermissionDelete
- func (c *PermissionClient) DeleteOne(pe *Permission) *PermissionDeleteOne
- func (c *PermissionClient) DeleteOneID(id uuid.UUID) *PermissionDeleteOne
- func (c *PermissionClient) Get(ctx context.Context, id uuid.UUID) (*Permission, error)
- func (c *PermissionClient) GetX(ctx context.Context, id uuid.UUID) *Permission
- func (c *PermissionClient) Hooks() []Hook
- func (c *PermissionClient) Query() *PermissionQuery
- func (c *PermissionClient) Update() *PermissionUpdate
- func (c *PermissionClient) UpdateOne(pe *Permission) *PermissionUpdateOne
- func (c *PermissionClient) UpdateOneID(id uuid.UUID) *PermissionUpdateOne
- func (c *PermissionClient) Use(hooks ...Hook)
- type PermissionCreate
- func (pc *PermissionCreate) Mutation() *PermissionMutation
- func (pc *PermissionCreate) Save(ctx context.Context) (*Permission, error)
- func (pc *PermissionCreate) SaveX(ctx context.Context) *Permission
- func (pc *PermissionCreate) SetAction(s string) *PermissionCreate
- func (pc *PermissionCreate) SetCreatedAt(t time.Time) *PermissionCreate
- func (pc *PermissionCreate) SetID(u uuid.UUID) *PermissionCreate
- func (pc *PermissionCreate) SetNillableCreatedAt(t *time.Time) *PermissionCreate
- func (pc *PermissionCreate) SetNillableUpdatedAt(t *time.Time) *PermissionCreate
- func (pc *PermissionCreate) SetRoleID(u uuid.UUID) *PermissionCreate
- func (pc *PermissionCreate) SetTarget(s string) *PermissionCreate
- func (pc *PermissionCreate) SetUpdatedAt(t time.Time) *PermissionCreate
- type PermissionCreateBulk
- type PermissionDelete
- type PermissionDeleteOne
- type PermissionGroupBy
- func (pgb *PermissionGroupBy) Aggregate(fns ...AggregateFunc) *PermissionGroupBy
- func (pgb *PermissionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (pgb *PermissionGroupBy) BoolX(ctx context.Context) bool
- func (pgb *PermissionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (pgb *PermissionGroupBy) BoolsX(ctx context.Context) []bool
- func (pgb *PermissionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (pgb *PermissionGroupBy) Float64X(ctx context.Context) float64
- func (pgb *PermissionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (pgb *PermissionGroupBy) Float64sX(ctx context.Context) []float64
- func (pgb *PermissionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (pgb *PermissionGroupBy) IntX(ctx context.Context) int
- func (pgb *PermissionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (pgb *PermissionGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PermissionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (pgb *PermissionGroupBy) ScanX(ctx context.Context, v interface{})
- func (pgb *PermissionGroupBy) String(ctx context.Context) (_ string, err error)
- func (pgb *PermissionGroupBy) StringX(ctx context.Context) string
- func (pgb *PermissionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (pgb *PermissionGroupBy) StringsX(ctx context.Context) []string
- type PermissionMutation
- func (m *PermissionMutation) Action() (r string, exists bool)
- func (m *PermissionMutation) AddField(name string, value ent.Value) error
- func (m *PermissionMutation) AddedEdges() []string
- func (m *PermissionMutation) AddedField(name string) (ent.Value, bool)
- func (m *PermissionMutation) AddedFields() []string
- func (m *PermissionMutation) AddedIDs(name string) []ent.Value
- func (m *PermissionMutation) ClearEdge(name string) error
- func (m *PermissionMutation) ClearField(name string) error
- func (m *PermissionMutation) ClearedEdges() []string
- func (m *PermissionMutation) ClearedFields() []string
- func (m PermissionMutation) Client() *Client
- func (m *PermissionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PermissionMutation) EdgeCleared(name string) bool
- func (m *PermissionMutation) Field(name string) (ent.Value, bool)
- func (m *PermissionMutation) FieldCleared(name string) bool
- func (m *PermissionMutation) Fields() []string
- func (m *PermissionMutation) ID() (id uuid.UUID, exists bool)
- func (m *PermissionMutation) OldAction(ctx context.Context) (v string, err error)
- func (m *PermissionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PermissionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PermissionMutation) OldRoleID(ctx context.Context) (v uuid.UUID, err error)
- func (m *PermissionMutation) OldTarget(ctx context.Context) (v string, err error)
- func (m *PermissionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PermissionMutation) Op() Op
- func (m *PermissionMutation) RemovedEdges() []string
- func (m *PermissionMutation) RemovedIDs(name string) []ent.Value
- func (m *PermissionMutation) ResetAction()
- func (m *PermissionMutation) ResetCreatedAt()
- func (m *PermissionMutation) ResetEdge(name string) error
- func (m *PermissionMutation) ResetField(name string) error
- func (m *PermissionMutation) ResetRoleID()
- func (m *PermissionMutation) ResetTarget()
- func (m *PermissionMutation) ResetUpdatedAt()
- func (m *PermissionMutation) RoleID() (r uuid.UUID, exists bool)
- func (m *PermissionMutation) SetAction(s string)
- func (m *PermissionMutation) SetCreatedAt(t time.Time)
- func (m *PermissionMutation) SetField(name string, value ent.Value) error
- func (m *PermissionMutation) SetID(id uuid.UUID)
- func (m *PermissionMutation) SetRoleID(u uuid.UUID)
- func (m *PermissionMutation) SetTarget(s string)
- func (m *PermissionMutation) SetUpdatedAt(t time.Time)
- func (m *PermissionMutation) Target() (r string, exists bool)
- func (m PermissionMutation) Tx() (*Tx, error)
- func (m *PermissionMutation) Type() string
- func (m *PermissionMutation) UpdatedAt() (r time.Time, exists bool)
- type PermissionQuery
- func (pq *PermissionQuery) All(ctx context.Context) ([]*Permission, error)
- func (pq *PermissionQuery) AllX(ctx context.Context) []*Permission
- func (pq *PermissionQuery) Clone() *PermissionQuery
- func (pq *PermissionQuery) Count(ctx context.Context) (int, error)
- func (pq *PermissionQuery) CountX(ctx context.Context) int
- func (pq *PermissionQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PermissionQuery) ExistX(ctx context.Context) bool
- func (pq *PermissionQuery) First(ctx context.Context) (*Permission, error)
- func (pq *PermissionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PermissionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *PermissionQuery) FirstX(ctx context.Context) *Permission
- func (pq *PermissionQuery) GroupBy(field string, fields ...string) *PermissionGroupBy
- func (pq *PermissionQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (pq *PermissionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *PermissionQuery) Limit(limit int) *PermissionQuery
- func (pq *PermissionQuery) Offset(offset int) *PermissionQuery
- func (pq *PermissionQuery) Only(ctx context.Context) (*Permission, error)
- func (pq *PermissionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PermissionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *PermissionQuery) OnlyX(ctx context.Context) *Permission
- func (pq *PermissionQuery) Order(o ...OrderFunc) *PermissionQuery
- func (pq *PermissionQuery) Select(field string, fields ...string) *PermissionSelect
- func (pq *PermissionQuery) Where(ps ...predicate.Permission) *PermissionQuery
- type PermissionSelect
- func (ps *PermissionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ps *PermissionSelect) BoolX(ctx context.Context) bool
- func (ps *PermissionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ps *PermissionSelect) BoolsX(ctx context.Context) []bool
- func (ps *PermissionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ps *PermissionSelect) Float64X(ctx context.Context) float64
- func (ps *PermissionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ps *PermissionSelect) Float64sX(ctx context.Context) []float64
- func (ps *PermissionSelect) Int(ctx context.Context) (_ int, err error)
- func (ps *PermissionSelect) IntX(ctx context.Context) int
- func (ps *PermissionSelect) Ints(ctx context.Context) ([]int, error)
- func (ps *PermissionSelect) IntsX(ctx context.Context) []int
- func (ps *PermissionSelect) Scan(ctx context.Context, v interface{}) error
- func (ps *PermissionSelect) ScanX(ctx context.Context, v interface{})
- func (ps *PermissionSelect) String(ctx context.Context) (_ string, err error)
- func (ps *PermissionSelect) StringX(ctx context.Context) string
- func (ps *PermissionSelect) Strings(ctx context.Context) ([]string, error)
- func (ps *PermissionSelect) StringsX(ctx context.Context) []string
- type PermissionUpdate
- func (pu *PermissionUpdate) Exec(ctx context.Context) error
- func (pu *PermissionUpdate) ExecX(ctx context.Context)
- func (pu *PermissionUpdate) Mutation() *PermissionMutation
- func (pu *PermissionUpdate) Save(ctx context.Context) (int, error)
- func (pu *PermissionUpdate) SaveX(ctx context.Context) int
- func (pu *PermissionUpdate) SetAction(s string) *PermissionUpdate
- func (pu *PermissionUpdate) SetRoleID(u uuid.UUID) *PermissionUpdate
- func (pu *PermissionUpdate) SetTarget(s string) *PermissionUpdate
- func (pu *PermissionUpdate) SetUpdatedAt(t time.Time) *PermissionUpdate
- func (pu *PermissionUpdate) Where(ps ...predicate.Permission) *PermissionUpdate
- type PermissionUpdateOne
- func (puo *PermissionUpdateOne) Exec(ctx context.Context) error
- func (puo *PermissionUpdateOne) ExecX(ctx context.Context)
- func (puo *PermissionUpdateOne) Mutation() *PermissionMutation
- func (puo *PermissionUpdateOne) Save(ctx context.Context) (*Permission, error)
- func (puo *PermissionUpdateOne) SaveX(ctx context.Context) *Permission
- func (puo *PermissionUpdateOne) SetAction(s string) *PermissionUpdateOne
- func (puo *PermissionUpdateOne) SetRoleID(u uuid.UUID) *PermissionUpdateOne
- func (puo *PermissionUpdateOne) SetTarget(s string) *PermissionUpdateOne
- func (puo *PermissionUpdateOne) SetUpdatedAt(t time.Time) *PermissionUpdateOne
- type Permissions
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Session
- type SessionClient
- func (c *SessionClient) Create() *SessionCreate
- func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
- func (c *SessionClient) Delete() *SessionDelete
- func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
- func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne
- func (c *SessionClient) Get(ctx context.Context, id string) (*Session, error)
- func (c *SessionClient) GetX(ctx context.Context, id string) *Session
- func (c *SessionClient) Hooks() []Hook
- func (c *SessionClient) Query() *SessionQuery
- func (c *SessionClient) Update() *SessionUpdate
- func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
- func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne
- func (c *SessionClient) Use(hooks ...Hook)
- type SessionCreate
- func (sc *SessionCreate) Mutation() *SessionMutation
- func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
- func (sc *SessionCreate) SaveX(ctx context.Context) *Session
- func (sc *SessionCreate) SetCreatedAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetData(s string) *SessionCreate
- func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
- func (sc *SessionCreate) SetID(s string) *SessionCreate
- func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableExpiresAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
- func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
- type SessionCreateBulk
- type SessionDelete
- type SessionDeleteOne
- type SessionGroupBy
- func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
- func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
- func (sgb *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
- func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
- func (sgb *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
- func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (sgb *SessionGroupBy) IntX(ctx context.Context) int
- func (sgb *SessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (sgb *SessionGroupBy) StringX(ctx context.Context) string
- func (sgb *SessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (sgb *SessionGroupBy) StringsX(ctx context.Context) []string
- type SessionMutation
- func (m *SessionMutation) AddField(name string, value ent.Value) error
- func (m *SessionMutation) AddedEdges() []string
- func (m *SessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *SessionMutation) AddedFields() []string
- func (m *SessionMutation) AddedIDs(name string) []ent.Value
- func (m *SessionMutation) ClearEdge(name string) error
- func (m *SessionMutation) ClearExpiresAt()
- func (m *SessionMutation) ClearField(name string) error
- func (m *SessionMutation) ClearedEdges() []string
- func (m *SessionMutation) ClearedFields() []string
- func (m SessionMutation) Client() *Client
- func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SessionMutation) Data() (r string, exists bool)
- func (m *SessionMutation) EdgeCleared(name string) bool
- func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)
- func (m *SessionMutation) ExpiresAtCleared() bool
- func (m *SessionMutation) Field(name string) (ent.Value, bool)
- func (m *SessionMutation) FieldCleared(name string) bool
- func (m *SessionMutation) Fields() []string
- func (m *SessionMutation) ID() (id string, exists bool)
- func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) OldData(ctx context.Context) (v string, err error)
- func (m *SessionMutation) OldExpiresAt(ctx context.Context) (v *time.Time, err error)
- func (m *SessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SessionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SessionMutation) Op() Op
- func (m *SessionMutation) RemovedEdges() []string
- func (m *SessionMutation) RemovedIDs(name string) []ent.Value
- func (m *SessionMutation) ResetCreatedAt()
- func (m *SessionMutation) ResetData()
- func (m *SessionMutation) ResetEdge(name string) error
- func (m *SessionMutation) ResetExpiresAt()
- func (m *SessionMutation) ResetField(name string) error
- func (m *SessionMutation) ResetUpdatedAt()
- func (m *SessionMutation) SetCreatedAt(t time.Time)
- func (m *SessionMutation) SetData(s string)
- func (m *SessionMutation) SetExpiresAt(t time.Time)
- func (m *SessionMutation) SetField(name string, value ent.Value) error
- func (m *SessionMutation) SetID(id string)
- func (m *SessionMutation) SetUpdatedAt(t time.Time)
- func (m SessionMutation) Tx() (*Tx, error)
- func (m *SessionMutation) Type() string
- func (m *SessionMutation) UpdatedAt() (r time.Time, exists bool)
- type SessionQuery
- func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
- func (sq *SessionQuery) AllX(ctx context.Context) []*Session
- func (sq *SessionQuery) Clone() *SessionQuery
- func (sq *SessionQuery) Count(ctx context.Context) (int, error)
- func (sq *SessionQuery) CountX(ctx context.Context) int
- func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SessionQuery) ExistX(ctx context.Context) bool
- func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SessionQuery) FirstIDX(ctx context.Context) string
- func (sq *SessionQuery) FirstX(ctx context.Context) *Session
- func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
- func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)
- func (sq *SessionQuery) IDsX(ctx context.Context) []string
- func (sq *SessionQuery) Limit(limit int) *SessionQuery
- func (sq *SessionQuery) Offset(offset int) *SessionQuery
- func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
- func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SessionQuery) OnlyIDX(ctx context.Context) string
- func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
- func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
- func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
- func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
- type SessionSelect
- func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ss *SessionSelect) BoolX(ctx context.Context) bool
- func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
- func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ss *SessionSelect) Float64X(ctx context.Context) float64
- func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
- func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
- func (ss *SessionSelect) IntX(ctx context.Context) int
- func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
- func (ss *SessionSelect) IntsX(ctx context.Context) []int
- func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
- func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
- func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
- func (ss *SessionSelect) StringX(ctx context.Context) string
- func (ss *SessionSelect) Strings(ctx context.Context) ([]string, error)
- func (ss *SessionSelect) StringsX(ctx context.Context) []string
- type SessionUpdate
- func (su *SessionUpdate) ClearExpiresAt() *SessionUpdate
- func (su *SessionUpdate) Exec(ctx context.Context) error
- func (su *SessionUpdate) ExecX(ctx context.Context)
- func (su *SessionUpdate) Mutation() *SessionMutation
- func (su *SessionUpdate) Save(ctx context.Context) (int, error)
- func (su *SessionUpdate) SaveX(ctx context.Context) int
- func (su *SessionUpdate) SetData(s string) *SessionUpdate
- func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
- func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
- func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
- type SessionUpdateOne
- func (suo *SessionUpdateOne) ClearExpiresAt() *SessionUpdateOne
- func (suo *SessionUpdateOne) Exec(ctx context.Context) error
- func (suo *SessionUpdateOne) ExecX(ctx context.Context)
- func (suo *SessionUpdateOne) Mutation() *SessionMutation
- func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
- func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
- func (suo *SessionUpdateOne) SetData(s string) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
- func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
- type Sessions
- type Tx
- type User
- func (u *User) QueryGroupRoles() *GroupRoleQuery
- func (u *User) QueryUserRoles() *UserRoleQuery
- func (u *User) QueryWorkspace() *WorkspaceQuery
- func (u *User) QueryWorkspaceRoles() *WorkspaceRoleQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryGroupRoles(u *User) *GroupRoleQuery
- func (c *UserClient) QueryUserRoles(u *User) *UserRoleQuery
- func (c *UserClient) QueryWorkspace(u *User) *WorkspaceQuery
- func (c *UserClient) QueryWorkspaceRoles(u *User) *WorkspaceRoleQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddGroupRoleIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddGroupRoles(g ...*GroupRole) *UserCreate
- func (uc *UserCreate) AddUserRoleIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddUserRoles(u ...*UserRole) *UserCreate
- func (uc *UserCreate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddWorkspaceRoles(w ...*WorkspaceRole) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAPIKey(s string) *UserCreate
- func (uc *UserCreate) SetBillingID(s string) *UserCreate
- func (uc *UserCreate) SetConfirmationSentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetConfirmationToken(s string) *UserCreate
- func (uc *UserCreate) SetConfirmed(b bool) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetEmailChange(s string) *UserCreate
- func (uc *UserCreate) SetEmailChangeSentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmailChangeToken(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetLastSigninAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetMetadata(m map[string]interface{}) *UserCreate
- func (uc *UserCreate) SetNillableAPIKey(s *string) *UserCreate
- func (uc *UserCreate) SetNillableBillingID(s *string) *UserCreate
- func (uc *UserCreate) SetNillableConfirmationSentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableConfirmationToken(s *string) *UserCreate
- func (uc *UserCreate) SetNillableConfirmed(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmailChange(s *string) *UserCreate
- func (uc *UserCreate) SetNillableEmailChangeSentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmailChangeToken(s *string) *UserCreate
- func (uc *UserCreate) SetNillableLastSigninAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableOtp(s *string) *UserCreate
- func (uc *UserCreate) SetNillableOtpSentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableRecoverySentAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableRecoveryToken(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableWorkspaceID(id *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetOtp(s string) *UserCreate
- func (uc *UserCreate) SetOtpSentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetProvider(s string) *UserCreate
- func (uc *UserCreate) SetRecoverySentAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetRecoveryToken(s string) *UserCreate
- func (uc *UserCreate) SetRoles(s []string) *UserCreate
- func (uc *UserCreate) SetTeams(m map[string]string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetWorkspace(w *Workspace) *UserCreate
- func (uc *UserCreate) SetWorkspaceID(id uuid.UUID) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- 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) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) APIKey() (r string, exists bool)
- func (m *UserMutation) APIKeyCleared() bool
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddGroupRoleIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddUserRoleIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddWorkspaceRoleIDs(ids ...uuid.UUID)
- 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) BillingID() (r string, exists bool)
- func (m *UserMutation) BillingIDCleared() bool
- func (m *UserMutation) ClearAPIKey()
- func (m *UserMutation) ClearBillingID()
- func (m *UserMutation) ClearConfirmationSentAt()
- func (m *UserMutation) ClearConfirmationToken()
- func (m *UserMutation) ClearConfirmed()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmailChange()
- func (m *UserMutation) ClearEmailChangeSentAt()
- func (m *UserMutation) ClearEmailChangeToken()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGroupRoles()
- func (m *UserMutation) ClearLastSigninAt()
- func (m *UserMutation) ClearOtp()
- func (m *UserMutation) ClearOtpSentAt()
- func (m *UserMutation) ClearRecoverySentAt()
- func (m *UserMutation) ClearRecoveryToken()
- func (m *UserMutation) ClearRoles()
- func (m *UserMutation) ClearTeams()
- func (m *UserMutation) ClearUserRoles()
- func (m *UserMutation) ClearWorkspace()
- func (m *UserMutation) ClearWorkspaceRoles()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) ConfirmationSentAt() (r time.Time, exists bool)
- func (m *UserMutation) ConfirmationSentAtCleared() bool
- func (m *UserMutation) ConfirmationToken() (r string, exists bool)
- func (m *UserMutation) ConfirmationTokenCleared() bool
- func (m *UserMutation) Confirmed() (r bool, exists bool)
- func (m *UserMutation) ConfirmedCleared() bool
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailChange() (r string, exists bool)
- func (m *UserMutation) EmailChangeCleared() bool
- func (m *UserMutation) EmailChangeSentAt() (r time.Time, exists bool)
- func (m *UserMutation) EmailChangeSentAtCleared() bool
- func (m *UserMutation) EmailChangeToken() (r string, exists bool)
- func (m *UserMutation) EmailChangeTokenCleared() 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) GroupRolesCleared() bool
- func (m *UserMutation) GroupRolesIDs() (ids []uuid.UUID)
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) LastSigninAt() (r time.Time, exists bool)
- func (m *UserMutation) LastSigninAtCleared() bool
- func (m *UserMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *UserMutation) OldAPIKey(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldBillingID(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldConfirmationSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldConfirmationToken(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldConfirmed(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldEmailChange(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldEmailChangeSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldEmailChangeToken(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLastSigninAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserMutation) OldOtp(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldOtpSentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldRecoverySentAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldRecoveryToken(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldRoles(ctx context.Context) (v []string, err error)
- func (m *UserMutation) OldTeams(ctx context.Context) (v map[string]string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Otp() (r string, exists bool)
- func (m *UserMutation) OtpCleared() bool
- func (m *UserMutation) OtpSentAt() (r time.Time, exists bool)
- func (m *UserMutation) OtpSentAtCleared() bool
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) Provider() (r string, exists bool)
- func (m *UserMutation) RecoverySentAt() (r time.Time, exists bool)
- func (m *UserMutation) RecoverySentAtCleared() bool
- func (m *UserMutation) RecoveryToken() (r string, exists bool)
- func (m *UserMutation) RecoveryTokenCleared() bool
- func (m *UserMutation) RemoveGroupRoleIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveUserRoleIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveWorkspaceRoleIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedGroupRolesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedUserRolesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedWorkspaceRolesIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAPIKey()
- func (m *UserMutation) ResetBillingID()
- func (m *UserMutation) ResetConfirmationSentAt()
- func (m *UserMutation) ResetConfirmationToken()
- func (m *UserMutation) ResetConfirmed()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetEmailChange()
- func (m *UserMutation) ResetEmailChangeSentAt()
- func (m *UserMutation) ResetEmailChangeToken()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGroupRoles()
- func (m *UserMutation) ResetLastSigninAt()
- func (m *UserMutation) ResetMetadata()
- func (m *UserMutation) ResetOtp()
- func (m *UserMutation) ResetOtpSentAt()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetProvider()
- func (m *UserMutation) ResetRecoverySentAt()
- func (m *UserMutation) ResetRecoveryToken()
- func (m *UserMutation) ResetRoles()
- func (m *UserMutation) ResetTeams()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUserRoles()
- func (m *UserMutation) ResetWorkspace()
- func (m *UserMutation) ResetWorkspaceRoles()
- func (m *UserMutation) Roles() (r []string, exists bool)
- func (m *UserMutation) RolesCleared() bool
- func (m *UserMutation) SetAPIKey(s string)
- func (m *UserMutation) SetBillingID(s string)
- func (m *UserMutation) SetConfirmationSentAt(t time.Time)
- func (m *UserMutation) SetConfirmationToken(s string)
- func (m *UserMutation) SetConfirmed(b bool)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetEmailChange(s string)
- func (m *UserMutation) SetEmailChangeSentAt(t time.Time)
- func (m *UserMutation) SetEmailChangeToken(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetLastSigninAt(t time.Time)
- func (m *UserMutation) SetMetadata(value map[string]interface{})
- func (m *UserMutation) SetOtp(s string)
- func (m *UserMutation) SetOtpSentAt(t time.Time)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetProvider(s string)
- func (m *UserMutation) SetRecoverySentAt(t time.Time)
- func (m *UserMutation) SetRecoveryToken(s string)
- func (m *UserMutation) SetRoles(s []string)
- func (m *UserMutation) SetTeams(value map[string]string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetWorkspaceID(id uuid.UUID)
- func (m *UserMutation) Teams() (r map[string]string, exists bool)
- func (m *UserMutation) TeamsCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) UserRolesCleared() bool
- func (m *UserMutation) UserRolesIDs() (ids []uuid.UUID)
- func (m *UserMutation) WorkspaceCleared() bool
- func (m *UserMutation) WorkspaceID() (id uuid.UUID, exists bool)
- func (m *UserMutation) WorkspaceIDs() (ids []uuid.UUID)
- func (m *UserMutation) WorkspaceRolesCleared() bool
- func (m *UserMutation) WorkspaceRolesIDs() (ids []uuid.UUID)
- 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 uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- 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 uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryGroupRoles() *GroupRoleQuery
- func (uq *UserQuery) QueryUserRoles() *UserRoleQuery
- func (uq *UserQuery) QueryWorkspace() *WorkspaceQuery
- func (uq *UserQuery) QueryWorkspaceRoles() *WorkspaceRoleQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithGroupRoles(opts ...func(*GroupRoleQuery)) *UserQuery
- func (uq *UserQuery) WithUserRoles(opts ...func(*UserRoleQuery)) *UserQuery
- func (uq *UserQuery) WithWorkspace(opts ...func(*WorkspaceQuery)) *UserQuery
- func (uq *UserQuery) WithWorkspaceRoles(opts ...func(*WorkspaceRoleQuery)) *UserQuery
- type UserRole
- type UserRoleClient
- func (c *UserRoleClient) Create() *UserRoleCreate
- func (c *UserRoleClient) CreateBulk(builders ...*UserRoleCreate) *UserRoleCreateBulk
- func (c *UserRoleClient) Delete() *UserRoleDelete
- func (c *UserRoleClient) DeleteOne(ur *UserRole) *UserRoleDeleteOne
- func (c *UserRoleClient) DeleteOneID(id uuid.UUID) *UserRoleDeleteOne
- func (c *UserRoleClient) Get(ctx context.Context, id uuid.UUID) (*UserRole, error)
- func (c *UserRoleClient) GetX(ctx context.Context, id uuid.UUID) *UserRole
- func (c *UserRoleClient) Hooks() []Hook
- func (c *UserRoleClient) Query() *UserRoleQuery
- func (c *UserRoleClient) QueryUsers(ur *UserRole) *UserQuery
- func (c *UserRoleClient) Update() *UserRoleUpdate
- func (c *UserRoleClient) UpdateOne(ur *UserRole) *UserRoleUpdateOne
- func (c *UserRoleClient) UpdateOneID(id uuid.UUID) *UserRoleUpdateOne
- func (c *UserRoleClient) Use(hooks ...Hook)
- type UserRoleCreate
- func (urc *UserRoleCreate) Mutation() *UserRoleMutation
- func (urc *UserRoleCreate) Save(ctx context.Context) (*UserRole, error)
- func (urc *UserRoleCreate) SaveX(ctx context.Context) *UserRole
- func (urc *UserRoleCreate) SetCreatedAt(t time.Time) *UserRoleCreate
- func (urc *UserRoleCreate) SetID(u uuid.UUID) *UserRoleCreate
- func (urc *UserRoleCreate) SetMetadata(m map[string]interface{}) *UserRoleCreate
- func (urc *UserRoleCreate) SetName(s string) *UserRoleCreate
- func (urc *UserRoleCreate) SetNillableCreatedAt(t *time.Time) *UserRoleCreate
- func (urc *UserRoleCreate) SetNillableUpdatedAt(t *time.Time) *UserRoleCreate
- func (urc *UserRoleCreate) SetUpdatedAt(t time.Time) *UserRoleCreate
- func (urc *UserRoleCreate) SetUserID(u uuid.UUID) *UserRoleCreate
- func (urc *UserRoleCreate) SetUsers(u *User) *UserRoleCreate
- func (urc *UserRoleCreate) SetUsersID(id uuid.UUID) *UserRoleCreate
- type UserRoleCreateBulk
- type UserRoleDelete
- type UserRoleDeleteOne
- type UserRoleEdges
- type UserRoleGroupBy
- func (urgb *UserRoleGroupBy) Aggregate(fns ...AggregateFunc) *UserRoleGroupBy
- func (urgb *UserRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (urgb *UserRoleGroupBy) BoolX(ctx context.Context) bool
- func (urgb *UserRoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (urgb *UserRoleGroupBy) BoolsX(ctx context.Context) []bool
- func (urgb *UserRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (urgb *UserRoleGroupBy) Float64X(ctx context.Context) float64
- func (urgb *UserRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (urgb *UserRoleGroupBy) Float64sX(ctx context.Context) []float64
- func (urgb *UserRoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (urgb *UserRoleGroupBy) IntX(ctx context.Context) int
- func (urgb *UserRoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (urgb *UserRoleGroupBy) IntsX(ctx context.Context) []int
- func (urgb *UserRoleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (urgb *UserRoleGroupBy) ScanX(ctx context.Context, v interface{})
- func (urgb *UserRoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (urgb *UserRoleGroupBy) StringX(ctx context.Context) string
- func (urgb *UserRoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (urgb *UserRoleGroupBy) StringsX(ctx context.Context) []string
- type UserRoleMutation
- func (m *UserRoleMutation) AddField(name string, value ent.Value) error
- func (m *UserRoleMutation) AddedEdges() []string
- func (m *UserRoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserRoleMutation) AddedFields() []string
- func (m *UserRoleMutation) AddedIDs(name string) []ent.Value
- func (m *UserRoleMutation) ClearEdge(name string) error
- func (m *UserRoleMutation) ClearField(name string) error
- func (m *UserRoleMutation) ClearMetadata()
- func (m *UserRoleMutation) ClearUsers()
- func (m *UserRoleMutation) ClearedEdges() []string
- func (m *UserRoleMutation) ClearedFields() []string
- func (m UserRoleMutation) Client() *Client
- func (m *UserRoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserRoleMutation) EdgeCleared(name string) bool
- func (m *UserRoleMutation) Field(name string) (ent.Value, bool)
- func (m *UserRoleMutation) FieldCleared(name string) bool
- func (m *UserRoleMutation) Fields() []string
- func (m *UserRoleMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserRoleMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *UserRoleMutation) MetadataCleared() bool
- func (m *UserRoleMutation) Name() (r string, exists bool)
- func (m *UserRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserRoleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *UserRoleMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserRoleMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserRoleMutation) Op() Op
- func (m *UserRoleMutation) RemovedEdges() []string
- func (m *UserRoleMutation) RemovedIDs(name string) []ent.Value
- func (m *UserRoleMutation) ResetCreatedAt()
- func (m *UserRoleMutation) ResetEdge(name string) error
- func (m *UserRoleMutation) ResetField(name string) error
- func (m *UserRoleMutation) ResetMetadata()
- func (m *UserRoleMutation) ResetName()
- func (m *UserRoleMutation) ResetUpdatedAt()
- func (m *UserRoleMutation) ResetUserID()
- func (m *UserRoleMutation) ResetUsers()
- func (m *UserRoleMutation) SetCreatedAt(t time.Time)
- func (m *UserRoleMutation) SetField(name string, value ent.Value) error
- func (m *UserRoleMutation) SetID(id uuid.UUID)
- func (m *UserRoleMutation) SetMetadata(value map[string]interface{})
- func (m *UserRoleMutation) SetName(s string)
- func (m *UserRoleMutation) SetUpdatedAt(t time.Time)
- func (m *UserRoleMutation) SetUserID(u uuid.UUID)
- func (m *UserRoleMutation) SetUsersID(id uuid.UUID)
- func (m UserRoleMutation) Tx() (*Tx, error)
- func (m *UserRoleMutation) Type() string
- func (m *UserRoleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserRoleMutation) UserID() (r uuid.UUID, exists bool)
- func (m *UserRoleMutation) UsersCleared() bool
- func (m *UserRoleMutation) UsersID() (id uuid.UUID, exists bool)
- func (m *UserRoleMutation) UsersIDs() (ids []uuid.UUID)
- type UserRoleQuery
- func (urq *UserRoleQuery) All(ctx context.Context) ([]*UserRole, error)
- func (urq *UserRoleQuery) AllX(ctx context.Context) []*UserRole
- func (urq *UserRoleQuery) Clone() *UserRoleQuery
- func (urq *UserRoleQuery) Count(ctx context.Context) (int, error)
- func (urq *UserRoleQuery) CountX(ctx context.Context) int
- func (urq *UserRoleQuery) Exist(ctx context.Context) (bool, error)
- func (urq *UserRoleQuery) ExistX(ctx context.Context) bool
- func (urq *UserRoleQuery) First(ctx context.Context) (*UserRole, error)
- func (urq *UserRoleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (urq *UserRoleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (urq *UserRoleQuery) FirstX(ctx context.Context) *UserRole
- func (urq *UserRoleQuery) GroupBy(field string, fields ...string) *UserRoleGroupBy
- func (urq *UserRoleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (urq *UserRoleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (urq *UserRoleQuery) Limit(limit int) *UserRoleQuery
- func (urq *UserRoleQuery) Offset(offset int) *UserRoleQuery
- func (urq *UserRoleQuery) Only(ctx context.Context) (*UserRole, error)
- func (urq *UserRoleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (urq *UserRoleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (urq *UserRoleQuery) OnlyX(ctx context.Context) *UserRole
- func (urq *UserRoleQuery) Order(o ...OrderFunc) *UserRoleQuery
- func (urq *UserRoleQuery) QueryUsers() *UserQuery
- func (urq *UserRoleQuery) Select(field string, fields ...string) *UserRoleSelect
- func (urq *UserRoleQuery) Where(ps ...predicate.UserRole) *UserRoleQuery
- func (urq *UserRoleQuery) WithUsers(opts ...func(*UserQuery)) *UserRoleQuery
- type UserRoleSelect
- func (urs *UserRoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (urs *UserRoleSelect) BoolX(ctx context.Context) bool
- func (urs *UserRoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (urs *UserRoleSelect) BoolsX(ctx context.Context) []bool
- func (urs *UserRoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (urs *UserRoleSelect) Float64X(ctx context.Context) float64
- func (urs *UserRoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (urs *UserRoleSelect) Float64sX(ctx context.Context) []float64
- func (urs *UserRoleSelect) Int(ctx context.Context) (_ int, err error)
- func (urs *UserRoleSelect) IntX(ctx context.Context) int
- func (urs *UserRoleSelect) Ints(ctx context.Context) ([]int, error)
- func (urs *UserRoleSelect) IntsX(ctx context.Context) []int
- func (urs *UserRoleSelect) Scan(ctx context.Context, v interface{}) error
- func (urs *UserRoleSelect) ScanX(ctx context.Context, v interface{})
- func (urs *UserRoleSelect) String(ctx context.Context) (_ string, err error)
- func (urs *UserRoleSelect) StringX(ctx context.Context) string
- func (urs *UserRoleSelect) Strings(ctx context.Context) ([]string, error)
- func (urs *UserRoleSelect) StringsX(ctx context.Context) []string
- type UserRoleUpdate
- func (uru *UserRoleUpdate) ClearMetadata() *UserRoleUpdate
- func (uru *UserRoleUpdate) ClearUsers() *UserRoleUpdate
- func (uru *UserRoleUpdate) Exec(ctx context.Context) error
- func (uru *UserRoleUpdate) ExecX(ctx context.Context)
- func (uru *UserRoleUpdate) Mutation() *UserRoleMutation
- func (uru *UserRoleUpdate) Save(ctx context.Context) (int, error)
- func (uru *UserRoleUpdate) SaveX(ctx context.Context) int
- func (uru *UserRoleUpdate) SetMetadata(m map[string]interface{}) *UserRoleUpdate
- func (uru *UserRoleUpdate) SetName(s string) *UserRoleUpdate
- func (uru *UserRoleUpdate) SetUpdatedAt(t time.Time) *UserRoleUpdate
- func (uru *UserRoleUpdate) SetUserID(u uuid.UUID) *UserRoleUpdate
- func (uru *UserRoleUpdate) SetUsers(u *User) *UserRoleUpdate
- func (uru *UserRoleUpdate) SetUsersID(id uuid.UUID) *UserRoleUpdate
- func (uru *UserRoleUpdate) Where(ps ...predicate.UserRole) *UserRoleUpdate
- type UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) ClearMetadata() *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) ClearUsers() *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) Exec(ctx context.Context) error
- func (uruo *UserRoleUpdateOne) ExecX(ctx context.Context)
- func (uruo *UserRoleUpdateOne) Mutation() *UserRoleMutation
- func (uruo *UserRoleUpdateOne) Save(ctx context.Context) (*UserRole, error)
- func (uruo *UserRoleUpdateOne) SaveX(ctx context.Context) *UserRole
- func (uruo *UserRoleUpdateOne) SetMetadata(m map[string]interface{}) *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) SetName(s string) *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) SetUpdatedAt(t time.Time) *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) SetUserID(u uuid.UUID) *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) SetUsers(u *User) *UserRoleUpdateOne
- func (uruo *UserRoleUpdateOne) SetUsersID(id uuid.UUID) *UserRoleUpdateOne
- type UserRoles
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- 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) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddGroupRoleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddGroupRoles(g ...*GroupRole) *UserUpdate
- func (uu *UserUpdate) AddUserRoleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddUserRoles(u ...*UserRole) *UserUpdate
- func (uu *UserUpdate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddWorkspaceRoles(w ...*WorkspaceRole) *UserUpdate
- func (uu *UserUpdate) ClearAPIKey() *UserUpdate
- func (uu *UserUpdate) ClearBillingID() *UserUpdate
- func (uu *UserUpdate) ClearConfirmationSentAt() *UserUpdate
- func (uu *UserUpdate) ClearConfirmationToken() *UserUpdate
- func (uu *UserUpdate) ClearConfirmed() *UserUpdate
- func (uu *UserUpdate) ClearEmailChange() *UserUpdate
- func (uu *UserUpdate) ClearEmailChangeSentAt() *UserUpdate
- func (uu *UserUpdate) ClearEmailChangeToken() *UserUpdate
- func (uu *UserUpdate) ClearGroupRoles() *UserUpdate
- func (uu *UserUpdate) ClearLastSigninAt() *UserUpdate
- func (uu *UserUpdate) ClearOtp() *UserUpdate
- func (uu *UserUpdate) ClearOtpSentAt() *UserUpdate
- func (uu *UserUpdate) ClearRecoverySentAt() *UserUpdate
- func (uu *UserUpdate) ClearRecoveryToken() *UserUpdate
- func (uu *UserUpdate) ClearRoles() *UserUpdate
- func (uu *UserUpdate) ClearTeams() *UserUpdate
- func (uu *UserUpdate) ClearUserRoles() *UserUpdate
- func (uu *UserUpdate) ClearWorkspace() *UserUpdate
- func (uu *UserUpdate) ClearWorkspaceRoles() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveGroupRoleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveGroupRoles(g ...*GroupRole) *UserUpdate
- func (uu *UserUpdate) RemoveUserRoleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveUserRoles(u ...*UserRole) *UserUpdate
- func (uu *UserUpdate) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveWorkspaceRoles(w ...*WorkspaceRole) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAPIKey(s string) *UserUpdate
- func (uu *UserUpdate) SetBillingID(s string) *UserUpdate
- func (uu *UserUpdate) SetConfirmationSentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetConfirmationToken(s string) *UserUpdate
- func (uu *UserUpdate) SetConfirmed(b bool) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetEmailChange(s string) *UserUpdate
- func (uu *UserUpdate) SetEmailChangeSentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmailChangeToken(s string) *UserUpdate
- func (uu *UserUpdate) SetLastSigninAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetMetadata(m map[string]interface{}) *UserUpdate
- func (uu *UserUpdate) SetNillableAPIKey(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableBillingID(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableConfirmationSentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableConfirmationToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableConfirmed(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailChange(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailChangeToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableLastSigninAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableOtp(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableOtpSentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableRecoverySentAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableRecoveryToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableWorkspaceID(id *uuid.UUID) *UserUpdate
- func (uu *UserUpdate) SetOtp(s string) *UserUpdate
- func (uu *UserUpdate) SetOtpSentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetProvider(s string) *UserUpdate
- func (uu *UserUpdate) SetRecoverySentAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetRecoveryToken(s string) *UserUpdate
- func (uu *UserUpdate) SetRoles(s []string) *UserUpdate
- func (uu *UserUpdate) SetTeams(m map[string]string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetWorkspace(w *Workspace) *UserUpdate
- func (uu *UserUpdate) SetWorkspaceID(id uuid.UUID) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddGroupRoleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroupRoles(g ...*GroupRole) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserRoleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserRoles(u ...*UserRole) *UserUpdateOne
- func (uuo *UserUpdateOne) AddWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddWorkspaceRoles(w ...*WorkspaceRole) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAPIKey() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBillingID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConfirmationSentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConfirmationToken() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearConfirmed() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailChange() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailChangeSentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailChangeToken() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroupRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastSigninAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOtp() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearOtpSentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRecoverySentAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRecoveryToken() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTeams() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearWorkspace() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearWorkspaceRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveGroupRoleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroupRoles(g ...*GroupRole) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserRoleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserRoles(u ...*UserRole) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveWorkspaceRoles(w ...*WorkspaceRole) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetAPIKey(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBillingID(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetConfirmationSentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetConfirmationToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetConfirmed(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailChange(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailChangeSentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailChangeToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastSigninAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMetadata(m map[string]interface{}) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAPIKey(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBillingID(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableConfirmationSentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableConfirmationToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableConfirmed(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailChange(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailChangeToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastSigninAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOtp(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableOtpSentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRecoverySentAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRecoveryToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableWorkspaceID(id *uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOtp(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetOtpSentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProvider(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRecoverySentAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRecoveryToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRoles(s []string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTeams(m map[string]string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetWorkspace(w *Workspace) *UserUpdateOne
- func (uuo *UserUpdateOne) SetWorkspaceID(id uuid.UUID) *UserUpdateOne
- type Users
- type ValidationError
- type Value
- type Workspace
- type WorkspaceClient
- func (c *WorkspaceClient) Create() *WorkspaceCreate
- func (c *WorkspaceClient) CreateBulk(builders ...*WorkspaceCreate) *WorkspaceCreateBulk
- func (c *WorkspaceClient) Delete() *WorkspaceDelete
- func (c *WorkspaceClient) DeleteOne(w *Workspace) *WorkspaceDeleteOne
- func (c *WorkspaceClient) DeleteOneID(id uuid.UUID) *WorkspaceDeleteOne
- func (c *WorkspaceClient) Get(ctx context.Context, id uuid.UUID) (*Workspace, error)
- func (c *WorkspaceClient) GetX(ctx context.Context, id uuid.UUID) *Workspace
- func (c *WorkspaceClient) Hooks() []Hook
- func (c *WorkspaceClient) Query() *WorkspaceQuery
- func (c *WorkspaceClient) QueryGroups(w *Workspace) *GroupQuery
- func (c *WorkspaceClient) QueryOwner(w *Workspace) *UserQuery
- func (c *WorkspaceClient) QueryWorkspaceRoles(w *Workspace) *WorkspaceRoleQuery
- func (c *WorkspaceClient) Update() *WorkspaceUpdate
- func (c *WorkspaceClient) UpdateOne(w *Workspace) *WorkspaceUpdateOne
- func (c *WorkspaceClient) UpdateOneID(id uuid.UUID) *WorkspaceUpdateOne
- func (c *WorkspaceClient) Use(hooks ...Hook)
- type WorkspaceCreate
- func (wc *WorkspaceCreate) AddGroupIDs(ids ...uuid.UUID) *WorkspaceCreate
- func (wc *WorkspaceCreate) AddGroups(g ...*Group) *WorkspaceCreate
- func (wc *WorkspaceCreate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceCreate
- func (wc *WorkspaceCreate) AddWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceCreate
- func (wc *WorkspaceCreate) Mutation() *WorkspaceMutation
- func (wc *WorkspaceCreate) Save(ctx context.Context) (*Workspace, error)
- func (wc *WorkspaceCreate) SaveX(ctx context.Context) *Workspace
- func (wc *WorkspaceCreate) SetCreatedAt(t time.Time) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetDescription(s string) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetID(u uuid.UUID) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetMetadata(m map[string]interface{}) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetName(s string) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetNillableCreatedAt(t *time.Time) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetNillableDescription(s *string) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetNillableUpdatedAt(t *time.Time) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetOwner(u *User) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetOwnerID(id uuid.UUID) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetPlan(s string) *WorkspaceCreate
- func (wc *WorkspaceCreate) SetUpdatedAt(t time.Time) *WorkspaceCreate
- type WorkspaceCreateBulk
- type WorkspaceDelete
- type WorkspaceDeleteOne
- type WorkspaceEdges
- type WorkspaceGroupBy
- func (wgb *WorkspaceGroupBy) Aggregate(fns ...AggregateFunc) *WorkspaceGroupBy
- func (wgb *WorkspaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (wgb *WorkspaceGroupBy) BoolX(ctx context.Context) bool
- func (wgb *WorkspaceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (wgb *WorkspaceGroupBy) BoolsX(ctx context.Context) []bool
- func (wgb *WorkspaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (wgb *WorkspaceGroupBy) Float64X(ctx context.Context) float64
- func (wgb *WorkspaceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (wgb *WorkspaceGroupBy) Float64sX(ctx context.Context) []float64
- func (wgb *WorkspaceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (wgb *WorkspaceGroupBy) IntX(ctx context.Context) int
- func (wgb *WorkspaceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (wgb *WorkspaceGroupBy) IntsX(ctx context.Context) []int
- func (wgb *WorkspaceGroupBy) Scan(ctx context.Context, v interface{}) error
- func (wgb *WorkspaceGroupBy) ScanX(ctx context.Context, v interface{})
- func (wgb *WorkspaceGroupBy) String(ctx context.Context) (_ string, err error)
- func (wgb *WorkspaceGroupBy) StringX(ctx context.Context) string
- func (wgb *WorkspaceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (wgb *WorkspaceGroupBy) StringsX(ctx context.Context) []string
- type WorkspaceMutation
- func (m *WorkspaceMutation) AddField(name string, value ent.Value) error
- func (m *WorkspaceMutation) AddGroupIDs(ids ...uuid.UUID)
- func (m *WorkspaceMutation) AddWorkspaceRoleIDs(ids ...uuid.UUID)
- func (m *WorkspaceMutation) AddedEdges() []string
- func (m *WorkspaceMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkspaceMutation) AddedFields() []string
- func (m *WorkspaceMutation) AddedIDs(name string) []ent.Value
- func (m *WorkspaceMutation) ClearDescription()
- func (m *WorkspaceMutation) ClearEdge(name string) error
- func (m *WorkspaceMutation) ClearField(name string) error
- func (m *WorkspaceMutation) ClearGroups()
- func (m *WorkspaceMutation) ClearMetadata()
- func (m *WorkspaceMutation) ClearOwner()
- func (m *WorkspaceMutation) ClearWorkspaceRoles()
- func (m *WorkspaceMutation) ClearedEdges() []string
- func (m *WorkspaceMutation) ClearedFields() []string
- func (m WorkspaceMutation) Client() *Client
- func (m *WorkspaceMutation) CreatedAt() (r time.Time, exists bool)
- func (m *WorkspaceMutation) Description() (r string, exists bool)
- func (m *WorkspaceMutation) DescriptionCleared() bool
- func (m *WorkspaceMutation) EdgeCleared(name string) bool
- func (m *WorkspaceMutation) Field(name string) (ent.Value, bool)
- func (m *WorkspaceMutation) FieldCleared(name string) bool
- func (m *WorkspaceMutation) Fields() []string
- func (m *WorkspaceMutation) GroupsCleared() bool
- func (m *WorkspaceMutation) GroupsIDs() (ids []uuid.UUID)
- func (m *WorkspaceMutation) ID() (id uuid.UUID, exists bool)
- func (m *WorkspaceMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *WorkspaceMutation) MetadataCleared() bool
- func (m *WorkspaceMutation) Name() (r string, exists bool)
- func (m *WorkspaceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkspaceMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *WorkspaceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkspaceMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *WorkspaceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *WorkspaceMutation) OldPlan(ctx context.Context) (v string, err error)
- func (m *WorkspaceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkspaceMutation) Op() Op
- func (m *WorkspaceMutation) OwnerCleared() bool
- func (m *WorkspaceMutation) OwnerID() (id uuid.UUID, exists bool)
- func (m *WorkspaceMutation) OwnerIDs() (ids []uuid.UUID)
- func (m *WorkspaceMutation) Plan() (r string, exists bool)
- func (m *WorkspaceMutation) RemoveGroupIDs(ids ...uuid.UUID)
- func (m *WorkspaceMutation) RemoveWorkspaceRoleIDs(ids ...uuid.UUID)
- func (m *WorkspaceMutation) RemovedEdges() []string
- func (m *WorkspaceMutation) RemovedGroupsIDs() (ids []uuid.UUID)
- func (m *WorkspaceMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkspaceMutation) RemovedWorkspaceRolesIDs() (ids []uuid.UUID)
- func (m *WorkspaceMutation) ResetCreatedAt()
- func (m *WorkspaceMutation) ResetDescription()
- func (m *WorkspaceMutation) ResetEdge(name string) error
- func (m *WorkspaceMutation) ResetField(name string) error
- func (m *WorkspaceMutation) ResetGroups()
- func (m *WorkspaceMutation) ResetMetadata()
- func (m *WorkspaceMutation) ResetName()
- func (m *WorkspaceMutation) ResetOwner()
- func (m *WorkspaceMutation) ResetPlan()
- func (m *WorkspaceMutation) ResetUpdatedAt()
- func (m *WorkspaceMutation) ResetWorkspaceRoles()
- func (m *WorkspaceMutation) SetCreatedAt(t time.Time)
- func (m *WorkspaceMutation) SetDescription(s string)
- func (m *WorkspaceMutation) SetField(name string, value ent.Value) error
- func (m *WorkspaceMutation) SetID(id uuid.UUID)
- func (m *WorkspaceMutation) SetMetadata(value map[string]interface{})
- func (m *WorkspaceMutation) SetName(s string)
- func (m *WorkspaceMutation) SetOwnerID(id uuid.UUID)
- func (m *WorkspaceMutation) SetPlan(s string)
- func (m *WorkspaceMutation) SetUpdatedAt(t time.Time)
- func (m WorkspaceMutation) Tx() (*Tx, error)
- func (m *WorkspaceMutation) Type() string
- func (m *WorkspaceMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *WorkspaceMutation) WorkspaceRolesCleared() bool
- func (m *WorkspaceMutation) WorkspaceRolesIDs() (ids []uuid.UUID)
- type WorkspaceQuery
- func (wq *WorkspaceQuery) All(ctx context.Context) ([]*Workspace, error)
- func (wq *WorkspaceQuery) AllX(ctx context.Context) []*Workspace
- func (wq *WorkspaceQuery) Clone() *WorkspaceQuery
- func (wq *WorkspaceQuery) Count(ctx context.Context) (int, error)
- func (wq *WorkspaceQuery) CountX(ctx context.Context) int
- func (wq *WorkspaceQuery) Exist(ctx context.Context) (bool, error)
- func (wq *WorkspaceQuery) ExistX(ctx context.Context) bool
- func (wq *WorkspaceQuery) First(ctx context.Context) (*Workspace, error)
- func (wq *WorkspaceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (wq *WorkspaceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (wq *WorkspaceQuery) FirstX(ctx context.Context) *Workspace
- func (wq *WorkspaceQuery) GroupBy(field string, fields ...string) *WorkspaceGroupBy
- func (wq *WorkspaceQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (wq *WorkspaceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (wq *WorkspaceQuery) Limit(limit int) *WorkspaceQuery
- func (wq *WorkspaceQuery) Offset(offset int) *WorkspaceQuery
- func (wq *WorkspaceQuery) Only(ctx context.Context) (*Workspace, error)
- func (wq *WorkspaceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (wq *WorkspaceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (wq *WorkspaceQuery) OnlyX(ctx context.Context) *Workspace
- func (wq *WorkspaceQuery) Order(o ...OrderFunc) *WorkspaceQuery
- func (wq *WorkspaceQuery) QueryGroups() *GroupQuery
- func (wq *WorkspaceQuery) QueryOwner() *UserQuery
- func (wq *WorkspaceQuery) QueryWorkspaceRoles() *WorkspaceRoleQuery
- func (wq *WorkspaceQuery) Select(field string, fields ...string) *WorkspaceSelect
- func (wq *WorkspaceQuery) Where(ps ...predicate.Workspace) *WorkspaceQuery
- func (wq *WorkspaceQuery) WithGroups(opts ...func(*GroupQuery)) *WorkspaceQuery
- func (wq *WorkspaceQuery) WithOwner(opts ...func(*UserQuery)) *WorkspaceQuery
- func (wq *WorkspaceQuery) WithWorkspaceRoles(opts ...func(*WorkspaceRoleQuery)) *WorkspaceQuery
- type WorkspaceRole
- type WorkspaceRoleClient
- func (c *WorkspaceRoleClient) Create() *WorkspaceRoleCreate
- func (c *WorkspaceRoleClient) CreateBulk(builders ...*WorkspaceRoleCreate) *WorkspaceRoleCreateBulk
- func (c *WorkspaceRoleClient) Delete() *WorkspaceRoleDelete
- func (c *WorkspaceRoleClient) DeleteOne(wr *WorkspaceRole) *WorkspaceRoleDeleteOne
- func (c *WorkspaceRoleClient) DeleteOneID(id uuid.UUID) *WorkspaceRoleDeleteOne
- func (c *WorkspaceRoleClient) Get(ctx context.Context, id uuid.UUID) (*WorkspaceRole, error)
- func (c *WorkspaceRoleClient) GetX(ctx context.Context, id uuid.UUID) *WorkspaceRole
- func (c *WorkspaceRoleClient) Hooks() []Hook
- func (c *WorkspaceRoleClient) Query() *WorkspaceRoleQuery
- func (c *WorkspaceRoleClient) QueryUsers(wr *WorkspaceRole) *UserQuery
- func (c *WorkspaceRoleClient) QueryWorkspaces(wr *WorkspaceRole) *WorkspaceQuery
- func (c *WorkspaceRoleClient) Update() *WorkspaceRoleUpdate
- func (c *WorkspaceRoleClient) UpdateOne(wr *WorkspaceRole) *WorkspaceRoleUpdateOne
- func (c *WorkspaceRoleClient) UpdateOneID(id uuid.UUID) *WorkspaceRoleUpdateOne
- func (c *WorkspaceRoleClient) Use(hooks ...Hook)
- type WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) Mutation() *WorkspaceRoleMutation
- func (wrc *WorkspaceRoleCreate) Save(ctx context.Context) (*WorkspaceRole, error)
- func (wrc *WorkspaceRoleCreate) SaveX(ctx context.Context) *WorkspaceRole
- func (wrc *WorkspaceRoleCreate) SetCreatedAt(t time.Time) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetID(u uuid.UUID) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetMetadata(m map[string]interface{}) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetName(s string) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetNillableCreatedAt(t *time.Time) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetNillableUpdatedAt(t *time.Time) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetUpdatedAt(t time.Time) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetUserID(u uuid.UUID) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetUsers(u *User) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetUsersID(id uuid.UUID) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetWorkspaceID(u uuid.UUID) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetWorkspaces(w *Workspace) *WorkspaceRoleCreate
- func (wrc *WorkspaceRoleCreate) SetWorkspacesID(id uuid.UUID) *WorkspaceRoleCreate
- type WorkspaceRoleCreateBulk
- type WorkspaceRoleDelete
- type WorkspaceRoleDeleteOne
- type WorkspaceRoleEdges
- type WorkspaceRoleGroupBy
- func (wrgb *WorkspaceRoleGroupBy) Aggregate(fns ...AggregateFunc) *WorkspaceRoleGroupBy
- func (wrgb *WorkspaceRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (wrgb *WorkspaceRoleGroupBy) BoolX(ctx context.Context) bool
- func (wrgb *WorkspaceRoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (wrgb *WorkspaceRoleGroupBy) BoolsX(ctx context.Context) []bool
- func (wrgb *WorkspaceRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (wrgb *WorkspaceRoleGroupBy) Float64X(ctx context.Context) float64
- func (wrgb *WorkspaceRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (wrgb *WorkspaceRoleGroupBy) Float64sX(ctx context.Context) []float64
- func (wrgb *WorkspaceRoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (wrgb *WorkspaceRoleGroupBy) IntX(ctx context.Context) int
- func (wrgb *WorkspaceRoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (wrgb *WorkspaceRoleGroupBy) IntsX(ctx context.Context) []int
- func (wrgb *WorkspaceRoleGroupBy) Scan(ctx context.Context, v interface{}) error
- func (wrgb *WorkspaceRoleGroupBy) ScanX(ctx context.Context, v interface{})
- func (wrgb *WorkspaceRoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (wrgb *WorkspaceRoleGroupBy) StringX(ctx context.Context) string
- func (wrgb *WorkspaceRoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (wrgb *WorkspaceRoleGroupBy) StringsX(ctx context.Context) []string
- type WorkspaceRoleMutation
- func (m *WorkspaceRoleMutation) AddField(name string, value ent.Value) error
- func (m *WorkspaceRoleMutation) AddedEdges() []string
- func (m *WorkspaceRoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkspaceRoleMutation) AddedFields() []string
- func (m *WorkspaceRoleMutation) AddedIDs(name string) []ent.Value
- func (m *WorkspaceRoleMutation) ClearEdge(name string) error
- func (m *WorkspaceRoleMutation) ClearField(name string) error
- func (m *WorkspaceRoleMutation) ClearMetadata()
- func (m *WorkspaceRoleMutation) ClearUsers()
- func (m *WorkspaceRoleMutation) ClearWorkspaces()
- func (m *WorkspaceRoleMutation) ClearedEdges() []string
- func (m *WorkspaceRoleMutation) ClearedFields() []string
- func (m WorkspaceRoleMutation) Client() *Client
- func (m *WorkspaceRoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *WorkspaceRoleMutation) EdgeCleared(name string) bool
- func (m *WorkspaceRoleMutation) Field(name string) (ent.Value, bool)
- func (m *WorkspaceRoleMutation) FieldCleared(name string) bool
- func (m *WorkspaceRoleMutation) Fields() []string
- func (m *WorkspaceRoleMutation) ID() (id uuid.UUID, exists bool)
- func (m *WorkspaceRoleMutation) Metadata() (r map[string]interface{}, exists bool)
- func (m *WorkspaceRoleMutation) MetadataCleared() bool
- func (m *WorkspaceRoleMutation) Name() (r string, exists bool)
- func (m *WorkspaceRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkspaceRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkspaceRoleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
- func (m *WorkspaceRoleMutation) OldName(ctx context.Context) (v string, err error)
- func (m *WorkspaceRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *WorkspaceRoleMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *WorkspaceRoleMutation) OldWorkspaceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *WorkspaceRoleMutation) Op() Op
- func (m *WorkspaceRoleMutation) RemovedEdges() []string
- func (m *WorkspaceRoleMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkspaceRoleMutation) ResetCreatedAt()
- func (m *WorkspaceRoleMutation) ResetEdge(name string) error
- func (m *WorkspaceRoleMutation) ResetField(name string) error
- func (m *WorkspaceRoleMutation) ResetMetadata()
- func (m *WorkspaceRoleMutation) ResetName()
- func (m *WorkspaceRoleMutation) ResetUpdatedAt()
- func (m *WorkspaceRoleMutation) ResetUserID()
- func (m *WorkspaceRoleMutation) ResetUsers()
- func (m *WorkspaceRoleMutation) ResetWorkspaceID()
- func (m *WorkspaceRoleMutation) ResetWorkspaces()
- func (m *WorkspaceRoleMutation) SetCreatedAt(t time.Time)
- func (m *WorkspaceRoleMutation) SetField(name string, value ent.Value) error
- func (m *WorkspaceRoleMutation) SetID(id uuid.UUID)
- func (m *WorkspaceRoleMutation) SetMetadata(value map[string]interface{})
- func (m *WorkspaceRoleMutation) SetName(s string)
- func (m *WorkspaceRoleMutation) SetUpdatedAt(t time.Time)
- func (m *WorkspaceRoleMutation) SetUserID(u uuid.UUID)
- func (m *WorkspaceRoleMutation) SetUsersID(id uuid.UUID)
- func (m *WorkspaceRoleMutation) SetWorkspaceID(u uuid.UUID)
- func (m *WorkspaceRoleMutation) SetWorkspacesID(id uuid.UUID)
- func (m WorkspaceRoleMutation) Tx() (*Tx, error)
- func (m *WorkspaceRoleMutation) Type() string
- func (m *WorkspaceRoleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *WorkspaceRoleMutation) UserID() (r uuid.UUID, exists bool)
- func (m *WorkspaceRoleMutation) UsersCleared() bool
- func (m *WorkspaceRoleMutation) UsersID() (id uuid.UUID, exists bool)
- func (m *WorkspaceRoleMutation) UsersIDs() (ids []uuid.UUID)
- func (m *WorkspaceRoleMutation) WorkspaceID() (r uuid.UUID, exists bool)
- func (m *WorkspaceRoleMutation) WorkspacesCleared() bool
- func (m *WorkspaceRoleMutation) WorkspacesID() (id uuid.UUID, exists bool)
- func (m *WorkspaceRoleMutation) WorkspacesIDs() (ids []uuid.UUID)
- type WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) All(ctx context.Context) ([]*WorkspaceRole, error)
- func (wrq *WorkspaceRoleQuery) AllX(ctx context.Context) []*WorkspaceRole
- func (wrq *WorkspaceRoleQuery) Clone() *WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) Count(ctx context.Context) (int, error)
- func (wrq *WorkspaceRoleQuery) CountX(ctx context.Context) int
- func (wrq *WorkspaceRoleQuery) Exist(ctx context.Context) (bool, error)
- func (wrq *WorkspaceRoleQuery) ExistX(ctx context.Context) bool
- func (wrq *WorkspaceRoleQuery) First(ctx context.Context) (*WorkspaceRole, error)
- func (wrq *WorkspaceRoleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (wrq *WorkspaceRoleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (wrq *WorkspaceRoleQuery) FirstX(ctx context.Context) *WorkspaceRole
- func (wrq *WorkspaceRoleQuery) GroupBy(field string, fields ...string) *WorkspaceRoleGroupBy
- func (wrq *WorkspaceRoleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (wrq *WorkspaceRoleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (wrq *WorkspaceRoleQuery) Limit(limit int) *WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) Offset(offset int) *WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) Only(ctx context.Context) (*WorkspaceRole, error)
- func (wrq *WorkspaceRoleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (wrq *WorkspaceRoleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (wrq *WorkspaceRoleQuery) OnlyX(ctx context.Context) *WorkspaceRole
- func (wrq *WorkspaceRoleQuery) Order(o ...OrderFunc) *WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) QueryUsers() *UserQuery
- func (wrq *WorkspaceRoleQuery) QueryWorkspaces() *WorkspaceQuery
- func (wrq *WorkspaceRoleQuery) Select(field string, fields ...string) *WorkspaceRoleSelect
- func (wrq *WorkspaceRoleQuery) Where(ps ...predicate.WorkspaceRole) *WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) WithUsers(opts ...func(*UserQuery)) *WorkspaceRoleQuery
- func (wrq *WorkspaceRoleQuery) WithWorkspaces(opts ...func(*WorkspaceQuery)) *WorkspaceRoleQuery
- type WorkspaceRoleSelect
- func (wrs *WorkspaceRoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (wrs *WorkspaceRoleSelect) BoolX(ctx context.Context) bool
- func (wrs *WorkspaceRoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (wrs *WorkspaceRoleSelect) BoolsX(ctx context.Context) []bool
- func (wrs *WorkspaceRoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (wrs *WorkspaceRoleSelect) Float64X(ctx context.Context) float64
- func (wrs *WorkspaceRoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (wrs *WorkspaceRoleSelect) Float64sX(ctx context.Context) []float64
- func (wrs *WorkspaceRoleSelect) Int(ctx context.Context) (_ int, err error)
- func (wrs *WorkspaceRoleSelect) IntX(ctx context.Context) int
- func (wrs *WorkspaceRoleSelect) Ints(ctx context.Context) ([]int, error)
- func (wrs *WorkspaceRoleSelect) IntsX(ctx context.Context) []int
- func (wrs *WorkspaceRoleSelect) Scan(ctx context.Context, v interface{}) error
- func (wrs *WorkspaceRoleSelect) ScanX(ctx context.Context, v interface{})
- func (wrs *WorkspaceRoleSelect) String(ctx context.Context) (_ string, err error)
- func (wrs *WorkspaceRoleSelect) StringX(ctx context.Context) string
- func (wrs *WorkspaceRoleSelect) Strings(ctx context.Context) ([]string, error)
- func (wrs *WorkspaceRoleSelect) StringsX(ctx context.Context) []string
- type WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) ClearMetadata() *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) ClearUsers() *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) ClearWorkspaces() *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) Exec(ctx context.Context) error
- func (wru *WorkspaceRoleUpdate) ExecX(ctx context.Context)
- func (wru *WorkspaceRoleUpdate) Mutation() *WorkspaceRoleMutation
- func (wru *WorkspaceRoleUpdate) Save(ctx context.Context) (int, error)
- func (wru *WorkspaceRoleUpdate) SaveX(ctx context.Context) int
- func (wru *WorkspaceRoleUpdate) SetMetadata(m map[string]interface{}) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetName(s string) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetUpdatedAt(t time.Time) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetUserID(u uuid.UUID) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetUsers(u *User) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetUsersID(id uuid.UUID) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetWorkspaceID(u uuid.UUID) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetWorkspaces(w *Workspace) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) SetWorkspacesID(id uuid.UUID) *WorkspaceRoleUpdate
- func (wru *WorkspaceRoleUpdate) Where(ps ...predicate.WorkspaceRole) *WorkspaceRoleUpdate
- type WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) ClearMetadata() *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) ClearUsers() *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) ClearWorkspaces() *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) Exec(ctx context.Context) error
- func (wruo *WorkspaceRoleUpdateOne) ExecX(ctx context.Context)
- func (wruo *WorkspaceRoleUpdateOne) Mutation() *WorkspaceRoleMutation
- func (wruo *WorkspaceRoleUpdateOne) Save(ctx context.Context) (*WorkspaceRole, error)
- func (wruo *WorkspaceRoleUpdateOne) SaveX(ctx context.Context) *WorkspaceRole
- func (wruo *WorkspaceRoleUpdateOne) SetMetadata(m map[string]interface{}) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetName(s string) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetUpdatedAt(t time.Time) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetUserID(u uuid.UUID) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetUsers(u *User) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetUsersID(id uuid.UUID) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetWorkspaceID(u uuid.UUID) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetWorkspaces(w *Workspace) *WorkspaceRoleUpdateOne
- func (wruo *WorkspaceRoleUpdateOne) SetWorkspacesID(id uuid.UUID) *WorkspaceRoleUpdateOne
- type WorkspaceRoles
- type WorkspaceSelect
- func (ws *WorkspaceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ws *WorkspaceSelect) BoolX(ctx context.Context) bool
- func (ws *WorkspaceSelect) Bools(ctx context.Context) ([]bool, error)
- func (ws *WorkspaceSelect) BoolsX(ctx context.Context) []bool
- func (ws *WorkspaceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ws *WorkspaceSelect) Float64X(ctx context.Context) float64
- func (ws *WorkspaceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ws *WorkspaceSelect) Float64sX(ctx context.Context) []float64
- func (ws *WorkspaceSelect) Int(ctx context.Context) (_ int, err error)
- func (ws *WorkspaceSelect) IntX(ctx context.Context) int
- func (ws *WorkspaceSelect) Ints(ctx context.Context) ([]int, error)
- func (ws *WorkspaceSelect) IntsX(ctx context.Context) []int
- func (ws *WorkspaceSelect) Scan(ctx context.Context, v interface{}) error
- func (ws *WorkspaceSelect) ScanX(ctx context.Context, v interface{})
- func (ws *WorkspaceSelect) String(ctx context.Context) (_ string, err error)
- func (ws *WorkspaceSelect) StringX(ctx context.Context) string
- func (ws *WorkspaceSelect) Strings(ctx context.Context) ([]string, error)
- func (ws *WorkspaceSelect) StringsX(ctx context.Context) []string
- type WorkspaceUpdate
- func (wu *WorkspaceUpdate) AddGroupIDs(ids ...uuid.UUID) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) AddGroups(g ...*Group) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) AddWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) ClearDescription() *WorkspaceUpdate
- func (wu *WorkspaceUpdate) ClearGroups() *WorkspaceUpdate
- func (wu *WorkspaceUpdate) ClearMetadata() *WorkspaceUpdate
- func (wu *WorkspaceUpdate) ClearOwner() *WorkspaceUpdate
- func (wu *WorkspaceUpdate) ClearWorkspaceRoles() *WorkspaceUpdate
- func (wu *WorkspaceUpdate) Exec(ctx context.Context) error
- func (wu *WorkspaceUpdate) ExecX(ctx context.Context)
- func (wu *WorkspaceUpdate) Mutation() *WorkspaceMutation
- func (wu *WorkspaceUpdate) RemoveGroupIDs(ids ...uuid.UUID) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) RemoveGroups(g ...*Group) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) RemoveWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) Save(ctx context.Context) (int, error)
- func (wu *WorkspaceUpdate) SaveX(ctx context.Context) int
- func (wu *WorkspaceUpdate) SetDescription(s string) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetMetadata(m map[string]interface{}) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetName(s string) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetNillableDescription(s *string) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetOwner(u *User) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetOwnerID(id uuid.UUID) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetPlan(s string) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) SetUpdatedAt(t time.Time) *WorkspaceUpdate
- func (wu *WorkspaceUpdate) Where(ps ...predicate.Workspace) *WorkspaceUpdate
- type WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) AddGroupIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) AddGroups(g ...*Group) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) AddWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) AddWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) ClearDescription() *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) ClearGroups() *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) ClearMetadata() *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) ClearOwner() *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) ClearWorkspaceRoles() *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) Exec(ctx context.Context) error
- func (wuo *WorkspaceUpdateOne) ExecX(ctx context.Context)
- func (wuo *WorkspaceUpdateOne) Mutation() *WorkspaceMutation
- func (wuo *WorkspaceUpdateOne) RemoveGroupIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) RemoveGroups(g ...*Group) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) RemoveWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) Save(ctx context.Context) (*Workspace, error)
- func (wuo *WorkspaceUpdateOne) SaveX(ctx context.Context) *Workspace
- func (wuo *WorkspaceUpdateOne) SetDescription(s string) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetMetadata(m map[string]interface{}) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetName(s string) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetNillableDescription(s *string) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetOwner(u *User) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetOwnerID(id uuid.UUID) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetPlan(s string) *WorkspaceUpdateOne
- func (wuo *WorkspaceUpdateOne) SetUpdatedAt(t time.Time) *WorkspaceUpdateOne
- type Workspaces
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeGroup = "Group" TypeGroupRole = "GroupRole" TypePermission = "Permission" TypeSession = "Session" TypeUser = "User" TypeUserRole = "UserRole" TypeWorkspace = "Workspace" TypeWorkspaceRole = "WorkspaceRole" )
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.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(models.As(models.Sum(field1), "sum_field1"), (models.As(models.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Group is the client for interacting with the Group builders.
Group *GroupClient
// GroupRole is the client for interacting with the GroupRole builders.
GroupRole *GroupRoleClient
// Permission is the client for interacting with the Permission builders.
Permission *PermissionClient
// Session is the client for interacting with the Session builders.
Session *SessionClient
// User is the client for interacting with the User builders.
User *UserClient
// UserRole is the client for interacting with the UserRole builders.
UserRole *UserRoleClient
// Workspace is the client for interacting with the Workspace builders.
Workspace *WorkspaceClient
// WorkspaceRole is the client for interacting with the WorkspaceRole builders.
WorkspaceRole *WorkspaceRoleClient
// 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 database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Group. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Group ¶ added in v0.1.7
type Group struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,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 GroupQuery when eager-loading is set.
Edges GroupEdges `json:"edges"`
// contains filtered or unexported fields
}
Group is the model entity for the Group schema.
func (*Group) QueryGroupRoles ¶ added in v0.1.7
func (gr *Group) QueryGroupRoles() *GroupRoleQuery
QueryGroupRoles queries the group_roles edge of the Group.
func (*Group) QueryWorkspaces ¶ added in v0.1.7
func (gr *Group) QueryWorkspaces() *WorkspaceQuery
QueryWorkspaces queries the workspaces edge of the Group.
func (*Group) Unwrap ¶ added in v0.1.7
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 (*Group) Update ¶ added in v0.1.7
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that, you need to call Group.Unwrap() before calling this method, if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶ added in v0.1.7
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶ added in v0.1.7
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶ added in v0.1.7
func (c *GroupClient) Create() *GroupCreate
Create returns a create builder for Group.
func (*GroupClient) CreateBulk ¶ added in v0.1.7
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶ added in v0.1.7
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶ added in v0.1.7
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*GroupClient) DeleteOneID ¶ added in v0.1.7
func (c *GroupClient) DeleteOneID(id uuid.UUID) *GroupDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*GroupClient) Hooks ¶ added in v0.1.7
func (c *GroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupClient) Query ¶ added in v0.1.7
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryGroupRoles ¶ added in v0.1.7
func (c *GroupClient) QueryGroupRoles(gr *Group) *GroupRoleQuery
QueryGroupRoles queries the group_roles edge of a Group.
func (*GroupClient) QueryWorkspaces ¶ added in v0.1.7
func (c *GroupClient) QueryWorkspaces(gr *Group) *WorkspaceQuery
QueryWorkspaces queries the workspaces edge of a Group.
func (*GroupClient) Update ¶ added in v0.1.7
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶ added in v0.1.7
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶ added in v0.1.7
func (c *GroupClient) UpdateOneID(id uuid.UUID) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶ added in v0.1.7
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupCreate ¶ added in v0.1.7
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddGroupRoleIDs ¶ added in v0.1.7
func (gc *GroupCreate) AddGroupRoleIDs(ids ...uuid.UUID) *GroupCreate
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*GroupCreate) AddGroupRoles ¶ added in v0.1.7
func (gc *GroupCreate) AddGroupRoles(g ...*GroupRole) *GroupCreate
AddGroupRoles adds the group_roles edges to GroupRole.
func (*GroupCreate) Mutation ¶ added in v0.1.7
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) Save ¶ added in v0.1.7
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶ added in v0.1.7
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetCreatedAt ¶ added in v0.1.7
func (gc *GroupCreate) SetCreatedAt(t time.Time) *GroupCreate
SetCreatedAt sets the created_at field.
func (*GroupCreate) SetDescription ¶ added in v0.1.7
func (gc *GroupCreate) SetDescription(s string) *GroupCreate
SetDescription sets the description field.
func (*GroupCreate) SetID ¶ added in v0.1.7
func (gc *GroupCreate) SetID(u uuid.UUID) *GroupCreate
SetID sets the id field.
func (*GroupCreate) SetMetadata ¶ added in v0.1.7
func (gc *GroupCreate) SetMetadata(m map[string]interface{}) *GroupCreate
SetMetadata sets the metadata field.
func (*GroupCreate) SetName ¶ added in v0.1.7
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the name field.
func (*GroupCreate) SetNillableCreatedAt ¶ added in v0.1.7
func (gc *GroupCreate) SetNillableCreatedAt(t *time.Time) *GroupCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*GroupCreate) SetNillableDescription ¶ added in v0.1.7
func (gc *GroupCreate) SetNillableDescription(s *string) *GroupCreate
SetNillableDescription sets the description field if the given value is not nil.
func (*GroupCreate) SetNillableUpdatedAt ¶ added in v0.1.7
func (gc *GroupCreate) SetNillableUpdatedAt(t *time.Time) *GroupCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*GroupCreate) SetUpdatedAt ¶ added in v0.1.7
func (gc *GroupCreate) SetUpdatedAt(t time.Time) *GroupCreate
SetUpdatedAt sets the updated_at field.
func (*GroupCreate) SetWorkspaces ¶ added in v0.1.7
func (gc *GroupCreate) SetWorkspaces(w *Workspace) *GroupCreate
SetWorkspaces sets the workspaces edge to Workspace.
func (*GroupCreate) SetWorkspacesID ¶ added in v0.1.7
func (gc *GroupCreate) SetWorkspacesID(id uuid.UUID) *GroupCreate
SetWorkspacesID sets the workspaces edge to Workspace by id.
type GroupCreateBulk ¶ added in v0.1.7
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating a bulk of Group entities.
type GroupDelete ¶ added in v0.1.7
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶ added in v0.1.7
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶ added in v0.1.7
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶ added in v0.1.7
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where adds a new predicate to the delete builder.
type GroupDeleteOne ¶ added in v0.1.7
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶ added in v0.1.7
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶ added in v0.1.7
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupEdges ¶ added in v0.1.7
type GroupEdges struct {
// GroupRoles holds the value of the group_roles edge.
GroupRoles []*GroupRole
// Workspaces holds the value of the workspaces edge.
Workspaces *Workspace
// contains filtered or unexported fields
}
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) GroupRolesOrErr ¶ added in v0.1.7
func (e GroupEdges) GroupRolesOrErr() ([]*GroupRole, error)
GroupRolesOrErr returns the GroupRoles value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) WorkspacesOrErr ¶ added in v0.1.7
func (e GroupEdges) WorkspacesOrErr() (*Workspace, error)
WorkspacesOrErr returns the Workspaces value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroupGroupBy ¶ added in v0.1.7
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the builder for group-by Group entities.
func (*GroupGroupBy) Aggregate ¶ added in v0.1.7
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶ added in v0.1.7
func (ggb *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*GroupGroupBy) BoolX ¶ added in v0.1.7
func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupGroupBy) Bools ¶ added in v0.1.7
func (ggb *GroupGroupBy) 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 (*GroupGroupBy) BoolsX ¶ added in v0.1.7
func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupGroupBy) Float64 ¶ added in v0.1.7
func (ggb *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*GroupGroupBy) Float64X ¶ added in v0.1.7
func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupGroupBy) Float64s ¶ added in v0.1.7
func (ggb *GroupGroupBy) 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 (*GroupGroupBy) Float64sX ¶ added in v0.1.7
func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupGroupBy) Int ¶ added in v0.1.7
func (ggb *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*GroupGroupBy) IntX ¶ added in v0.1.7
func (ggb *GroupGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupGroupBy) Ints ¶ added in v0.1.7
func (ggb *GroupGroupBy) 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 (*GroupGroupBy) IntsX ¶ added in v0.1.7
func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupGroupBy) Scan ¶ added in v0.1.7
func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*GroupGroupBy) ScanX ¶ added in v0.1.7
func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupGroupBy) String ¶ added in v0.1.7
func (ggb *GroupGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*GroupGroupBy) StringX ¶ added in v0.1.7
func (ggb *GroupGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupMutation ¶ added in v0.1.7
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutate the Groups nodes in the graph.
func (*GroupMutation) AddField ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) AddGroupRoleIDs ¶ added in v0.1.7
func (m *GroupMutation) AddGroupRoleIDs(ids ...uuid.UUID)
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*GroupMutation) AddedEdges ¶ added in v0.1.7
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) AddedFields ¶ added in v0.1.7
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*GroupMutation) AddedIDs ¶ added in v0.1.7
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*GroupMutation) ClearDescription ¶ added in v0.1.7
func (m *GroupMutation) ClearDescription()
ClearDescription clears the value of description.
func (*GroupMutation) ClearEdge ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) ClearField ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) ClearGroupRoles ¶ added in v0.1.7
func (m *GroupMutation) ClearGroupRoles()
ClearGroupRoles clears the group_roles edge to GroupRole.
func (*GroupMutation) ClearMetadata ¶ added in v0.1.7
func (m *GroupMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*GroupMutation) ClearWorkspaces ¶ added in v0.1.7
func (m *GroupMutation) ClearWorkspaces()
ClearWorkspaces clears the workspaces edge to Workspace.
func (*GroupMutation) ClearedEdges ¶ added in v0.1.7
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶ added in v0.1.7
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶ added in v0.1.7
func (m GroupMutation) 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 (*GroupMutation) CreatedAt ¶ added in v0.1.7
func (m *GroupMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*GroupMutation) Description ¶ added in v0.1.7
func (m *GroupMutation) Description() (r string, exists bool)
Description returns the description value in the mutation.
func (*GroupMutation) DescriptionCleared ¶ added in v0.1.7
func (m *GroupMutation) DescriptionCleared() bool
DescriptionCleared returns if the field description was cleared in this mutation.
func (*GroupMutation) EdgeCleared ¶ added in v0.1.7
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*GroupMutation) Field ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) FieldCleared ¶ added in v0.1.7
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*GroupMutation) Fields ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) GroupRolesCleared ¶ added in v0.1.7
func (m *GroupMutation) GroupRolesCleared() bool
GroupRolesCleared returns if the edge group_roles was cleared.
func (*GroupMutation) GroupRolesIDs ¶ added in v0.1.7
func (m *GroupMutation) GroupRolesIDs() (ids []uuid.UUID)
GroupRolesIDs returns the group_roles ids in the mutation.
func (*GroupMutation) ID ¶ added in v0.1.7
func (m *GroupMutation) ID() (id uuid.UUID, 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 (*GroupMutation) Metadata ¶ added in v0.1.7
func (m *GroupMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*GroupMutation) MetadataCleared ¶ added in v0.1.7
func (m *GroupMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*GroupMutation) Name ¶ added in v0.1.7
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*GroupMutation) OldCreatedAt ¶ added in v0.1.7
OldCreatedAt returns the old created_at value of the Group. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupMutation) OldDescription ¶ added in v0.1.7
func (m *GroupMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old description value of the Group. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupMutation) OldField ¶ added in v0.1.7
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*GroupMutation) OldMetadata ¶ added in v0.1.7
func (m *GroupMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the Group. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupMutation) OldName ¶ added in v0.1.7
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the Group. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupMutation) OldUpdatedAt ¶ added in v0.1.7
OldUpdatedAt returns the old updated_at value of the Group. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupMutation) Op ¶ added in v0.1.7
func (m *GroupMutation) Op() Op
Op returns the operation name.
func (*GroupMutation) RemoveGroupRoleIDs ¶ added in v0.1.7
func (m *GroupMutation) RemoveGroupRoleIDs(ids ...uuid.UUID)
RemoveGroupRoleIDs removes the group_roles edge to GroupRole by ids.
func (*GroupMutation) RemovedEdges ¶ added in v0.1.7
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedGroupRolesIDs ¶ added in v0.1.7
func (m *GroupMutation) RemovedGroupRolesIDs() (ids []uuid.UUID)
RemovedGroupRoles returns the removed ids of group_roles.
func (*GroupMutation) RemovedIDs ¶ added in v0.1.7
func (m *GroupMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*GroupMutation) ResetCreatedAt ¶ added in v0.1.7
func (m *GroupMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*GroupMutation) ResetDescription ¶ added in v0.1.7
func (m *GroupMutation) ResetDescription()
ResetDescription reset all changes of the "description" field.
func (*GroupMutation) ResetEdge ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) ResetField ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) ResetGroupRoles ¶ added in v0.1.7
func (m *GroupMutation) ResetGroupRoles()
ResetGroupRoles reset all changes of the "group_roles" edge.
func (*GroupMutation) ResetMetadata ¶ added in v0.1.7
func (m *GroupMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*GroupMutation) ResetName ¶ added in v0.1.7
func (m *GroupMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*GroupMutation) ResetUpdatedAt ¶ added in v0.1.7
func (m *GroupMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*GroupMutation) ResetWorkspaces ¶ added in v0.1.7
func (m *GroupMutation) ResetWorkspaces()
ResetWorkspaces reset all changes of the "workspaces" edge.
func (*GroupMutation) SetCreatedAt ¶ added in v0.1.7
func (m *GroupMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*GroupMutation) SetDescription ¶ added in v0.1.7
func (m *GroupMutation) SetDescription(s string)
SetDescription sets the description field.
func (*GroupMutation) SetField ¶ added in v0.1.7
func (m *GroupMutation) 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 (*GroupMutation) SetID ¶ added in v0.1.7
func (m *GroupMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Group creation.
func (*GroupMutation) SetMetadata ¶ added in v0.1.7
func (m *GroupMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*GroupMutation) SetName ¶ added in v0.1.7
func (m *GroupMutation) SetName(s string)
SetName sets the name field.
func (*GroupMutation) SetUpdatedAt ¶ added in v0.1.7
func (m *GroupMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*GroupMutation) SetWorkspacesID ¶ added in v0.1.7
func (m *GroupMutation) SetWorkspacesID(id uuid.UUID)
SetWorkspacesID sets the workspaces edge to Workspace by id.
func (GroupMutation) Tx ¶ added in v0.1.7
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶ added in v0.1.7
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UpdatedAt ¶ added in v0.1.7
func (m *GroupMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*GroupMutation) WorkspacesCleared ¶ added in v0.1.7
func (m *GroupMutation) WorkspacesCleared() bool
WorkspacesCleared returns if the edge workspaces was cleared.
func (*GroupMutation) WorkspacesID ¶ added in v0.1.7
func (m *GroupMutation) WorkspacesID() (id uuid.UUID, exists bool)
WorkspacesID returns the workspaces id in the mutation.
func (*GroupMutation) WorkspacesIDs ¶ added in v0.1.7
func (m *GroupMutation) WorkspacesIDs() (ids []uuid.UUID)
WorkspacesIDs returns the workspaces ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use WorkspacesID instead. It exists only for internal usage by the builders.
type GroupQuery ¶ added in v0.1.7
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) All ¶ added in v0.1.7
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶ added in v0.1.7
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶ added in v0.1.7
func (gq *GroupQuery) Clone() *GroupQuery
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 (*GroupQuery) Count ¶ added in v0.1.7
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶ added in v0.1.7
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶ added in v0.1.7
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶ added in v0.1.7
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶ added in v0.1.7
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity in the query. Returns *NotFoundError when no group was found.
func (*GroupQuery) FirstID ¶ added in v0.1.7
FirstID returns the first Group id in the query. Returns *NotFoundError when no id was found.
func (*GroupQuery) FirstIDX ¶ added in v0.1.7
func (gq *GroupQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶ added in v0.1.7
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶ added in v0.1.7
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.Group.Query().
GroupBy(group.FieldName).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*GroupQuery) IDsX ¶ added in v0.1.7
func (gq *GroupQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶ added in v0.1.7
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit adds a limit step to the query.
func (*GroupQuery) Offset ¶ added in v0.1.7
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset adds an offset step to the query.
func (*GroupQuery) Only ¶ added in v0.1.7
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns the only Group entity in the query, returns an error if not exactly one entity was returned.
func (*GroupQuery) OnlyID ¶ added in v0.1.7
OnlyID returns the only Group id in the query, returns an error if not exactly one id was returned.
func (*GroupQuery) OnlyIDX ¶ added in v0.1.7
func (gq *GroupQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶ added in v0.1.7
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶ added in v0.1.7
func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
Order adds an order step to the query.
func (*GroupQuery) QueryGroupRoles ¶ added in v0.1.7
func (gq *GroupQuery) QueryGroupRoles() *GroupRoleQuery
QueryGroupRoles chains the current query on the group_roles edge.
func (*GroupQuery) QueryWorkspaces ¶ added in v0.1.7
func (gq *GroupQuery) QueryWorkspaces() *WorkspaceQuery
QueryWorkspaces chains the current query on the workspaces edge.
func (*GroupQuery) Select ¶ added in v0.1.7
func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect
Select one or more fields from the given query.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.Group.Query().
Select(group.FieldName).
Scan(ctx, &v)
func (*GroupQuery) Where ¶ added in v0.1.7
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the builder.
func (*GroupQuery) WithGroupRoles ¶ added in v0.1.7
func (gq *GroupQuery) WithGroupRoles(opts ...func(*GroupRoleQuery)) *GroupQuery
WithGroupRoles tells the query-builder to eager-loads the nodes that are connected to
the "group_roles" edge. The optional arguments used to configure the query builder of the edge.
func (*GroupQuery) WithWorkspaces ¶ added in v0.1.7
func (gq *GroupQuery) WithWorkspaces(opts ...func(*WorkspaceQuery)) *GroupQuery
WithWorkspaces tells the query-builder to eager-loads the nodes that are connected to
the "workspaces" edge. The optional arguments used to configure the query builder of the edge.
type GroupRole ¶ added in v0.1.7
type GroupRole struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// GroupID holds the value of the "group_id" field.
GroupID uuid.UUID `json:"group_id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID uuid.UUID `json:"user_id,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,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 GroupRoleQuery when eager-loading is set.
Edges GroupRoleEdges `json:"edges"`
// contains filtered or unexported fields
}
GroupRole is the model entity for the GroupRole schema.
func (*GroupRole) QueryGroups ¶ added in v0.1.7
func (gr *GroupRole) QueryGroups() *GroupQuery
QueryGroups queries the groups edge of the GroupRole.
func (*GroupRole) QueryUsers ¶ added in v0.1.7
QueryUsers queries the users edge of the GroupRole.
func (*GroupRole) Unwrap ¶ added in v0.1.7
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 (*GroupRole) Update ¶ added in v0.1.7
func (gr *GroupRole) Update() *GroupRoleUpdateOne
Update returns a builder for updating this GroupRole. Note that, you need to call GroupRole.Unwrap() before calling this method, if this GroupRole was returned from a transaction, and the transaction was committed or rolled back.
type GroupRoleClient ¶ added in v0.1.7
type GroupRoleClient struct {
// contains filtered or unexported fields
}
GroupRoleClient is a client for the GroupRole schema.
func NewGroupRoleClient ¶ added in v0.1.7
func NewGroupRoleClient(c config) *GroupRoleClient
NewGroupRoleClient returns a client for the GroupRole from the given config.
func (*GroupRoleClient) Create ¶ added in v0.1.7
func (c *GroupRoleClient) Create() *GroupRoleCreate
Create returns a create builder for GroupRole.
func (*GroupRoleClient) CreateBulk ¶ added in v0.1.7
func (c *GroupRoleClient) CreateBulk(builders ...*GroupRoleCreate) *GroupRoleCreateBulk
CreateBulk returns a builder for creating a bulk of GroupRole entities.
func (*GroupRoleClient) Delete ¶ added in v0.1.7
func (c *GroupRoleClient) Delete() *GroupRoleDelete
Delete returns a delete builder for GroupRole.
func (*GroupRoleClient) DeleteOne ¶ added in v0.1.7
func (c *GroupRoleClient) DeleteOne(gr *GroupRole) *GroupRoleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*GroupRoleClient) DeleteOneID ¶ added in v0.1.7
func (c *GroupRoleClient) DeleteOneID(id uuid.UUID) *GroupRoleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*GroupRoleClient) Hooks ¶ added in v0.1.7
func (c *GroupRoleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupRoleClient) Query ¶ added in v0.1.7
func (c *GroupRoleClient) Query() *GroupRoleQuery
Query returns a query builder for GroupRole.
func (*GroupRoleClient) QueryGroups ¶ added in v0.1.7
func (c *GroupRoleClient) QueryGroups(gr *GroupRole) *GroupQuery
QueryGroups queries the groups edge of a GroupRole.
func (*GroupRoleClient) QueryUsers ¶ added in v0.1.7
func (c *GroupRoleClient) QueryUsers(gr *GroupRole) *UserQuery
QueryUsers queries the users edge of a GroupRole.
func (*GroupRoleClient) Update ¶ added in v0.1.7
func (c *GroupRoleClient) Update() *GroupRoleUpdate
Update returns an update builder for GroupRole.
func (*GroupRoleClient) UpdateOne ¶ added in v0.1.7
func (c *GroupRoleClient) UpdateOne(gr *GroupRole) *GroupRoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupRoleClient) UpdateOneID ¶ added in v0.1.7
func (c *GroupRoleClient) UpdateOneID(id uuid.UUID) *GroupRoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupRoleClient) Use ¶ added in v0.1.7
func (c *GroupRoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `grouprole.Hooks(f(g(h())))`.
type GroupRoleCreate ¶ added in v0.1.7
type GroupRoleCreate struct {
// contains filtered or unexported fields
}
GroupRoleCreate is the builder for creating a GroupRole entity.
func (*GroupRoleCreate) Mutation ¶ added in v0.1.7
func (grc *GroupRoleCreate) Mutation() *GroupRoleMutation
Mutation returns the GroupRoleMutation object of the builder.
func (*GroupRoleCreate) Save ¶ added in v0.1.7
func (grc *GroupRoleCreate) Save(ctx context.Context) (*GroupRole, error)
Save creates the GroupRole in the database.
func (*GroupRoleCreate) SaveX ¶ added in v0.1.7
func (grc *GroupRoleCreate) SaveX(ctx context.Context) *GroupRole
SaveX calls Save and panics if Save returns an error.
func (*GroupRoleCreate) SetCreatedAt ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetCreatedAt(t time.Time) *GroupRoleCreate
SetCreatedAt sets the created_at field.
func (*GroupRoleCreate) SetGroupID ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetGroupID(u uuid.UUID) *GroupRoleCreate
SetGroupID sets the group_id field.
func (*GroupRoleCreate) SetGroups ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetGroups(g *Group) *GroupRoleCreate
SetGroups sets the groups edge to Group.
func (*GroupRoleCreate) SetGroupsID ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetGroupsID(id uuid.UUID) *GroupRoleCreate
SetGroupsID sets the groups edge to Group by id.
func (*GroupRoleCreate) SetID ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetID(u uuid.UUID) *GroupRoleCreate
SetID sets the id field.
func (*GroupRoleCreate) SetMetadata ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetMetadata(m map[string]interface{}) *GroupRoleCreate
SetMetadata sets the metadata field.
func (*GroupRoleCreate) SetName ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetName(s string) *GroupRoleCreate
SetName sets the name field.
func (*GroupRoleCreate) SetNillableCreatedAt ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetNillableCreatedAt(t *time.Time) *GroupRoleCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*GroupRoleCreate) SetNillableUpdatedAt ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetNillableUpdatedAt(t *time.Time) *GroupRoleCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*GroupRoleCreate) SetUpdatedAt ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetUpdatedAt(t time.Time) *GroupRoleCreate
SetUpdatedAt sets the updated_at field.
func (*GroupRoleCreate) SetUserID ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetUserID(u uuid.UUID) *GroupRoleCreate
SetUserID sets the user_id field.
func (*GroupRoleCreate) SetUsers ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetUsers(u *User) *GroupRoleCreate
SetUsers sets the users edge to User.
func (*GroupRoleCreate) SetUsersID ¶ added in v0.1.7
func (grc *GroupRoleCreate) SetUsersID(id uuid.UUID) *GroupRoleCreate
SetUsersID sets the users edge to User by id.
type GroupRoleCreateBulk ¶ added in v0.1.7
type GroupRoleCreateBulk struct {
// contains filtered or unexported fields
}
GroupRoleCreateBulk is the builder for creating a bulk of GroupRole entities.
type GroupRoleDelete ¶ added in v0.1.7
type GroupRoleDelete struct {
// contains filtered or unexported fields
}
GroupRoleDelete is the builder for deleting a GroupRole entity.
func (*GroupRoleDelete) Exec ¶ added in v0.1.7
func (grd *GroupRoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupRoleDelete) ExecX ¶ added in v0.1.7
func (grd *GroupRoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupRoleDelete) Where ¶ added in v0.1.7
func (grd *GroupRoleDelete) Where(ps ...predicate.GroupRole) *GroupRoleDelete
Where adds a new predicate to the delete builder.
type GroupRoleDeleteOne ¶ added in v0.1.7
type GroupRoleDeleteOne struct {
// contains filtered or unexported fields
}
GroupRoleDeleteOne is the builder for deleting a single GroupRole entity.
func (*GroupRoleDeleteOne) Exec ¶ added in v0.1.7
func (grdo *GroupRoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupRoleDeleteOne) ExecX ¶ added in v0.1.7
func (grdo *GroupRoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupRoleEdges ¶ added in v0.1.7
type GroupRoleEdges struct {
// Groups holds the value of the groups edge.
Groups *Group
// Users holds the value of the users edge.
Users *User
// contains filtered or unexported fields
}
GroupRoleEdges holds the relations/edges for other nodes in the graph.
func (GroupRoleEdges) GroupsOrErr ¶ added in v0.1.7
func (e GroupRoleEdges) GroupsOrErr() (*Group, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroupRoleEdges) UsersOrErr ¶ added in v0.1.7
func (e GroupRoleEdges) UsersOrErr() (*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroupRoleGroupBy ¶ added in v0.1.7
type GroupRoleGroupBy struct {
// contains filtered or unexported fields
}
GroupRoleGroupBy is the builder for group-by GroupRole entities.
func (*GroupRoleGroupBy) Aggregate ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Aggregate(fns ...AggregateFunc) *GroupRoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupRoleGroupBy) Bool ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*GroupRoleGroupBy) BoolX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupRoleGroupBy) Bools ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) 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 (*GroupRoleGroupBy) BoolsX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupRoleGroupBy) Float64 ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*GroupRoleGroupBy) Float64X ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupRoleGroupBy) Float64s ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) 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 (*GroupRoleGroupBy) Float64sX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupRoleGroupBy) Int ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*GroupRoleGroupBy) IntX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupRoleGroupBy) Ints ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) 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 (*GroupRoleGroupBy) IntsX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupRoleGroupBy) Scan ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*GroupRoleGroupBy) ScanX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupRoleGroupBy) String ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*GroupRoleGroupBy) StringX ¶ added in v0.1.7
func (grgb *GroupRoleGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupRoleMutation ¶ added in v0.1.7
type GroupRoleMutation struct {
// contains filtered or unexported fields
}
GroupRoleMutation represents an operation that mutate the GroupRoles nodes in the graph.
func (*GroupRoleMutation) AddField ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) AddedEdges ¶ added in v0.1.7
func (m *GroupRoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupRoleMutation) AddedField ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) AddedFields ¶ added in v0.1.7
func (m *GroupRoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*GroupRoleMutation) AddedIDs ¶ added in v0.1.7
func (m *GroupRoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*GroupRoleMutation) ClearEdge ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) ClearField ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) ClearGroups ¶ added in v0.1.7
func (m *GroupRoleMutation) ClearGroups()
ClearGroups clears the groups edge to Group.
func (*GroupRoleMutation) ClearMetadata ¶ added in v0.1.7
func (m *GroupRoleMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*GroupRoleMutation) ClearUsers ¶ added in v0.1.7
func (m *GroupRoleMutation) ClearUsers()
ClearUsers clears the users edge to User.
func (*GroupRoleMutation) ClearedEdges ¶ added in v0.1.7
func (m *GroupRoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupRoleMutation) ClearedFields ¶ added in v0.1.7
func (m *GroupRoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupRoleMutation) Client ¶ added in v0.1.7
func (m GroupRoleMutation) 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 (*GroupRoleMutation) CreatedAt ¶ added in v0.1.7
func (m *GroupRoleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*GroupRoleMutation) EdgeCleared ¶ added in v0.1.7
func (m *GroupRoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*GroupRoleMutation) Field ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) FieldCleared ¶ added in v0.1.7
func (m *GroupRoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*GroupRoleMutation) Fields ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) GroupID ¶ added in v0.1.7
func (m *GroupRoleMutation) GroupID() (r uuid.UUID, exists bool)
GroupID returns the group_id value in the mutation.
func (*GroupRoleMutation) GroupsCleared ¶ added in v0.1.7
func (m *GroupRoleMutation) GroupsCleared() bool
GroupsCleared returns if the edge groups was cleared.
func (*GroupRoleMutation) GroupsID ¶ added in v0.1.7
func (m *GroupRoleMutation) GroupsID() (id uuid.UUID, exists bool)
GroupsID returns the groups id in the mutation.
func (*GroupRoleMutation) GroupsIDs ¶ added in v0.1.7
func (m *GroupRoleMutation) GroupsIDs() (ids []uuid.UUID)
GroupsIDs returns the groups ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use GroupsID instead. It exists only for internal usage by the builders.
func (*GroupRoleMutation) ID ¶ added in v0.1.7
func (m *GroupRoleMutation) ID() (id uuid.UUID, 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 (*GroupRoleMutation) Metadata ¶ added in v0.1.7
func (m *GroupRoleMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*GroupRoleMutation) MetadataCleared ¶ added in v0.1.7
func (m *GroupRoleMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*GroupRoleMutation) Name ¶ added in v0.1.7
func (m *GroupRoleMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*GroupRoleMutation) OldCreatedAt ¶ added in v0.1.7
OldCreatedAt returns the old created_at value of the GroupRole. If the GroupRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupRoleMutation) OldField ¶ added in v0.1.7
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*GroupRoleMutation) OldGroupID ¶ added in v0.1.7
OldGroupID returns the old group_id value of the GroupRole. If the GroupRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupRoleMutation) OldMetadata ¶ added in v0.1.7
func (m *GroupRoleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the GroupRole. If the GroupRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupRoleMutation) OldName ¶ added in v0.1.7
func (m *GroupRoleMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the GroupRole. If the GroupRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupRoleMutation) OldUpdatedAt ¶ added in v0.1.7
OldUpdatedAt returns the old updated_at value of the GroupRole. If the GroupRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupRoleMutation) OldUserID ¶ added in v0.1.7
OldUserID returns the old user_id value of the GroupRole. If the GroupRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*GroupRoleMutation) Op ¶ added in v0.1.7
func (m *GroupRoleMutation) Op() Op
Op returns the operation name.
func (*GroupRoleMutation) RemovedEdges ¶ added in v0.1.7
func (m *GroupRoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupRoleMutation) RemovedIDs ¶ added in v0.1.7
func (m *GroupRoleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*GroupRoleMutation) ResetCreatedAt ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*GroupRoleMutation) ResetEdge ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) ResetField ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) ResetGroupID ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetGroupID()
ResetGroupID reset all changes of the "group_id" field.
func (*GroupRoleMutation) ResetGroups ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetGroups()
ResetGroups reset all changes of the "groups" edge.
func (*GroupRoleMutation) ResetMetadata ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*GroupRoleMutation) ResetName ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*GroupRoleMutation) ResetUpdatedAt ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*GroupRoleMutation) ResetUserID ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetUserID()
ResetUserID reset all changes of the "user_id" field.
func (*GroupRoleMutation) ResetUsers ¶ added in v0.1.7
func (m *GroupRoleMutation) ResetUsers()
ResetUsers reset all changes of the "users" edge.
func (*GroupRoleMutation) SetCreatedAt ¶ added in v0.1.7
func (m *GroupRoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*GroupRoleMutation) SetField ¶ added in v0.1.7
func (m *GroupRoleMutation) 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 (*GroupRoleMutation) SetGroupID ¶ added in v0.1.7
func (m *GroupRoleMutation) SetGroupID(u uuid.UUID)
SetGroupID sets the group_id field.
func (*GroupRoleMutation) SetGroupsID ¶ added in v0.1.7
func (m *GroupRoleMutation) SetGroupsID(id uuid.UUID)
SetGroupsID sets the groups edge to Group by id.
func (*GroupRoleMutation) SetID ¶ added in v0.1.7
func (m *GroupRoleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on GroupRole creation.
func (*GroupRoleMutation) SetMetadata ¶ added in v0.1.7
func (m *GroupRoleMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*GroupRoleMutation) SetName ¶ added in v0.1.7
func (m *GroupRoleMutation) SetName(s string)
SetName sets the name field.
func (*GroupRoleMutation) SetUpdatedAt ¶ added in v0.1.7
func (m *GroupRoleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*GroupRoleMutation) SetUserID ¶ added in v0.1.7
func (m *GroupRoleMutation) SetUserID(u uuid.UUID)
SetUserID sets the user_id field.
func (*GroupRoleMutation) SetUsersID ¶ added in v0.1.7
func (m *GroupRoleMutation) SetUsersID(id uuid.UUID)
SetUsersID sets the users edge to User by id.
func (GroupRoleMutation) Tx ¶ added in v0.1.7
func (m GroupRoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupRoleMutation) Type ¶ added in v0.1.7
func (m *GroupRoleMutation) Type() string
Type returns the node type of this mutation (GroupRole).
func (*GroupRoleMutation) UpdatedAt ¶ added in v0.1.7
func (m *GroupRoleMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*GroupRoleMutation) UserID ¶ added in v0.1.7
func (m *GroupRoleMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the user_id value in the mutation.
func (*GroupRoleMutation) UsersCleared ¶ added in v0.1.7
func (m *GroupRoleMutation) UsersCleared() bool
UsersCleared returns if the edge users was cleared.
func (*GroupRoleMutation) UsersID ¶ added in v0.1.7
func (m *GroupRoleMutation) UsersID() (id uuid.UUID, exists bool)
UsersID returns the users id in the mutation.
func (*GroupRoleMutation) UsersIDs ¶ added in v0.1.7
func (m *GroupRoleMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the users ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use UsersID instead. It exists only for internal usage by the builders.
type GroupRoleQuery ¶ added in v0.1.7
type GroupRoleQuery struct {
// contains filtered or unexported fields
}
GroupRoleQuery is the builder for querying GroupRole entities.
func (*GroupRoleQuery) All ¶ added in v0.1.7
func (grq *GroupRoleQuery) All(ctx context.Context) ([]*GroupRole, error)
All executes the query and returns a list of GroupRoles.
func (*GroupRoleQuery) AllX ¶ added in v0.1.7
func (grq *GroupRoleQuery) AllX(ctx context.Context) []*GroupRole
AllX is like All, but panics if an error occurs.
func (*GroupRoleQuery) Clone ¶ added in v0.1.7
func (grq *GroupRoleQuery) Clone() *GroupRoleQuery
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 (*GroupRoleQuery) Count ¶ added in v0.1.7
func (grq *GroupRoleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupRoleQuery) CountX ¶ added in v0.1.7
func (grq *GroupRoleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupRoleQuery) Exist ¶ added in v0.1.7
func (grq *GroupRoleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupRoleQuery) ExistX ¶ added in v0.1.7
func (grq *GroupRoleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupRoleQuery) First ¶ added in v0.1.7
func (grq *GroupRoleQuery) First(ctx context.Context) (*GroupRole, error)
First returns the first GroupRole entity in the query. Returns *NotFoundError when no grouprole was found.
func (*GroupRoleQuery) FirstID ¶ added in v0.1.7
FirstID returns the first GroupRole id in the query. Returns *NotFoundError when no id was found.
func (*GroupRoleQuery) FirstIDX ¶ added in v0.1.7
func (grq *GroupRoleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupRoleQuery) FirstX ¶ added in v0.1.7
func (grq *GroupRoleQuery) FirstX(ctx context.Context) *GroupRole
FirstX is like First, but panics if an error occurs.
func (*GroupRoleQuery) GroupBy ¶ added in v0.1.7
func (grq *GroupRoleQuery) GroupBy(field string, fields ...string) *GroupRoleGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.GroupRole.Query().
GroupBy(grouprole.FieldName).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*GroupRoleQuery) IDs ¶ added in v0.1.7
IDs executes the query and returns a list of GroupRole ids.
func (*GroupRoleQuery) IDsX ¶ added in v0.1.7
func (grq *GroupRoleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*GroupRoleQuery) Limit ¶ added in v0.1.7
func (grq *GroupRoleQuery) Limit(limit int) *GroupRoleQuery
Limit adds a limit step to the query.
func (*GroupRoleQuery) Offset ¶ added in v0.1.7
func (grq *GroupRoleQuery) Offset(offset int) *GroupRoleQuery
Offset adds an offset step to the query.
func (*GroupRoleQuery) Only ¶ added in v0.1.7
func (grq *GroupRoleQuery) Only(ctx context.Context) (*GroupRole, error)
Only returns the only GroupRole entity in the query, returns an error if not exactly one entity was returned.
func (*GroupRoleQuery) OnlyID ¶ added in v0.1.7
OnlyID returns the only GroupRole id in the query, returns an error if not exactly one id was returned.
func (*GroupRoleQuery) OnlyIDX ¶ added in v0.1.7
func (grq *GroupRoleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupRoleQuery) OnlyX ¶ added in v0.1.7
func (grq *GroupRoleQuery) OnlyX(ctx context.Context) *GroupRole
OnlyX is like Only, but panics if an error occurs.
func (*GroupRoleQuery) Order ¶ added in v0.1.7
func (grq *GroupRoleQuery) Order(o ...OrderFunc) *GroupRoleQuery
Order adds an order step to the query.
func (*GroupRoleQuery) QueryGroups ¶ added in v0.1.7
func (grq *GroupRoleQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the groups edge.
func (*GroupRoleQuery) QueryUsers ¶ added in v0.1.7
func (grq *GroupRoleQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the users edge.
func (*GroupRoleQuery) Select ¶ added in v0.1.7
func (grq *GroupRoleQuery) Select(field string, fields ...string) *GroupRoleSelect
Select one or more fields from the given query.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.GroupRole.Query().
Select(grouprole.FieldName).
Scan(ctx, &v)
func (*GroupRoleQuery) Where ¶ added in v0.1.7
func (grq *GroupRoleQuery) Where(ps ...predicate.GroupRole) *GroupRoleQuery
Where adds a new predicate for the builder.
func (*GroupRoleQuery) WithGroups ¶ added in v0.1.7
func (grq *GroupRoleQuery) WithGroups(opts ...func(*GroupQuery)) *GroupRoleQuery
WithGroups tells the query-builder to eager-loads the nodes that are connected to
the "groups" edge. The optional arguments used to configure the query builder of the edge.
func (*GroupRoleQuery) WithUsers ¶ added in v0.1.7
func (grq *GroupRoleQuery) WithUsers(opts ...func(*UserQuery)) *GroupRoleQuery
WithUsers tells the query-builder to eager-loads the nodes that are connected to
the "users" edge. The optional arguments used to configure the query builder of the edge.
type GroupRoleSelect ¶ added in v0.1.7
type GroupRoleSelect struct {
// contains filtered or unexported fields
}
GroupRoleSelect is the builder for select fields of GroupRole entities.
func (*GroupRoleSelect) Bool ¶ added in v0.1.7
func (grs *GroupRoleSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) BoolX ¶ added in v0.1.7
func (grs *GroupRoleSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupRoleSelect) Bools ¶ added in v0.1.7
func (grs *GroupRoleSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) BoolsX ¶ added in v0.1.7
func (grs *GroupRoleSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupRoleSelect) Float64 ¶ added in v0.1.7
func (grs *GroupRoleSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) Float64X ¶ added in v0.1.7
func (grs *GroupRoleSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupRoleSelect) Float64s ¶ added in v0.1.7
func (grs *GroupRoleSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) Float64sX ¶ added in v0.1.7
func (grs *GroupRoleSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupRoleSelect) Int ¶ added in v0.1.7
func (grs *GroupRoleSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) IntX ¶ added in v0.1.7
func (grs *GroupRoleSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupRoleSelect) Ints ¶ added in v0.1.7
func (grs *GroupRoleSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) IntsX ¶ added in v0.1.7
func (grs *GroupRoleSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupRoleSelect) Scan ¶ added in v0.1.7
func (grs *GroupRoleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*GroupRoleSelect) ScanX ¶ added in v0.1.7
func (grs *GroupRoleSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupRoleSelect) String ¶ added in v0.1.7
func (grs *GroupRoleSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*GroupRoleSelect) StringX ¶ added in v0.1.7
func (grs *GroupRoleSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupRoleUpdate ¶ added in v0.1.7
type GroupRoleUpdate struct {
// contains filtered or unexported fields
}
GroupRoleUpdate is the builder for updating GroupRole entities.
func (*GroupRoleUpdate) ClearGroups ¶ added in v0.1.7
func (gru *GroupRoleUpdate) ClearGroups() *GroupRoleUpdate
ClearGroups clears the "groups" edge to type Group.
func (*GroupRoleUpdate) ClearMetadata ¶ added in v0.1.7
func (gru *GroupRoleUpdate) ClearMetadata() *GroupRoleUpdate
ClearMetadata clears the value of metadata.
func (*GroupRoleUpdate) ClearUsers ¶ added in v0.1.7
func (gru *GroupRoleUpdate) ClearUsers() *GroupRoleUpdate
ClearUsers clears the "users" edge to type User.
func (*GroupRoleUpdate) Exec ¶ added in v0.1.7
func (gru *GroupRoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupRoleUpdate) ExecX ¶ added in v0.1.7
func (gru *GroupRoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupRoleUpdate) Mutation ¶ added in v0.1.7
func (gru *GroupRoleUpdate) Mutation() *GroupRoleMutation
Mutation returns the GroupRoleMutation object of the builder.
func (*GroupRoleUpdate) Save ¶ added in v0.1.7
func (gru *GroupRoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupRoleUpdate) SaveX ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupRoleUpdate) SetGroupID ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetGroupID(u uuid.UUID) *GroupRoleUpdate
SetGroupID sets the group_id field.
func (*GroupRoleUpdate) SetGroups ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetGroups(g *Group) *GroupRoleUpdate
SetGroups sets the groups edge to Group.
func (*GroupRoleUpdate) SetGroupsID ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetGroupsID(id uuid.UUID) *GroupRoleUpdate
SetGroupsID sets the groups edge to Group by id.
func (*GroupRoleUpdate) SetMetadata ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetMetadata(m map[string]interface{}) *GroupRoleUpdate
SetMetadata sets the metadata field.
func (*GroupRoleUpdate) SetName ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetName(s string) *GroupRoleUpdate
SetName sets the name field.
func (*GroupRoleUpdate) SetUpdatedAt ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetUpdatedAt(t time.Time) *GroupRoleUpdate
SetUpdatedAt sets the updated_at field.
func (*GroupRoleUpdate) SetUserID ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetUserID(u uuid.UUID) *GroupRoleUpdate
SetUserID sets the user_id field.
func (*GroupRoleUpdate) SetUsers ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetUsers(u *User) *GroupRoleUpdate
SetUsers sets the users edge to User.
func (*GroupRoleUpdate) SetUsersID ¶ added in v0.1.7
func (gru *GroupRoleUpdate) SetUsersID(id uuid.UUID) *GroupRoleUpdate
SetUsersID sets the users edge to User by id.
func (*GroupRoleUpdate) Where ¶ added in v0.1.7
func (gru *GroupRoleUpdate) Where(ps ...predicate.GroupRole) *GroupRoleUpdate
Where adds a new predicate for the builder.
type GroupRoleUpdateOne ¶ added in v0.1.7
type GroupRoleUpdateOne struct {
// contains filtered or unexported fields
}
GroupRoleUpdateOne is the builder for updating a single GroupRole entity.
func (*GroupRoleUpdateOne) ClearGroups ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) ClearGroups() *GroupRoleUpdateOne
ClearGroups clears the "groups" edge to type Group.
func (*GroupRoleUpdateOne) ClearMetadata ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) ClearMetadata() *GroupRoleUpdateOne
ClearMetadata clears the value of metadata.
func (*GroupRoleUpdateOne) ClearUsers ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) ClearUsers() *GroupRoleUpdateOne
ClearUsers clears the "users" edge to type User.
func (*GroupRoleUpdateOne) Exec ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupRoleUpdateOne) ExecX ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupRoleUpdateOne) Mutation ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) Mutation() *GroupRoleMutation
Mutation returns the GroupRoleMutation object of the builder.
func (*GroupRoleUpdateOne) Save ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) Save(ctx context.Context) (*GroupRole, error)
Save executes the query and returns the updated entity.
func (*GroupRoleUpdateOne) SaveX ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SaveX(ctx context.Context) *GroupRole
SaveX is like Save, but panics if an error occurs.
func (*GroupRoleUpdateOne) SetGroupID ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetGroupID(u uuid.UUID) *GroupRoleUpdateOne
SetGroupID sets the group_id field.
func (*GroupRoleUpdateOne) SetGroups ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetGroups(g *Group) *GroupRoleUpdateOne
SetGroups sets the groups edge to Group.
func (*GroupRoleUpdateOne) SetGroupsID ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetGroupsID(id uuid.UUID) *GroupRoleUpdateOne
SetGroupsID sets the groups edge to Group by id.
func (*GroupRoleUpdateOne) SetMetadata ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetMetadata(m map[string]interface{}) *GroupRoleUpdateOne
SetMetadata sets the metadata field.
func (*GroupRoleUpdateOne) SetName ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetName(s string) *GroupRoleUpdateOne
SetName sets the name field.
func (*GroupRoleUpdateOne) SetUpdatedAt ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetUpdatedAt(t time.Time) *GroupRoleUpdateOne
SetUpdatedAt sets the updated_at field.
func (*GroupRoleUpdateOne) SetUserID ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetUserID(u uuid.UUID) *GroupRoleUpdateOne
SetUserID sets the user_id field.
func (*GroupRoleUpdateOne) SetUsers ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetUsers(u *User) *GroupRoleUpdateOne
SetUsers sets the users edge to User.
func (*GroupRoleUpdateOne) SetUsersID ¶ added in v0.1.7
func (gruo *GroupRoleUpdateOne) SetUsersID(id uuid.UUID) *GroupRoleUpdateOne
SetUsersID sets the users edge to User by id.
type GroupRoles ¶ added in v0.1.7
type GroupRoles []*GroupRole
GroupRoles is a parsable slice of GroupRole.
type GroupSelect ¶ added in v0.1.7
type GroupSelect struct {
// contains filtered or unexported fields
}
GroupSelect is the builder for select fields of Group entities.
func (*GroupSelect) Bool ¶ added in v0.1.7
func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*GroupSelect) BoolX ¶ added in v0.1.7
func (gs *GroupSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupSelect) Bools ¶ added in v0.1.7
func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*GroupSelect) BoolsX ¶ added in v0.1.7
func (gs *GroupSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupSelect) Float64 ¶ added in v0.1.7
func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64X ¶ added in v0.1.7
func (gs *GroupSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupSelect) Float64s ¶ added in v0.1.7
func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64sX ¶ added in v0.1.7
func (gs *GroupSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupSelect) Int ¶ added in v0.1.7
func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*GroupSelect) IntX ¶ added in v0.1.7
func (gs *GroupSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupSelect) Ints ¶ added in v0.1.7
func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*GroupSelect) IntsX ¶ added in v0.1.7
func (gs *GroupSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupSelect) Scan ¶ added in v0.1.7
func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*GroupSelect) ScanX ¶ added in v0.1.7
func (gs *GroupSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupSelect) String ¶ added in v0.1.7
func (gs *GroupSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*GroupSelect) StringX ¶ added in v0.1.7
func (gs *GroupSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupUpdate ¶ added in v0.1.7
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddGroupRoleIDs ¶ added in v0.1.7
func (gu *GroupUpdate) AddGroupRoleIDs(ids ...uuid.UUID) *GroupUpdate
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*GroupUpdate) AddGroupRoles ¶ added in v0.1.7
func (gu *GroupUpdate) AddGroupRoles(g ...*GroupRole) *GroupUpdate
AddGroupRoles adds the group_roles edges to GroupRole.
func (*GroupUpdate) ClearDescription ¶ added in v0.1.7
func (gu *GroupUpdate) ClearDescription() *GroupUpdate
ClearDescription clears the value of description.
func (*GroupUpdate) ClearGroupRoles ¶ added in v0.1.7
func (gu *GroupUpdate) ClearGroupRoles() *GroupUpdate
ClearGroupRoles clears all "group_roles" edges to type GroupRole.
func (*GroupUpdate) ClearMetadata ¶ added in v0.1.7
func (gu *GroupUpdate) ClearMetadata() *GroupUpdate
ClearMetadata clears the value of metadata.
func (*GroupUpdate) ClearWorkspaces ¶ added in v0.1.7
func (gu *GroupUpdate) ClearWorkspaces() *GroupUpdate
ClearWorkspaces clears the "workspaces" edge to type Workspace.
func (*GroupUpdate) Exec ¶ added in v0.1.7
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶ added in v0.1.7
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶ added in v0.1.7
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveGroupRoleIDs ¶ added in v0.1.7
func (gu *GroupUpdate) RemoveGroupRoleIDs(ids ...uuid.UUID) *GroupUpdate
RemoveGroupRoleIDs removes the group_roles edge to GroupRole by ids.
func (*GroupUpdate) RemoveGroupRoles ¶ added in v0.1.7
func (gu *GroupUpdate) RemoveGroupRoles(g ...*GroupRole) *GroupUpdate
RemoveGroupRoles removes group_roles edges to GroupRole.
func (*GroupUpdate) Save ¶ added in v0.1.7
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶ added in v0.1.7
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetDescription ¶ added in v0.1.7
func (gu *GroupUpdate) SetDescription(s string) *GroupUpdate
SetDescription sets the description field.
func (*GroupUpdate) SetMetadata ¶ added in v0.1.7
func (gu *GroupUpdate) SetMetadata(m map[string]interface{}) *GroupUpdate
SetMetadata sets the metadata field.
func (*GroupUpdate) SetName ¶ added in v0.1.7
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the name field.
func (*GroupUpdate) SetNillableDescription ¶ added in v0.1.7
func (gu *GroupUpdate) SetNillableDescription(s *string) *GroupUpdate
SetNillableDescription sets the description field if the given value is not nil.
func (*GroupUpdate) SetUpdatedAt ¶ added in v0.1.7
func (gu *GroupUpdate) SetUpdatedAt(t time.Time) *GroupUpdate
SetUpdatedAt sets the updated_at field.
func (*GroupUpdate) SetWorkspaces ¶ added in v0.1.7
func (gu *GroupUpdate) SetWorkspaces(w *Workspace) *GroupUpdate
SetWorkspaces sets the workspaces edge to Workspace.
func (*GroupUpdate) SetWorkspacesID ¶ added in v0.1.7
func (gu *GroupUpdate) SetWorkspacesID(id uuid.UUID) *GroupUpdate
SetWorkspacesID sets the workspaces edge to Workspace by id.
func (*GroupUpdate) Where ¶ added in v0.1.7
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where adds a new predicate for the builder.
type GroupUpdateOne ¶ added in v0.1.7
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddGroupRoleIDs ¶ added in v0.1.7
func (guo *GroupUpdateOne) AddGroupRoleIDs(ids ...uuid.UUID) *GroupUpdateOne
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*GroupUpdateOne) AddGroupRoles ¶ added in v0.1.7
func (guo *GroupUpdateOne) AddGroupRoles(g ...*GroupRole) *GroupUpdateOne
AddGroupRoles adds the group_roles edges to GroupRole.
func (*GroupUpdateOne) ClearDescription ¶ added in v0.1.7
func (guo *GroupUpdateOne) ClearDescription() *GroupUpdateOne
ClearDescription clears the value of description.
func (*GroupUpdateOne) ClearGroupRoles ¶ added in v0.1.7
func (guo *GroupUpdateOne) ClearGroupRoles() *GroupUpdateOne
ClearGroupRoles clears all "group_roles" edges to type GroupRole.
func (*GroupUpdateOne) ClearMetadata ¶ added in v0.1.7
func (guo *GroupUpdateOne) ClearMetadata() *GroupUpdateOne
ClearMetadata clears the value of metadata.
func (*GroupUpdateOne) ClearWorkspaces ¶ added in v0.1.7
func (guo *GroupUpdateOne) ClearWorkspaces() *GroupUpdateOne
ClearWorkspaces clears the "workspaces" edge to type Workspace.
func (*GroupUpdateOne) Exec ¶ added in v0.1.7
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶ added in v0.1.7
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶ added in v0.1.7
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveGroupRoleIDs ¶ added in v0.1.7
func (guo *GroupUpdateOne) RemoveGroupRoleIDs(ids ...uuid.UUID) *GroupUpdateOne
RemoveGroupRoleIDs removes the group_roles edge to GroupRole by ids.
func (*GroupUpdateOne) RemoveGroupRoles ¶ added in v0.1.7
func (guo *GroupUpdateOne) RemoveGroupRoles(g ...*GroupRole) *GroupUpdateOne
RemoveGroupRoles removes group_roles edges to GroupRole.
func (*GroupUpdateOne) Save ¶ added in v0.1.7
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated entity.
func (*GroupUpdateOne) SaveX ¶ added in v0.1.7
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) SetDescription ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetDescription(s string) *GroupUpdateOne
SetDescription sets the description field.
func (*GroupUpdateOne) SetMetadata ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetMetadata(m map[string]interface{}) *GroupUpdateOne
SetMetadata sets the metadata field.
func (*GroupUpdateOne) SetName ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the name field.
func (*GroupUpdateOne) SetNillableDescription ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetNillableDescription(s *string) *GroupUpdateOne
SetNillableDescription sets the description field if the given value is not nil.
func (*GroupUpdateOne) SetUpdatedAt ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetUpdatedAt(t time.Time) *GroupUpdateOne
SetUpdatedAt sets the updated_at field.
func (*GroupUpdateOne) SetWorkspaces ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetWorkspaces(w *Workspace) *GroupUpdateOne
SetWorkspaces sets the workspaces edge to Workspace.
func (*GroupUpdateOne) SetWorkspacesID ¶ added in v0.1.7
func (guo *GroupUpdateOne) SetWorkspacesID(id uuid.UUID) *GroupUpdateOne
SetWorkspacesID sets the workspaces edge to Workspace by id.
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 Permission ¶ added in v0.1.7
type Permission struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// RoleID holds the value of the "role_id" field.
RoleID uuid.UUID `json:"role_id,omitempty"`
// Action holds the value of the "action" field.
Action string `json:"action,omitempty"`
// Target holds the value of the "target" field.
Target string `json:"target,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"`
// contains filtered or unexported fields
}
Permission is the model entity for the Permission schema.
func (*Permission) String ¶ added in v0.1.7
func (pe *Permission) String() string
String implements the fmt.Stringer.
func (*Permission) Unwrap ¶ added in v0.1.7
func (pe *Permission) Unwrap() *Permission
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 (*Permission) Update ¶ added in v0.1.7
func (pe *Permission) Update() *PermissionUpdateOne
Update returns a builder for updating this Permission. Note that, you need to call Permission.Unwrap() before calling this method, if this Permission was returned from a transaction, and the transaction was committed or rolled back.
type PermissionClient ¶ added in v0.1.7
type PermissionClient struct {
// contains filtered or unexported fields
}
PermissionClient is a client for the Permission schema.
func NewPermissionClient ¶ added in v0.1.7
func NewPermissionClient(c config) *PermissionClient
NewPermissionClient returns a client for the Permission from the given config.
func (*PermissionClient) Create ¶ added in v0.1.7
func (c *PermissionClient) Create() *PermissionCreate
Create returns a create builder for Permission.
func (*PermissionClient) CreateBulk ¶ added in v0.1.7
func (c *PermissionClient) CreateBulk(builders ...*PermissionCreate) *PermissionCreateBulk
CreateBulk returns a builder for creating a bulk of Permission entities.
func (*PermissionClient) Delete ¶ added in v0.1.7
func (c *PermissionClient) Delete() *PermissionDelete
Delete returns a delete builder for Permission.
func (*PermissionClient) DeleteOne ¶ added in v0.1.7
func (c *PermissionClient) DeleteOne(pe *Permission) *PermissionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*PermissionClient) DeleteOneID ¶ added in v0.1.7
func (c *PermissionClient) DeleteOneID(id uuid.UUID) *PermissionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*PermissionClient) Get ¶ added in v0.1.7
func (c *PermissionClient) Get(ctx context.Context, id uuid.UUID) (*Permission, error)
Get returns a Permission entity by its id.
func (*PermissionClient) GetX ¶ added in v0.1.7
func (c *PermissionClient) GetX(ctx context.Context, id uuid.UUID) *Permission
GetX is like Get, but panics if an error occurs.
func (*PermissionClient) Hooks ¶ added in v0.1.7
func (c *PermissionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PermissionClient) Query ¶ added in v0.1.7
func (c *PermissionClient) Query() *PermissionQuery
Query returns a query builder for Permission.
func (*PermissionClient) Update ¶ added in v0.1.7
func (c *PermissionClient) Update() *PermissionUpdate
Update returns an update builder for Permission.
func (*PermissionClient) UpdateOne ¶ added in v0.1.7
func (c *PermissionClient) UpdateOne(pe *Permission) *PermissionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PermissionClient) UpdateOneID ¶ added in v0.1.7
func (c *PermissionClient) UpdateOneID(id uuid.UUID) *PermissionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PermissionClient) Use ¶ added in v0.1.7
func (c *PermissionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `permission.Hooks(f(g(h())))`.
type PermissionCreate ¶ added in v0.1.7
type PermissionCreate struct {
// contains filtered or unexported fields
}
PermissionCreate is the builder for creating a Permission entity.
func (*PermissionCreate) Mutation ¶ added in v0.1.7
func (pc *PermissionCreate) Mutation() *PermissionMutation
Mutation returns the PermissionMutation object of the builder.
func (*PermissionCreate) Save ¶ added in v0.1.7
func (pc *PermissionCreate) Save(ctx context.Context) (*Permission, error)
Save creates the Permission in the database.
func (*PermissionCreate) SaveX ¶ added in v0.1.7
func (pc *PermissionCreate) SaveX(ctx context.Context) *Permission
SaveX calls Save and panics if Save returns an error.
func (*PermissionCreate) SetAction ¶ added in v0.1.7
func (pc *PermissionCreate) SetAction(s string) *PermissionCreate
SetAction sets the action field.
func (*PermissionCreate) SetCreatedAt ¶ added in v0.1.7
func (pc *PermissionCreate) SetCreatedAt(t time.Time) *PermissionCreate
SetCreatedAt sets the created_at field.
func (*PermissionCreate) SetID ¶ added in v0.1.7
func (pc *PermissionCreate) SetID(u uuid.UUID) *PermissionCreate
SetID sets the id field.
func (*PermissionCreate) SetNillableCreatedAt ¶ added in v0.1.7
func (pc *PermissionCreate) SetNillableCreatedAt(t *time.Time) *PermissionCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*PermissionCreate) SetNillableUpdatedAt ¶ added in v0.1.7
func (pc *PermissionCreate) SetNillableUpdatedAt(t *time.Time) *PermissionCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*PermissionCreate) SetRoleID ¶ added in v0.1.7
func (pc *PermissionCreate) SetRoleID(u uuid.UUID) *PermissionCreate
SetRoleID sets the role_id field.
func (*PermissionCreate) SetTarget ¶ added in v0.1.7
func (pc *PermissionCreate) SetTarget(s string) *PermissionCreate
SetTarget sets the target field.
func (*PermissionCreate) SetUpdatedAt ¶ added in v0.1.7
func (pc *PermissionCreate) SetUpdatedAt(t time.Time) *PermissionCreate
SetUpdatedAt sets the updated_at field.
type PermissionCreateBulk ¶ added in v0.1.7
type PermissionCreateBulk struct {
// contains filtered or unexported fields
}
PermissionCreateBulk is the builder for creating a bulk of Permission entities.
func (*PermissionCreateBulk) Save ¶ added in v0.1.7
func (pcb *PermissionCreateBulk) Save(ctx context.Context) ([]*Permission, error)
Save creates the Permission entities in the database.
func (*PermissionCreateBulk) SaveX ¶ added in v0.1.7
func (pcb *PermissionCreateBulk) SaveX(ctx context.Context) []*Permission
SaveX calls Save and panics if Save returns an error.
type PermissionDelete ¶ added in v0.1.7
type PermissionDelete struct {
// contains filtered or unexported fields
}
PermissionDelete is the builder for deleting a Permission entity.
func (*PermissionDelete) Exec ¶ added in v0.1.7
func (pd *PermissionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PermissionDelete) ExecX ¶ added in v0.1.7
func (pd *PermissionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PermissionDelete) Where ¶ added in v0.1.7
func (pd *PermissionDelete) Where(ps ...predicate.Permission) *PermissionDelete
Where adds a new predicate to the delete builder.
type PermissionDeleteOne ¶ added in v0.1.7
type PermissionDeleteOne struct {
// contains filtered or unexported fields
}
PermissionDeleteOne is the builder for deleting a single Permission entity.
func (*PermissionDeleteOne) Exec ¶ added in v0.1.7
func (pdo *PermissionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PermissionDeleteOne) ExecX ¶ added in v0.1.7
func (pdo *PermissionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PermissionGroupBy ¶ added in v0.1.7
type PermissionGroupBy struct {
// contains filtered or unexported fields
}
PermissionGroupBy is the builder for group-by Permission entities.
func (*PermissionGroupBy) Aggregate ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Aggregate(fns ...AggregateFunc) *PermissionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PermissionGroupBy) Bool ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*PermissionGroupBy) BoolX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PermissionGroupBy) Bools ¶ added in v0.1.7
func (pgb *PermissionGroupBy) 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 (*PermissionGroupBy) BoolsX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PermissionGroupBy) Float64 ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*PermissionGroupBy) Float64X ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PermissionGroupBy) Float64s ¶ added in v0.1.7
func (pgb *PermissionGroupBy) 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 (*PermissionGroupBy) Float64sX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PermissionGroupBy) Int ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*PermissionGroupBy) IntX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PermissionGroupBy) Ints ¶ added in v0.1.7
func (pgb *PermissionGroupBy) 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 (*PermissionGroupBy) IntsX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PermissionGroupBy) Scan ¶ added in v0.1.7
func (pgb *PermissionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*PermissionGroupBy) ScanX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PermissionGroupBy) String ¶ added in v0.1.7
func (pgb *PermissionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*PermissionGroupBy) StringX ¶ added in v0.1.7
func (pgb *PermissionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PermissionMutation ¶ added in v0.1.7
type PermissionMutation struct {
// contains filtered or unexported fields
}
PermissionMutation represents an operation that mutate the Permissions nodes in the graph.
func (*PermissionMutation) Action ¶ added in v0.1.7
func (m *PermissionMutation) Action() (r string, exists bool)
Action returns the action value in the mutation.
func (*PermissionMutation) AddField ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) AddedEdges ¶ added in v0.1.7
func (m *PermissionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PermissionMutation) AddedField ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) AddedFields ¶ added in v0.1.7
func (m *PermissionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*PermissionMutation) AddedIDs ¶ added in v0.1.7
func (m *PermissionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*PermissionMutation) ClearEdge ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) ClearField ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) ClearedEdges ¶ added in v0.1.7
func (m *PermissionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PermissionMutation) ClearedFields ¶ added in v0.1.7
func (m *PermissionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PermissionMutation) Client ¶ added in v0.1.7
func (m PermissionMutation) 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 (*PermissionMutation) CreatedAt ¶ added in v0.1.7
func (m *PermissionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*PermissionMutation) EdgeCleared ¶ added in v0.1.7
func (m *PermissionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*PermissionMutation) Field ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) FieldCleared ¶ added in v0.1.7
func (m *PermissionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*PermissionMutation) Fields ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) ID ¶ added in v0.1.7
func (m *PermissionMutation) ID() (id uuid.UUID, 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 (*PermissionMutation) OldAction ¶ added in v0.1.7
func (m *PermissionMutation) OldAction(ctx context.Context) (v string, err error)
OldAction returns the old action value of the Permission. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PermissionMutation) OldCreatedAt ¶ added in v0.1.7
OldCreatedAt returns the old created_at value of the Permission. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PermissionMutation) OldField ¶ added in v0.1.7
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*PermissionMutation) OldRoleID ¶ added in v0.1.7
OldRoleID returns the old role_id value of the Permission. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PermissionMutation) OldTarget ¶ added in v0.1.7
func (m *PermissionMutation) OldTarget(ctx context.Context) (v string, err error)
OldTarget returns the old target value of the Permission. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PermissionMutation) OldUpdatedAt ¶ added in v0.1.7
OldUpdatedAt returns the old updated_at value of the Permission. If the Permission object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*PermissionMutation) Op ¶ added in v0.1.7
func (m *PermissionMutation) Op() Op
Op returns the operation name.
func (*PermissionMutation) RemovedEdges ¶ added in v0.1.7
func (m *PermissionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PermissionMutation) RemovedIDs ¶ added in v0.1.7
func (m *PermissionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*PermissionMutation) ResetAction ¶ added in v0.1.7
func (m *PermissionMutation) ResetAction()
ResetAction reset all changes of the "action" field.
func (*PermissionMutation) ResetCreatedAt ¶ added in v0.1.7
func (m *PermissionMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*PermissionMutation) ResetEdge ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) ResetField ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) ResetRoleID ¶ added in v0.1.7
func (m *PermissionMutation) ResetRoleID()
ResetRoleID reset all changes of the "role_id" field.
func (*PermissionMutation) ResetTarget ¶ added in v0.1.7
func (m *PermissionMutation) ResetTarget()
ResetTarget reset all changes of the "target" field.
func (*PermissionMutation) ResetUpdatedAt ¶ added in v0.1.7
func (m *PermissionMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*PermissionMutation) RoleID ¶ added in v0.1.7
func (m *PermissionMutation) RoleID() (r uuid.UUID, exists bool)
RoleID returns the role_id value in the mutation.
func (*PermissionMutation) SetAction ¶ added in v0.1.7
func (m *PermissionMutation) SetAction(s string)
SetAction sets the action field.
func (*PermissionMutation) SetCreatedAt ¶ added in v0.1.7
func (m *PermissionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*PermissionMutation) SetField ¶ added in v0.1.7
func (m *PermissionMutation) 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 (*PermissionMutation) SetID ¶ added in v0.1.7
func (m *PermissionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Permission creation.
func (*PermissionMutation) SetRoleID ¶ added in v0.1.7
func (m *PermissionMutation) SetRoleID(u uuid.UUID)
SetRoleID sets the role_id field.
func (*PermissionMutation) SetTarget ¶ added in v0.1.7
func (m *PermissionMutation) SetTarget(s string)
SetTarget sets the target field.
func (*PermissionMutation) SetUpdatedAt ¶ added in v0.1.7
func (m *PermissionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*PermissionMutation) Target ¶ added in v0.1.7
func (m *PermissionMutation) Target() (r string, exists bool)
Target returns the target value in the mutation.
func (PermissionMutation) Tx ¶ added in v0.1.7
func (m PermissionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PermissionMutation) Type ¶ added in v0.1.7
func (m *PermissionMutation) Type() string
Type returns the node type of this mutation (Permission).
type PermissionQuery ¶ added in v0.1.7
type PermissionQuery struct {
// contains filtered or unexported fields
}
PermissionQuery is the builder for querying Permission entities.
func (*PermissionQuery) All ¶ added in v0.1.7
func (pq *PermissionQuery) All(ctx context.Context) ([]*Permission, error)
All executes the query and returns a list of Permissions.
func (*PermissionQuery) AllX ¶ added in v0.1.7
func (pq *PermissionQuery) AllX(ctx context.Context) []*Permission
AllX is like All, but panics if an error occurs.
func (*PermissionQuery) Clone ¶ added in v0.1.7
func (pq *PermissionQuery) Clone() *PermissionQuery
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 (*PermissionQuery) Count ¶ added in v0.1.7
func (pq *PermissionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PermissionQuery) CountX ¶ added in v0.1.7
func (pq *PermissionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PermissionQuery) Exist ¶ added in v0.1.7
func (pq *PermissionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PermissionQuery) ExistX ¶ added in v0.1.7
func (pq *PermissionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PermissionQuery) First ¶ added in v0.1.7
func (pq *PermissionQuery) First(ctx context.Context) (*Permission, error)
First returns the first Permission entity in the query. Returns *NotFoundError when no permission was found.
func (*PermissionQuery) FirstID ¶ added in v0.1.7
FirstID returns the first Permission id in the query. Returns *NotFoundError when no id was found.
func (*PermissionQuery) FirstIDX ¶ added in v0.1.7
func (pq *PermissionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PermissionQuery) FirstX ¶ added in v0.1.7
func (pq *PermissionQuery) FirstX(ctx context.Context) *Permission
FirstX is like First, but panics if an error occurs.
func (*PermissionQuery) GroupBy ¶ added in v0.1.7
func (pq *PermissionQuery) GroupBy(field string, fields ...string) *PermissionGroupBy
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 {
RoleID uuid.UUID `json:"role_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.Permission.Query().
GroupBy(permission.FieldRoleID).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*PermissionQuery) IDs ¶ added in v0.1.7
IDs executes the query and returns a list of Permission ids.
func (*PermissionQuery) IDsX ¶ added in v0.1.7
func (pq *PermissionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PermissionQuery) Limit ¶ added in v0.1.7
func (pq *PermissionQuery) Limit(limit int) *PermissionQuery
Limit adds a limit step to the query.
func (*PermissionQuery) Offset ¶ added in v0.1.7
func (pq *PermissionQuery) Offset(offset int) *PermissionQuery
Offset adds an offset step to the query.
func (*PermissionQuery) Only ¶ added in v0.1.7
func (pq *PermissionQuery) Only(ctx context.Context) (*Permission, error)
Only returns the only Permission entity in the query, returns an error if not exactly one entity was returned.
func (*PermissionQuery) OnlyID ¶ added in v0.1.7
OnlyID returns the only Permission id in the query, returns an error if not exactly one id was returned.
func (*PermissionQuery) OnlyIDX ¶ added in v0.1.7
func (pq *PermissionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PermissionQuery) OnlyX ¶ added in v0.1.7
func (pq *PermissionQuery) OnlyX(ctx context.Context) *Permission
OnlyX is like Only, but panics if an error occurs.
func (*PermissionQuery) Order ¶ added in v0.1.7
func (pq *PermissionQuery) Order(o ...OrderFunc) *PermissionQuery
Order adds an order step to the query.
func (*PermissionQuery) Select ¶ added in v0.1.7
func (pq *PermissionQuery) Select(field string, fields ...string) *PermissionSelect
Select one or more fields from the given query.
Example:
var v []struct {
RoleID uuid.UUID `json:"role_id,omitempty"`
}
client.Permission.Query().
Select(permission.FieldRoleID).
Scan(ctx, &v)
func (*PermissionQuery) Where ¶ added in v0.1.7
func (pq *PermissionQuery) Where(ps ...predicate.Permission) *PermissionQuery
Where adds a new predicate for the builder.
type PermissionSelect ¶ added in v0.1.7
type PermissionSelect struct {
// contains filtered or unexported fields
}
PermissionSelect is the builder for select fields of Permission entities.
func (*PermissionSelect) Bool ¶ added in v0.1.7
func (ps *PermissionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*PermissionSelect) BoolX ¶ added in v0.1.7
func (ps *PermissionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*PermissionSelect) Bools ¶ added in v0.1.7
func (ps *PermissionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*PermissionSelect) BoolsX ¶ added in v0.1.7
func (ps *PermissionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*PermissionSelect) Float64 ¶ added in v0.1.7
func (ps *PermissionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*PermissionSelect) Float64X ¶ added in v0.1.7
func (ps *PermissionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*PermissionSelect) Float64s ¶ added in v0.1.7
func (ps *PermissionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*PermissionSelect) Float64sX ¶ added in v0.1.7
func (ps *PermissionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*PermissionSelect) Int ¶ added in v0.1.7
func (ps *PermissionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*PermissionSelect) IntX ¶ added in v0.1.7
func (ps *PermissionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*PermissionSelect) Ints ¶ added in v0.1.7
func (ps *PermissionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*PermissionSelect) IntsX ¶ added in v0.1.7
func (ps *PermissionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*PermissionSelect) Scan ¶ added in v0.1.7
func (ps *PermissionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*PermissionSelect) ScanX ¶ added in v0.1.7
func (ps *PermissionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*PermissionSelect) String ¶ added in v0.1.7
func (ps *PermissionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*PermissionSelect) StringX ¶ added in v0.1.7
func (ps *PermissionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type PermissionUpdate ¶ added in v0.1.7
type PermissionUpdate struct {
// contains filtered or unexported fields
}
PermissionUpdate is the builder for updating Permission entities.
func (*PermissionUpdate) Exec ¶ added in v0.1.7
func (pu *PermissionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PermissionUpdate) ExecX ¶ added in v0.1.7
func (pu *PermissionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PermissionUpdate) Mutation ¶ added in v0.1.7
func (pu *PermissionUpdate) Mutation() *PermissionMutation
Mutation returns the PermissionMutation object of the builder.
func (*PermissionUpdate) Save ¶ added in v0.1.7
func (pu *PermissionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PermissionUpdate) SaveX ¶ added in v0.1.7
func (pu *PermissionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PermissionUpdate) SetAction ¶ added in v0.1.7
func (pu *PermissionUpdate) SetAction(s string) *PermissionUpdate
SetAction sets the action field.
func (*PermissionUpdate) SetRoleID ¶ added in v0.1.7
func (pu *PermissionUpdate) SetRoleID(u uuid.UUID) *PermissionUpdate
SetRoleID sets the role_id field.
func (*PermissionUpdate) SetTarget ¶ added in v0.1.7
func (pu *PermissionUpdate) SetTarget(s string) *PermissionUpdate
SetTarget sets the target field.
func (*PermissionUpdate) SetUpdatedAt ¶ added in v0.1.7
func (pu *PermissionUpdate) SetUpdatedAt(t time.Time) *PermissionUpdate
SetUpdatedAt sets the updated_at field.
func (*PermissionUpdate) Where ¶ added in v0.1.7
func (pu *PermissionUpdate) Where(ps ...predicate.Permission) *PermissionUpdate
Where adds a new predicate for the builder.
type PermissionUpdateOne ¶ added in v0.1.7
type PermissionUpdateOne struct {
// contains filtered or unexported fields
}
PermissionUpdateOne is the builder for updating a single Permission entity.
func (*PermissionUpdateOne) Exec ¶ added in v0.1.7
func (puo *PermissionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PermissionUpdateOne) ExecX ¶ added in v0.1.7
func (puo *PermissionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PermissionUpdateOne) Mutation ¶ added in v0.1.7
func (puo *PermissionUpdateOne) Mutation() *PermissionMutation
Mutation returns the PermissionMutation object of the builder.
func (*PermissionUpdateOne) Save ¶ added in v0.1.7
func (puo *PermissionUpdateOne) Save(ctx context.Context) (*Permission, error)
Save executes the query and returns the updated entity.
func (*PermissionUpdateOne) SaveX ¶ added in v0.1.7
func (puo *PermissionUpdateOne) SaveX(ctx context.Context) *Permission
SaveX is like Save, but panics if an error occurs.
func (*PermissionUpdateOne) SetAction ¶ added in v0.1.7
func (puo *PermissionUpdateOne) SetAction(s string) *PermissionUpdateOne
SetAction sets the action field.
func (*PermissionUpdateOne) SetRoleID ¶ added in v0.1.7
func (puo *PermissionUpdateOne) SetRoleID(u uuid.UUID) *PermissionUpdateOne
SetRoleID sets the role_id field.
func (*PermissionUpdateOne) SetTarget ¶ added in v0.1.7
func (puo *PermissionUpdateOne) SetTarget(s string) *PermissionUpdateOne
SetTarget sets the target field.
func (*PermissionUpdateOne) SetUpdatedAt ¶ added in v0.1.7
func (puo *PermissionUpdateOne) SetUpdatedAt(t time.Time) *PermissionUpdateOne
SetUpdatedAt sets the updated_at field.
type Permissions ¶ added in v0.1.7
type Permissions []*Permission
Permissions is a parsable slice of Permission.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Session ¶
type Session struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// Data holds the value of the "data" field.
Data string `json:"data,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"`
// ExpiresAt holds the value of the "expires_at" field.
ExpiresAt *time.Time `json:"expires_at,omitempty"`
// contains filtered or unexported fields
}
Session is the model entity for the Session schema.
func (*Session) 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 (*Session) Update ¶
func (s *Session) Update() *SessionUpdateOne
Update returns a builder for updating this Session. Note that, you need to call Session.Unwrap() before calling this method, if this Session was returned from a transaction, and the transaction was committed or rolled back.
type SessionClient ¶
type SessionClient struct {
// contains filtered or unexported fields
}
SessionClient is a client for the Session schema.
func NewSessionClient ¶
func NewSessionClient(c config) *SessionClient
NewSessionClient returns a client for the Session from the given config.
func (*SessionClient) Create ¶
func (c *SessionClient) Create() *SessionCreate
Create returns a create builder for Session.
func (*SessionClient) CreateBulk ¶
func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk
CreateBulk returns a builder for creating a bulk of Session entities.
func (*SessionClient) Delete ¶
func (c *SessionClient) Delete() *SessionDelete
Delete returns a delete builder for Session.
func (*SessionClient) DeleteOne ¶
func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SessionClient) DeleteOneID ¶
func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SessionClient) GetX ¶
func (c *SessionClient) GetX(ctx context.Context, id string) *Session
GetX is like Get, but panics if an error occurs.
func (*SessionClient) Hooks ¶
func (c *SessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SessionClient) Query ¶
func (c *SessionClient) Query() *SessionQuery
Query returns a query builder for Session.
func (*SessionClient) Update ¶
func (c *SessionClient) Update() *SessionUpdate
Update returns an update builder for Session.
func (*SessionClient) UpdateOne ¶
func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SessionClient) UpdateOneID ¶
func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SessionClient) Use ¶
func (c *SessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.
type SessionCreate ¶
type SessionCreate struct {
// contains filtered or unexported fields
}
SessionCreate is the builder for creating a Session entity.
func (*SessionCreate) Mutation ¶
func (sc *SessionCreate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionCreate) Save ¶
func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)
Save creates the Session in the database.
func (*SessionCreate) SaveX ¶
func (sc *SessionCreate) SaveX(ctx context.Context) *Session
SaveX calls Save and panics if Save returns an error.
func (*SessionCreate) SetCreatedAt ¶
func (sc *SessionCreate) SetCreatedAt(t time.Time) *SessionCreate
SetCreatedAt sets the created_at field.
func (*SessionCreate) SetData ¶
func (sc *SessionCreate) SetData(s string) *SessionCreate
SetData sets the data field.
func (*SessionCreate) SetExpiresAt ¶
func (sc *SessionCreate) SetExpiresAt(t time.Time) *SessionCreate
SetExpiresAt sets the expires_at field.
func (*SessionCreate) SetID ¶
func (sc *SessionCreate) SetID(s string) *SessionCreate
SetID sets the id field.
func (*SessionCreate) SetNillableCreatedAt ¶
func (sc *SessionCreate) SetNillableCreatedAt(t *time.Time) *SessionCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*SessionCreate) SetNillableExpiresAt ¶
func (sc *SessionCreate) SetNillableExpiresAt(t *time.Time) *SessionCreate
SetNillableExpiresAt sets the expires_at field if the given value is not nil.
func (*SessionCreate) SetNillableUpdatedAt ¶
func (sc *SessionCreate) SetNillableUpdatedAt(t *time.Time) *SessionCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*SessionCreate) SetUpdatedAt ¶
func (sc *SessionCreate) SetUpdatedAt(t time.Time) *SessionCreate
SetUpdatedAt sets the updated_at field.
type SessionCreateBulk ¶
type SessionCreateBulk struct {
// contains filtered or unexported fields
}
SessionCreateBulk is the builder for creating a bulk of Session entities.
type SessionDelete ¶
type SessionDelete struct {
// contains filtered or unexported fields
}
SessionDelete is the builder for deleting a Session entity.
func (*SessionDelete) Exec ¶
func (sd *SessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SessionDelete) ExecX ¶
func (sd *SessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SessionDelete) Where ¶
func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete
Where adds a new predicate to the delete builder.
type SessionDeleteOne ¶
type SessionDeleteOne struct {
// contains filtered or unexported fields
}
SessionDeleteOne is the builder for deleting a single Session entity.
func (*SessionDeleteOne) Exec ¶
func (sdo *SessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SessionDeleteOne) ExecX ¶
func (sdo *SessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SessionGroupBy ¶
type SessionGroupBy struct {
// contains filtered or unexported fields
}
SessionGroupBy is the builder for group-by Session entities.
func (*SessionGroupBy) Aggregate ¶
func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SessionGroupBy) Bool ¶
func (sgb *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) BoolX ¶
func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionGroupBy) Bools ¶
func (sgb *SessionGroupBy) 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 (*SessionGroupBy) BoolsX ¶
func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionGroupBy) Float64 ¶
func (sgb *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) Float64X ¶
func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionGroupBy) Float64s ¶
func (sgb *SessionGroupBy) 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 (*SessionGroupBy) Float64sX ¶
func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionGroupBy) Int ¶
func (sgb *SessionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) IntX ¶
func (sgb *SessionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionGroupBy) Ints ¶
func (sgb *SessionGroupBy) 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 (*SessionGroupBy) IntsX ¶
func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionGroupBy) Scan ¶
func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*SessionGroupBy) ScanX ¶
func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionGroupBy) String ¶
func (sgb *SessionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*SessionGroupBy) StringX ¶
func (sgb *SessionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionMutation ¶
type SessionMutation struct {
// contains filtered or unexported fields
}
SessionMutation represents an operation that mutate the Sessions nodes in the graph.
func (*SessionMutation) AddField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddedEdges ¶
func (m *SessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SessionMutation) AddedField ¶
func (m *SessionMutation) 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 (*SessionMutation) AddedFields ¶
func (m *SessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*SessionMutation) AddedIDs ¶
func (m *SessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*SessionMutation) ClearEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearExpiresAt ¶
func (m *SessionMutation) ClearExpiresAt()
ClearExpiresAt clears the value of expires_at.
func (*SessionMutation) ClearField ¶
func (m *SessionMutation) 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 (*SessionMutation) ClearedEdges ¶
func (m *SessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SessionMutation) ClearedFields ¶
func (m *SessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SessionMutation) Client ¶
func (m SessionMutation) 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 (*SessionMutation) CreatedAt ¶
func (m *SessionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*SessionMutation) Data ¶
func (m *SessionMutation) Data() (r string, exists bool)
Data returns the data value in the mutation.
func (*SessionMutation) EdgeCleared ¶
func (m *SessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*SessionMutation) ExpiresAt ¶
func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)
ExpiresAt returns the expires_at value in the mutation.
func (*SessionMutation) ExpiresAtCleared ¶
func (m *SessionMutation) ExpiresAtCleared() bool
ExpiresAtCleared returns if the field expires_at was cleared in this mutation.
func (*SessionMutation) Field ¶
func (m *SessionMutation) 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 (*SessionMutation) FieldCleared ¶
func (m *SessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*SessionMutation) Fields ¶
func (m *SessionMutation) 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 (*SessionMutation) ID ¶
func (m *SessionMutation) ID() (id string, 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 (*SessionMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldData ¶
func (m *SessionMutation) OldData(ctx context.Context) (v string, err error)
OldData returns the old data value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldExpiresAt ¶
OldExpiresAt returns the old expires_at value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*SessionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the Session. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*SessionMutation) RemovedEdges ¶
func (m *SessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SessionMutation) RemovedIDs ¶
func (m *SessionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*SessionMutation) ResetCreatedAt ¶
func (m *SessionMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*SessionMutation) ResetData ¶
func (m *SessionMutation) ResetData()
ResetData reset all changes of the "data" field.
func (*SessionMutation) ResetEdge ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetExpiresAt ¶
func (m *SessionMutation) ResetExpiresAt()
ResetExpiresAt reset all changes of the "expires_at" field.
func (*SessionMutation) ResetField ¶
func (m *SessionMutation) 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 (*SessionMutation) ResetUpdatedAt ¶
func (m *SessionMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*SessionMutation) SetCreatedAt ¶
func (m *SessionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*SessionMutation) SetData ¶
func (m *SessionMutation) SetData(s string)
SetData sets the data field.
func (*SessionMutation) SetExpiresAt ¶
func (m *SessionMutation) SetExpiresAt(t time.Time)
SetExpiresAt sets the expires_at field.
func (*SessionMutation) SetField ¶
func (m *SessionMutation) 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 (*SessionMutation) SetID ¶
func (m *SessionMutation) SetID(id string)
SetID sets the value of the id field. Note that, this operation is accepted only on Session creation.
func (*SessionMutation) SetUpdatedAt ¶
func (m *SessionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (SessionMutation) Tx ¶
func (m SessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SessionMutation) Type ¶
func (m *SessionMutation) Type() string
Type returns the node type of this mutation (Session).
type SessionQuery ¶
type SessionQuery struct {
// contains filtered or unexported fields
}
SessionQuery is the builder for querying Session entities.
func (*SessionQuery) All ¶
func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)
All executes the query and returns a list of Sessions.
func (*SessionQuery) AllX ¶
func (sq *SessionQuery) AllX(ctx context.Context) []*Session
AllX is like All, but panics if an error occurs.
func (*SessionQuery) Clone ¶
func (sq *SessionQuery) Clone() *SessionQuery
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 (*SessionQuery) Count ¶
func (sq *SessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SessionQuery) CountX ¶
func (sq *SessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SessionQuery) Exist ¶
func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SessionQuery) ExistX ¶
func (sq *SessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SessionQuery) First ¶
func (sq *SessionQuery) First(ctx context.Context) (*Session, error)
First returns the first Session entity in the query. Returns *NotFoundError when no session was found.
func (*SessionQuery) FirstID ¶
func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Session id in the query. Returns *NotFoundError when no id was found.
func (*SessionQuery) FirstIDX ¶
func (sq *SessionQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SessionQuery) FirstX ¶
func (sq *SessionQuery) FirstX(ctx context.Context) *Session
FirstX is like First, but panics if an error occurs.
func (*SessionQuery) GroupBy ¶
func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy
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 {
Data string `json:"data,omitempty"`
Count int `json:"count,omitempty"`
}
client.Session.Query().
GroupBy(session.FieldData).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*SessionQuery) IDs ¶
func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Session ids.
func (*SessionQuery) IDsX ¶
func (sq *SessionQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SessionQuery) Limit ¶
func (sq *SessionQuery) Limit(limit int) *SessionQuery
Limit adds a limit step to the query.
func (*SessionQuery) Offset ¶
func (sq *SessionQuery) Offset(offset int) *SessionQuery
Offset adds an offset step to the query.
func (*SessionQuery) Only ¶
func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)
Only returns the only Session entity in the query, returns an error if not exactly one entity was returned.
func (*SessionQuery) OnlyID ¶
func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID returns the only Session id in the query, returns an error if not exactly one id was returned.
func (*SessionQuery) OnlyIDX ¶
func (sq *SessionQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SessionQuery) OnlyX ¶
func (sq *SessionQuery) OnlyX(ctx context.Context) *Session
OnlyX is like Only, but panics if an error occurs.
func (*SessionQuery) Order ¶
func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery
Order adds an order step to the query.
func (*SessionQuery) Select ¶
func (sq *SessionQuery) Select(field string, fields ...string) *SessionSelect
Select one or more fields from the given query.
Example:
var v []struct {
Data string `json:"data,omitempty"`
}
client.Session.Query().
Select(session.FieldData).
Scan(ctx, &v)
func (*SessionQuery) Where ¶
func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery
Where adds a new predicate for the builder.
type SessionSelect ¶
type SessionSelect struct {
// contains filtered or unexported fields
}
SessionSelect is the builder for select fields of Session entities.
func (*SessionSelect) Bool ¶
func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolX ¶
func (ss *SessionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SessionSelect) Bools ¶
func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*SessionSelect) BoolsX ¶
func (ss *SessionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SessionSelect) Float64 ¶
func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64X ¶
func (ss *SessionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SessionSelect) Float64s ¶
func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*SessionSelect) Float64sX ¶
func (ss *SessionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SessionSelect) Int ¶
func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*SessionSelect) IntX ¶
func (ss *SessionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SessionSelect) Ints ¶
func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*SessionSelect) IntsX ¶
func (ss *SessionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SessionSelect) Scan ¶
func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*SessionSelect) ScanX ¶
func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SessionSelect) String ¶
func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*SessionSelect) StringX ¶
func (ss *SessionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SessionUpdate ¶
type SessionUpdate struct {
// contains filtered or unexported fields
}
SessionUpdate is the builder for updating Session entities.
func (*SessionUpdate) ClearExpiresAt ¶
func (su *SessionUpdate) ClearExpiresAt() *SessionUpdate
ClearExpiresAt clears the value of expires_at.
func (*SessionUpdate) Exec ¶
func (su *SessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SessionUpdate) ExecX ¶
func (su *SessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdate) Mutation ¶
func (su *SessionUpdate) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdate) Save ¶
func (su *SessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SessionUpdate) SaveX ¶
func (su *SessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdate) SetData ¶
func (su *SessionUpdate) SetData(s string) *SessionUpdate
SetData sets the data field.
func (*SessionUpdate) SetExpiresAt ¶
func (su *SessionUpdate) SetExpiresAt(t time.Time) *SessionUpdate
SetExpiresAt sets the expires_at field.
func (*SessionUpdate) SetNillableExpiresAt ¶
func (su *SessionUpdate) SetNillableExpiresAt(t *time.Time) *SessionUpdate
SetNillableExpiresAt sets the expires_at field if the given value is not nil.
func (*SessionUpdate) SetUpdatedAt ¶
func (su *SessionUpdate) SetUpdatedAt(t time.Time) *SessionUpdate
SetUpdatedAt sets the updated_at field.
func (*SessionUpdate) Where ¶
func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate
Where adds a new predicate for the builder.
type SessionUpdateOne ¶
type SessionUpdateOne struct {
// contains filtered or unexported fields
}
SessionUpdateOne is the builder for updating a single Session entity.
func (*SessionUpdateOne) ClearExpiresAt ¶
func (suo *SessionUpdateOne) ClearExpiresAt() *SessionUpdateOne
ClearExpiresAt clears the value of expires_at.
func (*SessionUpdateOne) Exec ¶
func (suo *SessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SessionUpdateOne) ExecX ¶
func (suo *SessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SessionUpdateOne) Mutation ¶
func (suo *SessionUpdateOne) Mutation() *SessionMutation
Mutation returns the SessionMutation object of the builder.
func (*SessionUpdateOne) Save ¶
func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)
Save executes the query and returns the updated entity.
func (*SessionUpdateOne) SaveX ¶
func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session
SaveX is like Save, but panics if an error occurs.
func (*SessionUpdateOne) SetData ¶
func (suo *SessionUpdateOne) SetData(s string) *SessionUpdateOne
SetData sets the data field.
func (*SessionUpdateOne) SetExpiresAt ¶
func (suo *SessionUpdateOne) SetExpiresAt(t time.Time) *SessionUpdateOne
SetExpiresAt sets the expires_at field.
func (*SessionUpdateOne) SetNillableExpiresAt ¶
func (suo *SessionUpdateOne) SetNillableExpiresAt(t *time.Time) *SessionUpdateOne
SetNillableExpiresAt sets the expires_at field if the given value is not nil.
func (*SessionUpdateOne) SetUpdatedAt ¶
func (suo *SessionUpdateOne) SetUpdatedAt(t time.Time) *SessionUpdateOne
SetUpdatedAt sets the updated_at field.
type Tx ¶
type Tx struct {
// Group is the client for interacting with the Group builders.
Group *GroupClient
// GroupRole is the client for interacting with the GroupRole builders.
GroupRole *GroupRoleClient
// Permission is the client for interacting with the Permission builders.
Permission *PermissionClient
// Session is the client for interacting with the Session builders.
Session *SessionClient
// User is the client for interacting with the User builders.
User *UserClient
// UserRole is the client for interacting with the UserRole builders.
UserRole *UserRoleClient
// Workspace is the client for interacting with the Workspace builders.
Workspace *WorkspaceClient
// WorkspaceRole is the client for interacting with the WorkspaceRole builders.
WorkspaceRole *WorkspaceRoleClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns the Tx stored in a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// BillingID holds the value of the "billing_id" field.
BillingID string `json:"billing_id,omitempty"`
// Provider holds the value of the "provider" field.
Provider string `json:"provider,omitempty"`
// Email holds the value of the "email" field.
Email string `json:"email,omitempty"`
// Password holds the value of the "password" field.
Password string `json:"-"`
// APIKey holds the value of the "api_key" field.
APIKey string `json:"-"`
// Confirmed holds the value of the "confirmed" field.
Confirmed bool `json:"confirmed,omitempty"`
// ConfirmationSentAt holds the value of the "confirmation_sent_at" field.
ConfirmationSentAt *time.Time `json:"confirmation_sent_at,omitempty"`
// ConfirmationToken holds the value of the "confirmation_token" field.
ConfirmationToken *string `json:"confirmation_token,omitempty"`
// RecoverySentAt holds the value of the "recovery_sent_at" field.
RecoverySentAt *time.Time `json:"recovery_sent_at,omitempty"`
// RecoveryToken holds the value of the "recovery_token" field.
RecoveryToken *string `json:"recovery_token,omitempty"`
// OtpSentAt holds the value of the "otp_sent_at" field.
OtpSentAt *time.Time `json:"otp_sent_at,omitempty"`
// Otp holds the value of the "otp" field.
Otp *string `json:"otp,omitempty"`
// EmailChange holds the value of the "email_change" field.
EmailChange string `json:"email_change,omitempty"`
// EmailChangeSentAt holds the value of the "email_change_sent_at" field.
EmailChangeSentAt *time.Time `json:"email_change_sent_at,omitempty"`
// EmailChangeToken holds the value of the "email_change_token" field.
EmailChangeToken *string `json:"email_change_token,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,omitempty"`
// Roles holds the value of the "roles" field.
Roles []string `json:"roles,omitempty"`
// Teams holds the value of the "teams" field.
Teams map[string]string `json:"teams,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"`
// LastSigninAt holds the value of the "last_signin_at" field.
LastSigninAt *time.Time `json:"last_signin_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) QueryGroupRoles ¶ added in v0.1.7
func (u *User) QueryGroupRoles() *GroupRoleQuery
QueryGroupRoles queries the group_roles edge of the User.
func (*User) QueryUserRoles ¶ added in v0.1.7
func (u *User) QueryUserRoles() *UserRoleQuery
QueryUserRoles queries the user_roles edge of the User.
func (*User) QueryWorkspace ¶ added in v0.1.7
func (u *User) QueryWorkspace() *WorkspaceQuery
QueryWorkspace queries the workspace edge of the User.
func (*User) QueryWorkspaceRoles ¶ added in v0.1.7
func (u *User) QueryWorkspaceRoles() *WorkspaceRoleQuery
QueryWorkspaceRoles queries the workspace_roles 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) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryGroupRoles ¶ added in v0.1.7
func (c *UserClient) QueryGroupRoles(u *User) *GroupRoleQuery
QueryGroupRoles queries the group_roles edge of a User.
func (*UserClient) QueryUserRoles ¶ added in v0.1.7
func (c *UserClient) QueryUserRoles(u *User) *UserRoleQuery
QueryUserRoles queries the user_roles edge of a User.
func (*UserClient) QueryWorkspace ¶ added in v0.1.7
func (c *UserClient) QueryWorkspace(u *User) *WorkspaceQuery
QueryWorkspace queries the workspace edge of a User.
func (*UserClient) QueryWorkspaceRoles ¶ added in v0.1.7
func (c *UserClient) QueryWorkspaceRoles(u *User) *WorkspaceRoleQuery
QueryWorkspaceRoles queries the workspace_roles 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 uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddGroupRoleIDs ¶ added in v0.1.7
func (uc *UserCreate) AddGroupRoleIDs(ids ...uuid.UUID) *UserCreate
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*UserCreate) AddGroupRoles ¶ added in v0.1.7
func (uc *UserCreate) AddGroupRoles(g ...*GroupRole) *UserCreate
AddGroupRoles adds the group_roles edges to GroupRole.
func (*UserCreate) AddUserRoleIDs ¶ added in v0.1.7
func (uc *UserCreate) AddUserRoleIDs(ids ...uuid.UUID) *UserCreate
AddUserRoleIDs adds the user_roles edge to UserRole by ids.
func (*UserCreate) AddUserRoles ¶ added in v0.1.7
func (uc *UserCreate) AddUserRoles(u ...*UserRole) *UserCreate
AddUserRoles adds the user_roles edges to UserRole.
func (*UserCreate) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (uc *UserCreate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *UserCreate
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*UserCreate) AddWorkspaceRoles ¶ added in v0.1.7
func (uc *UserCreate) AddWorkspaceRoles(w ...*WorkspaceRole) *UserCreate
AddWorkspaceRoles adds the workspace_roles edges to WorkspaceRole.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAPIKey ¶
func (uc *UserCreate) SetAPIKey(s string) *UserCreate
SetAPIKey sets the api_key field.
func (*UserCreate) SetBillingID ¶ added in v0.1.2
func (uc *UserCreate) SetBillingID(s string) *UserCreate
SetBillingID sets the billing_id field.
func (*UserCreate) SetConfirmationSentAt ¶
func (uc *UserCreate) SetConfirmationSentAt(t time.Time) *UserCreate
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserCreate) SetConfirmationToken ¶
func (uc *UserCreate) SetConfirmationToken(s string) *UserCreate
SetConfirmationToken sets the confirmation_token field.
func (*UserCreate) SetConfirmed ¶
func (uc *UserCreate) SetConfirmed(b bool) *UserCreate
SetConfirmed sets the confirmed field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the created_at field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the email field.
func (*UserCreate) SetEmailChange ¶
func (uc *UserCreate) SetEmailChange(s string) *UserCreate
SetEmailChange sets the email_change field.
func (*UserCreate) SetEmailChangeSentAt ¶
func (uc *UserCreate) SetEmailChangeSentAt(t time.Time) *UserCreate
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserCreate) SetEmailChangeToken ¶
func (uc *UserCreate) SetEmailChangeToken(s string) *UserCreate
SetEmailChangeToken sets the email_change_token field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the id field.
func (*UserCreate) SetLastSigninAt ¶
func (uc *UserCreate) SetLastSigninAt(t time.Time) *UserCreate
SetLastSigninAt sets the last_signin_at field.
func (*UserCreate) SetMetadata ¶
func (uc *UserCreate) SetMetadata(m map[string]interface{}) *UserCreate
SetMetadata sets the metadata field.
func (*UserCreate) SetNillableAPIKey ¶
func (uc *UserCreate) SetNillableAPIKey(s *string) *UserCreate
SetNillableAPIKey sets the api_key field if the given value is not nil.
func (*UserCreate) SetNillableBillingID ¶ added in v0.1.2
func (uc *UserCreate) SetNillableBillingID(s *string) *UserCreate
SetNillableBillingID sets the billing_id field if the given value is not nil.
func (*UserCreate) SetNillableConfirmationSentAt ¶
func (uc *UserCreate) SetNillableConfirmationSentAt(t *time.Time) *UserCreate
SetNillableConfirmationSentAt sets the confirmation_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableConfirmationToken ¶
func (uc *UserCreate) SetNillableConfirmationToken(s *string) *UserCreate
SetNillableConfirmationToken sets the confirmation_token field if the given value is not nil.
func (*UserCreate) SetNillableConfirmed ¶
func (uc *UserCreate) SetNillableConfirmed(b *bool) *UserCreate
SetNillableConfirmed sets the confirmed field if the given value is not nil.
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) SetNillableEmailChange ¶
func (uc *UserCreate) SetNillableEmailChange(s *string) *UserCreate
SetNillableEmailChange sets the email_change field if the given value is not nil.
func (*UserCreate) SetNillableEmailChangeSentAt ¶
func (uc *UserCreate) SetNillableEmailChangeSentAt(t *time.Time) *UserCreate
SetNillableEmailChangeSentAt sets the email_change_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableEmailChangeToken ¶
func (uc *UserCreate) SetNillableEmailChangeToken(s *string) *UserCreate
SetNillableEmailChangeToken sets the email_change_token field if the given value is not nil.
func (*UserCreate) SetNillableLastSigninAt ¶
func (uc *UserCreate) SetNillableLastSigninAt(t *time.Time) *UserCreate
SetNillableLastSigninAt sets the last_signin_at field if the given value is not nil.
func (*UserCreate) SetNillableOtp ¶
func (uc *UserCreate) SetNillableOtp(s *string) *UserCreate
SetNillableOtp sets the otp field if the given value is not nil.
func (*UserCreate) SetNillableOtpSentAt ¶
func (uc *UserCreate) SetNillableOtpSentAt(t *time.Time) *UserCreate
SetNillableOtpSentAt sets the otp_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableRecoverySentAt ¶
func (uc *UserCreate) SetNillableRecoverySentAt(t *time.Time) *UserCreate
SetNillableRecoverySentAt sets the recovery_sent_at field if the given value is not nil.
func (*UserCreate) SetNillableRecoveryToken ¶
func (uc *UserCreate) SetNillableRecoveryToken(s *string) *UserCreate
SetNillableRecoveryToken sets the recovery_token field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*UserCreate) SetNillableWorkspaceID ¶ added in v0.1.7
func (uc *UserCreate) SetNillableWorkspaceID(id *uuid.UUID) *UserCreate
SetNillableWorkspaceID sets the workspace edge to Workspace by id if the given value is not nil.
func (*UserCreate) SetOtp ¶
func (uc *UserCreate) SetOtp(s string) *UserCreate
SetOtp sets the otp field.
func (*UserCreate) SetOtpSentAt ¶
func (uc *UserCreate) SetOtpSentAt(t time.Time) *UserCreate
SetOtpSentAt sets the otp_sent_at field.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the password field.
func (*UserCreate) SetProvider ¶
func (uc *UserCreate) SetProvider(s string) *UserCreate
SetProvider sets the provider field.
func (*UserCreate) SetRecoverySentAt ¶
func (uc *UserCreate) SetRecoverySentAt(t time.Time) *UserCreate
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserCreate) SetRecoveryToken ¶
func (uc *UserCreate) SetRecoveryToken(s string) *UserCreate
SetRecoveryToken sets the recovery_token field.
func (*UserCreate) SetRoles ¶ added in v0.1.5
func (uc *UserCreate) SetRoles(s []string) *UserCreate
SetRoles sets the roles field.
func (*UserCreate) SetTeams ¶ added in v0.1.7
func (uc *UserCreate) SetTeams(m map[string]string) *UserCreate
SetTeams sets the teams field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the updated_at field.
func (*UserCreate) SetWorkspace ¶ added in v0.1.7
func (uc *UserCreate) SetWorkspace(w *Workspace) *UserCreate
SetWorkspace sets the workspace edge to Workspace.
func (*UserCreate) SetWorkspaceID ¶ added in v0.1.7
func (uc *UserCreate) SetWorkspaceID(id uuid.UUID) *UserCreate
SetWorkspaceID sets the workspace edge to Workspace by id.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating a bulk of User entities.
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 ¶ added in v0.1.7
type UserEdges struct {
// Workspace holds the value of the workspace edge.
Workspace *Workspace
// WorkspaceRoles holds the value of the workspace_roles edge.
WorkspaceRoles []*WorkspaceRole
// GroupRoles holds the value of the group_roles edge.
GroupRoles []*GroupRole
// UserRoles holds the value of the user_roles edge.
UserRoles []*UserRole
// contains filtered or unexported fields
}
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) GroupRolesOrErr ¶ added in v0.1.7
GroupRolesOrErr returns the GroupRoles value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserRolesOrErr ¶ added in v0.1.7
UserRolesOrErr returns the UserRoles value or an error if the edge was not loaded in eager-loading.
func (UserEdges) WorkspaceOrErr ¶ added in v0.1.7
WorkspaceOrErr returns the Workspace value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) WorkspaceRolesOrErr ¶ added in v0.1.7
func (e UserEdges) WorkspaceRolesOrErr() ([]*WorkspaceRole, error)
WorkspaceRolesOrErr returns the WorkspaceRoles value or an error if the edge was not loaded in eager-loading.
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 ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
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) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, 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) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, 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.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutate the Users nodes in the graph.
func (*UserMutation) APIKey ¶
func (m *UserMutation) APIKey() (r string, exists bool)
APIKey returns the api_key value in the mutation.
func (*UserMutation) APIKeyCleared ¶
func (m *UserMutation) APIKeyCleared() bool
APIKeyCleared returns if the field api_key was cleared in this mutation.
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) AddGroupRoleIDs ¶ added in v0.1.7
func (m *UserMutation) AddGroupRoleIDs(ids ...uuid.UUID)
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*UserMutation) AddUserRoleIDs ¶ added in v0.1.7
func (m *UserMutation) AddUserRoleIDs(ids ...uuid.UUID)
AddUserRoleIDs adds the user_roles edge to UserRole by ids.
func (*UserMutation) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (m *UserMutation) AddWorkspaceRoleIDs(ids ...uuid.UUID)
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
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) BillingID ¶ added in v0.1.2
func (m *UserMutation) BillingID() (r string, exists bool)
BillingID returns the billing_id value in the mutation.
func (*UserMutation) BillingIDCleared ¶ added in v0.1.2
func (m *UserMutation) BillingIDCleared() bool
BillingIDCleared returns if the field billing_id was cleared in this mutation.
func (*UserMutation) ClearAPIKey ¶
func (m *UserMutation) ClearAPIKey()
ClearAPIKey clears the value of api_key.
func (*UserMutation) ClearBillingID ¶ added in v0.1.2
func (m *UserMutation) ClearBillingID()
ClearBillingID clears the value of billing_id.
func (*UserMutation) ClearConfirmationSentAt ¶
func (m *UserMutation) ClearConfirmationSentAt()
ClearConfirmationSentAt clears the value of confirmation_sent_at.
func (*UserMutation) ClearConfirmationToken ¶
func (m *UserMutation) ClearConfirmationToken()
ClearConfirmationToken clears the value of confirmation_token.
func (*UserMutation) ClearConfirmed ¶
func (m *UserMutation) ClearConfirmed()
ClearConfirmed clears the value of confirmed.
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) ClearEmailChange ¶
func (m *UserMutation) ClearEmailChange()
ClearEmailChange clears the value of email_change.
func (*UserMutation) ClearEmailChangeSentAt ¶
func (m *UserMutation) ClearEmailChangeSentAt()
ClearEmailChangeSentAt clears the value of email_change_sent_at.
func (*UserMutation) ClearEmailChangeToken ¶
func (m *UserMutation) ClearEmailChangeToken()
ClearEmailChangeToken clears the value of email_change_token.
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) ClearGroupRoles ¶ added in v0.1.7
func (m *UserMutation) ClearGroupRoles()
ClearGroupRoles clears the group_roles edge to GroupRole.
func (*UserMutation) ClearLastSigninAt ¶
func (m *UserMutation) ClearLastSigninAt()
ClearLastSigninAt clears the value of last_signin_at.
func (*UserMutation) ClearOtpSentAt ¶
func (m *UserMutation) ClearOtpSentAt()
ClearOtpSentAt clears the value of otp_sent_at.
func (*UserMutation) ClearRecoverySentAt ¶
func (m *UserMutation) ClearRecoverySentAt()
ClearRecoverySentAt clears the value of recovery_sent_at.
func (*UserMutation) ClearRecoveryToken ¶
func (m *UserMutation) ClearRecoveryToken()
ClearRecoveryToken clears the value of recovery_token.
func (*UserMutation) ClearRoles ¶ added in v0.1.5
func (m *UserMutation) ClearRoles()
ClearRoles clears the value of roles.
func (*UserMutation) ClearTeams ¶ added in v0.1.7
func (m *UserMutation) ClearTeams()
ClearTeams clears the value of teams.
func (*UserMutation) ClearUserRoles ¶ added in v0.1.7
func (m *UserMutation) ClearUserRoles()
ClearUserRoles clears the user_roles edge to UserRole.
func (*UserMutation) ClearWorkspace ¶ added in v0.1.7
func (m *UserMutation) ClearWorkspace()
ClearWorkspace clears the workspace edge to Workspace.
func (*UserMutation) ClearWorkspaceRoles ¶ added in v0.1.7
func (m *UserMutation) ClearWorkspaceRoles()
ClearWorkspaceRoles clears the workspace_roles edge to WorkspaceRole.
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) ConfirmationSentAt ¶
func (m *UserMutation) ConfirmationSentAt() (r time.Time, exists bool)
ConfirmationSentAt returns the confirmation_sent_at value in the mutation.
func (*UserMutation) ConfirmationSentAtCleared ¶
func (m *UserMutation) ConfirmationSentAtCleared() bool
ConfirmationSentAtCleared returns if the field confirmation_sent_at was cleared in this mutation.
func (*UserMutation) ConfirmationToken ¶
func (m *UserMutation) ConfirmationToken() (r string, exists bool)
ConfirmationToken returns the confirmation_token value in the mutation.
func (*UserMutation) ConfirmationTokenCleared ¶
func (m *UserMutation) ConfirmationTokenCleared() bool
ConfirmationTokenCleared returns if the field confirmation_token was cleared in this mutation.
func (*UserMutation) Confirmed ¶
func (m *UserMutation) Confirmed() (r bool, exists bool)
Confirmed returns the confirmed value in the mutation.
func (*UserMutation) ConfirmedCleared ¶
func (m *UserMutation) ConfirmedCleared() bool
ConfirmedCleared returns if the field confirmed was cleared in this mutation.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
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) EmailChange ¶
func (m *UserMutation) EmailChange() (r string, exists bool)
EmailChange returns the email_change value in the mutation.
func (*UserMutation) EmailChangeCleared ¶
func (m *UserMutation) EmailChangeCleared() bool
EmailChangeCleared returns if the field email_change was cleared in this mutation.
func (*UserMutation) EmailChangeSentAt ¶
func (m *UserMutation) EmailChangeSentAt() (r time.Time, exists bool)
EmailChangeSentAt returns the email_change_sent_at value in the mutation.
func (*UserMutation) EmailChangeSentAtCleared ¶
func (m *UserMutation) EmailChangeSentAtCleared() bool
EmailChangeSentAtCleared returns if the field email_change_sent_at was cleared in this mutation.
func (*UserMutation) EmailChangeToken ¶
func (m *UserMutation) EmailChangeToken() (r string, exists bool)
EmailChangeToken returns the email_change_token value in the mutation.
func (*UserMutation) EmailChangeTokenCleared ¶
func (m *UserMutation) EmailChangeTokenCleared() bool
EmailChangeTokenCleared returns if the field email_change_token was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean 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) GroupRolesCleared ¶ added in v0.1.7
func (m *UserMutation) GroupRolesCleared() bool
GroupRolesCleared returns if the edge group_roles was cleared.
func (*UserMutation) GroupRolesIDs ¶ added in v0.1.7
func (m *UserMutation) GroupRolesIDs() (ids []uuid.UUID)
GroupRolesIDs returns the group_roles ids in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the id value in the mutation. Note that, the id is available only if it was provided to the builder.
func (*UserMutation) LastSigninAt ¶
func (m *UserMutation) LastSigninAt() (r time.Time, exists bool)
LastSigninAt returns the last_signin_at value in the mutation.
func (*UserMutation) LastSigninAtCleared ¶
func (m *UserMutation) LastSigninAtCleared() bool
LastSigninAtCleared returns if the field last_signin_at was cleared in this mutation.
func (*UserMutation) Metadata ¶
func (m *UserMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*UserMutation) OldAPIKey ¶
func (m *UserMutation) OldAPIKey(ctx context.Context) (v string, err error)
OldAPIKey returns the old api_key value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldBillingID ¶ added in v0.1.2
func (m *UserMutation) OldBillingID(ctx context.Context) (v string, err error)
OldBillingID returns the old billing_id value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldConfirmationSentAt ¶
OldConfirmationSentAt returns the old confirmation_sent_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldConfirmationToken ¶
func (m *UserMutation) OldConfirmationToken(ctx context.Context) (v *string, err error)
OldConfirmationToken returns the old confirmation_token value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldConfirmed ¶
func (m *UserMutation) OldConfirmed(ctx context.Context) (v bool, err error)
OldConfirmed returns the old confirmed value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old created_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old email value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldEmailChange ¶
func (m *UserMutation) OldEmailChange(ctx context.Context) (v string, err error)
OldEmailChange returns the old email_change value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldEmailChangeSentAt ¶
OldEmailChangeSentAt returns the old email_change_sent_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldEmailChangeToken ¶
func (m *UserMutation) OldEmailChangeToken(ctx context.Context) (v *string, err error)
OldEmailChangeToken returns the old email_change_token value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*UserMutation) OldLastSigninAt ¶
OldLastSigninAt returns the old last_signin_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldMetadata ¶
func (m *UserMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldOtp ¶
func (m *UserMutation) OldOtp(ctx context.Context) (v *string, err error)
OldOtp returns the old otp value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldOtpSentAt ¶
OldOtpSentAt returns the old otp_sent_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old password value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldProvider ¶
func (m *UserMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old provider value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldRecoverySentAt ¶
OldRecoverySentAt returns the old recovery_sent_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldRecoveryToken ¶
func (m *UserMutation) OldRecoveryToken(ctx context.Context) (v *string, err error)
OldRecoveryToken returns the old recovery_token value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldRoles ¶ added in v0.1.5
func (m *UserMutation) OldRoles(ctx context.Context) (v []string, err error)
OldRoles returns the old roles value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldTeams ¶ added in v0.1.7
OldTeams returns the old teams value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old updated_at value of the User. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserMutation) Otp ¶
func (m *UserMutation) Otp() (r string, exists bool)
Otp returns the otp value in the mutation.
func (*UserMutation) OtpCleared ¶
func (m *UserMutation) OtpCleared() bool
OtpCleared returns if the field otp was cleared in this mutation.
func (*UserMutation) OtpSentAt ¶
func (m *UserMutation) OtpSentAt() (r time.Time, exists bool)
OtpSentAt returns the otp_sent_at value in the mutation.
func (*UserMutation) OtpSentAtCleared ¶
func (m *UserMutation) OtpSentAtCleared() bool
OtpSentAtCleared returns if the field otp_sent_at was cleared in this mutation.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the password value in the mutation.
func (*UserMutation) Provider ¶
func (m *UserMutation) Provider() (r string, exists bool)
Provider returns the provider value in the mutation.
func (*UserMutation) RecoverySentAt ¶
func (m *UserMutation) RecoverySentAt() (r time.Time, exists bool)
RecoverySentAt returns the recovery_sent_at value in the mutation.
func (*UserMutation) RecoverySentAtCleared ¶
func (m *UserMutation) RecoverySentAtCleared() bool
RecoverySentAtCleared returns if the field recovery_sent_at was cleared in this mutation.
func (*UserMutation) RecoveryToken ¶
func (m *UserMutation) RecoveryToken() (r string, exists bool)
RecoveryToken returns the recovery_token value in the mutation.
func (*UserMutation) RecoveryTokenCleared ¶
func (m *UserMutation) RecoveryTokenCleared() bool
RecoveryTokenCleared returns if the field recovery_token was cleared in this mutation.
func (*UserMutation) RemoveGroupRoleIDs ¶ added in v0.1.7
func (m *UserMutation) RemoveGroupRoleIDs(ids ...uuid.UUID)
RemoveGroupRoleIDs removes the group_roles edge to GroupRole by ids.
func (*UserMutation) RemoveUserRoleIDs ¶ added in v0.1.7
func (m *UserMutation) RemoveUserRoleIDs(ids ...uuid.UUID)
RemoveUserRoleIDs removes the user_roles edge to UserRole by ids.
func (*UserMutation) RemoveWorkspaceRoleIDs ¶ added in v0.1.7
func (m *UserMutation) RemoveWorkspaceRoleIDs(ids ...uuid.UUID)
RemoveWorkspaceRoleIDs removes the workspace_roles edge to WorkspaceRole by ids.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedGroupRolesIDs ¶ added in v0.1.7
func (m *UserMutation) RemovedGroupRolesIDs() (ids []uuid.UUID)
RemovedGroupRoles returns the removed ids of group_roles.
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) RemovedUserRolesIDs ¶ added in v0.1.7
func (m *UserMutation) RemovedUserRolesIDs() (ids []uuid.UUID)
RemovedUserRoles returns the removed ids of user_roles.
func (*UserMutation) RemovedWorkspaceRolesIDs ¶ added in v0.1.7
func (m *UserMutation) RemovedWorkspaceRolesIDs() (ids []uuid.UUID)
RemovedWorkspaceRoles returns the removed ids of workspace_roles.
func (*UserMutation) ResetAPIKey ¶
func (m *UserMutation) ResetAPIKey()
ResetAPIKey reset all changes of the "api_key" field.
func (*UserMutation) ResetBillingID ¶ added in v0.1.2
func (m *UserMutation) ResetBillingID()
ResetBillingID reset all changes of the "billing_id" field.
func (*UserMutation) ResetConfirmationSentAt ¶
func (m *UserMutation) ResetConfirmationSentAt()
ResetConfirmationSentAt reset all changes of the "confirmation_sent_at" field.
func (*UserMutation) ResetConfirmationToken ¶
func (m *UserMutation) ResetConfirmationToken()
ResetConfirmationToken reset all changes of the "confirmation_token" field.
func (*UserMutation) ResetConfirmed ¶
func (m *UserMutation) ResetConfirmed()
ResetConfirmed reset all changes of the "confirmed" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
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) ResetEmailChange ¶
func (m *UserMutation) ResetEmailChange()
ResetEmailChange reset all changes of the "email_change" field.
func (*UserMutation) ResetEmailChangeSentAt ¶
func (m *UserMutation) ResetEmailChangeSentAt()
ResetEmailChangeSentAt reset all changes of the "email_change_sent_at" field.
func (*UserMutation) ResetEmailChangeToken ¶
func (m *UserMutation) ResetEmailChangeToken()
ResetEmailChangeToken reset all changes of the "email_change_token" 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) ResetGroupRoles ¶ added in v0.1.7
func (m *UserMutation) ResetGroupRoles()
ResetGroupRoles reset all changes of the "group_roles" edge.
func (*UserMutation) ResetLastSigninAt ¶
func (m *UserMutation) ResetLastSigninAt()
ResetLastSigninAt reset all changes of the "last_signin_at" field.
func (*UserMutation) ResetMetadata ¶
func (m *UserMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*UserMutation) ResetOtp ¶
func (m *UserMutation) ResetOtp()
ResetOtp reset all changes of the "otp" field.
func (*UserMutation) ResetOtpSentAt ¶
func (m *UserMutation) ResetOtpSentAt()
ResetOtpSentAt reset all changes of the "otp_sent_at" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword reset all changes of the "password" field.
func (*UserMutation) ResetProvider ¶
func (m *UserMutation) ResetProvider()
ResetProvider reset all changes of the "provider" field.
func (*UserMutation) ResetRecoverySentAt ¶
func (m *UserMutation) ResetRecoverySentAt()
ResetRecoverySentAt reset all changes of the "recovery_sent_at" field.
func (*UserMutation) ResetRecoveryToken ¶
func (m *UserMutation) ResetRecoveryToken()
ResetRecoveryToken reset all changes of the "recovery_token" field.
func (*UserMutation) ResetRoles ¶ added in v0.1.5
func (m *UserMutation) ResetRoles()
ResetRoles reset all changes of the "roles" field.
func (*UserMutation) ResetTeams ¶ added in v0.1.7
func (m *UserMutation) ResetTeams()
ResetTeams reset all changes of the "teams" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*UserMutation) ResetUserRoles ¶ added in v0.1.7
func (m *UserMutation) ResetUserRoles()
ResetUserRoles reset all changes of the "user_roles" edge.
func (*UserMutation) ResetWorkspace ¶ added in v0.1.7
func (m *UserMutation) ResetWorkspace()
ResetWorkspace reset all changes of the "workspace" edge.
func (*UserMutation) ResetWorkspaceRoles ¶ added in v0.1.7
func (m *UserMutation) ResetWorkspaceRoles()
ResetWorkspaceRoles reset all changes of the "workspace_roles" edge.
func (*UserMutation) Roles ¶ added in v0.1.5
func (m *UserMutation) Roles() (r []string, exists bool)
Roles returns the roles value in the mutation.
func (*UserMutation) RolesCleared ¶ added in v0.1.5
func (m *UserMutation) RolesCleared() bool
RolesCleared returns if the field roles was cleared in this mutation.
func (*UserMutation) SetAPIKey ¶
func (m *UserMutation) SetAPIKey(s string)
SetAPIKey sets the api_key field.
func (*UserMutation) SetBillingID ¶ added in v0.1.2
func (m *UserMutation) SetBillingID(s string)
SetBillingID sets the billing_id field.
func (*UserMutation) SetConfirmationSentAt ¶
func (m *UserMutation) SetConfirmationSentAt(t time.Time)
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserMutation) SetConfirmationToken ¶
func (m *UserMutation) SetConfirmationToken(s string)
SetConfirmationToken sets the confirmation_token field.
func (*UserMutation) SetConfirmed ¶
func (m *UserMutation) SetConfirmed(b bool)
SetConfirmed sets the confirmed field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the email field.
func (*UserMutation) SetEmailChange ¶
func (m *UserMutation) SetEmailChange(s string)
SetEmailChange sets the email_change field.
func (*UserMutation) SetEmailChangeSentAt ¶
func (m *UserMutation) SetEmailChangeSentAt(t time.Time)
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserMutation) SetEmailChangeToken ¶
func (m *UserMutation) SetEmailChangeToken(s string)
SetEmailChangeToken sets the email_change_token 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 uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on User creation.
func (*UserMutation) SetLastSigninAt ¶
func (m *UserMutation) SetLastSigninAt(t time.Time)
SetLastSigninAt sets the last_signin_at field.
func (*UserMutation) SetMetadata ¶
func (m *UserMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*UserMutation) SetOtpSentAt ¶
func (m *UserMutation) SetOtpSentAt(t time.Time)
SetOtpSentAt sets the otp_sent_at field.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the password field.
func (*UserMutation) SetProvider ¶
func (m *UserMutation) SetProvider(s string)
SetProvider sets the provider field.
func (*UserMutation) SetRecoverySentAt ¶
func (m *UserMutation) SetRecoverySentAt(t time.Time)
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserMutation) SetRecoveryToken ¶
func (m *UserMutation) SetRecoveryToken(s string)
SetRecoveryToken sets the recovery_token field.
func (*UserMutation) SetRoles ¶ added in v0.1.5
func (m *UserMutation) SetRoles(s []string)
SetRoles sets the roles field.
func (*UserMutation) SetTeams ¶ added in v0.1.7
func (m *UserMutation) SetTeams(value map[string]string)
SetTeams sets the teams field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*UserMutation) SetWorkspaceID ¶ added in v0.1.7
func (m *UserMutation) SetWorkspaceID(id uuid.UUID)
SetWorkspaceID sets the workspace edge to Workspace by id.
func (*UserMutation) Teams ¶ added in v0.1.7
func (m *UserMutation) Teams() (r map[string]string, exists bool)
Teams returns the teams value in the mutation.
func (*UserMutation) TeamsCleared ¶ added in v0.1.7
func (m *UserMutation) TeamsCleared() bool
TeamsCleared returns if the field teams was cleared in this mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*UserMutation) UserRolesCleared ¶ added in v0.1.7
func (m *UserMutation) UserRolesCleared() bool
UserRolesCleared returns if the edge user_roles was cleared.
func (*UserMutation) UserRolesIDs ¶ added in v0.1.7
func (m *UserMutation) UserRolesIDs() (ids []uuid.UUID)
UserRolesIDs returns the user_roles ids in the mutation.
func (*UserMutation) WorkspaceCleared ¶ added in v0.1.7
func (m *UserMutation) WorkspaceCleared() bool
WorkspaceCleared returns if the edge workspace was cleared.
func (*UserMutation) WorkspaceID ¶ added in v0.1.7
func (m *UserMutation) WorkspaceID() (id uuid.UUID, exists bool)
WorkspaceID returns the workspace id in the mutation.
func (*UserMutation) WorkspaceIDs ¶ added in v0.1.7
func (m *UserMutation) WorkspaceIDs() (ids []uuid.UUID)
WorkspaceIDs returns the workspace ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use WorkspaceID instead. It exists only for internal usage by the builders.
func (*UserMutation) WorkspaceRolesCleared ¶ added in v0.1.7
func (m *UserMutation) WorkspaceRolesCleared() bool
WorkspaceRolesCleared returns if the edge workspace_roles was cleared.
func (*UserMutation) WorkspaceRolesIDs ¶ added in v0.1.7
func (m *UserMutation) WorkspaceRolesIDs() (ids []uuid.UUID)
WorkspaceRolesIDs returns the workspace_roles ids in the mutation.
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 {
BillingID string `json:"billing_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldBillingID).
Aggregate(models.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) QueryGroupRoles ¶ added in v0.1.7
func (uq *UserQuery) QueryGroupRoles() *GroupRoleQuery
QueryGroupRoles chains the current query on the group_roles edge.
func (*UserQuery) QueryUserRoles ¶ added in v0.1.7
func (uq *UserQuery) QueryUserRoles() *UserRoleQuery
QueryUserRoles chains the current query on the user_roles edge.
func (*UserQuery) QueryWorkspace ¶ added in v0.1.7
func (uq *UserQuery) QueryWorkspace() *WorkspaceQuery
QueryWorkspace chains the current query on the workspace edge.
func (*UserQuery) QueryWorkspaceRoles ¶ added in v0.1.7
func (uq *UserQuery) QueryWorkspaceRoles() *WorkspaceRoleQuery
QueryWorkspaceRoles chains the current query on the workspace_roles 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 {
BillingID string `json:"billing_id,omitempty"`
}
client.User.Query().
Select(user.FieldBillingID).
Scan(ctx, &v)
func (*UserQuery) WithGroupRoles ¶ added in v0.1.7
func (uq *UserQuery) WithGroupRoles(opts ...func(*GroupRoleQuery)) *UserQuery
WithGroupRoles tells the query-builder to eager-loads the nodes that are connected to
the "group_roles" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithUserRoles ¶ added in v0.1.7
func (uq *UserQuery) WithUserRoles(opts ...func(*UserRoleQuery)) *UserQuery
WithUserRoles tells the query-builder to eager-loads the nodes that are connected to
the "user_roles" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithWorkspace ¶ added in v0.1.7
func (uq *UserQuery) WithWorkspace(opts ...func(*WorkspaceQuery)) *UserQuery
WithWorkspace tells the query-builder to eager-loads the nodes that are connected to
the "workspace" edge. The optional arguments used to configure the query builder of the edge.
func (*UserQuery) WithWorkspaceRoles ¶ added in v0.1.7
func (uq *UserQuery) WithWorkspaceRoles(opts ...func(*WorkspaceRoleQuery)) *UserQuery
WithWorkspaceRoles tells the query-builder to eager-loads the nodes that are connected to
the "workspace_roles" edge. The optional arguments used to configure the query builder of the edge.
type UserRole ¶ added in v0.1.7
type UserRole struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// UserID holds the value of the "user_id" field.
UserID uuid.UUID `json:"user_id,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,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 UserRoleQuery when eager-loading is set.
Edges UserRoleEdges `json:"edges"`
// contains filtered or unexported fields
}
UserRole is the model entity for the UserRole schema.
func (*UserRole) QueryUsers ¶ added in v0.1.7
QueryUsers queries the users edge of the UserRole.
func (*UserRole) Unwrap ¶ added in v0.1.7
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 (*UserRole) Update ¶ added in v0.1.7
func (ur *UserRole) Update() *UserRoleUpdateOne
Update returns a builder for updating this UserRole. Note that, you need to call UserRole.Unwrap() before calling this method, if this UserRole was returned from a transaction, and the transaction was committed or rolled back.
type UserRoleClient ¶ added in v0.1.7
type UserRoleClient struct {
// contains filtered or unexported fields
}
UserRoleClient is a client for the UserRole schema.
func NewUserRoleClient ¶ added in v0.1.7
func NewUserRoleClient(c config) *UserRoleClient
NewUserRoleClient returns a client for the UserRole from the given config.
func (*UserRoleClient) Create ¶ added in v0.1.7
func (c *UserRoleClient) Create() *UserRoleCreate
Create returns a create builder for UserRole.
func (*UserRoleClient) CreateBulk ¶ added in v0.1.7
func (c *UserRoleClient) CreateBulk(builders ...*UserRoleCreate) *UserRoleCreateBulk
CreateBulk returns a builder for creating a bulk of UserRole entities.
func (*UserRoleClient) Delete ¶ added in v0.1.7
func (c *UserRoleClient) Delete() *UserRoleDelete
Delete returns a delete builder for UserRole.
func (*UserRoleClient) DeleteOne ¶ added in v0.1.7
func (c *UserRoleClient) DeleteOne(ur *UserRole) *UserRoleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserRoleClient) DeleteOneID ¶ added in v0.1.7
func (c *UserRoleClient) DeleteOneID(id uuid.UUID) *UserRoleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserRoleClient) Hooks ¶ added in v0.1.7
func (c *UserRoleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserRoleClient) Query ¶ added in v0.1.7
func (c *UserRoleClient) Query() *UserRoleQuery
Query returns a query builder for UserRole.
func (*UserRoleClient) QueryUsers ¶ added in v0.1.7
func (c *UserRoleClient) QueryUsers(ur *UserRole) *UserQuery
QueryUsers queries the users edge of a UserRole.
func (*UserRoleClient) Update ¶ added in v0.1.7
func (c *UserRoleClient) Update() *UserRoleUpdate
Update returns an update builder for UserRole.
func (*UserRoleClient) UpdateOne ¶ added in v0.1.7
func (c *UserRoleClient) UpdateOne(ur *UserRole) *UserRoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserRoleClient) UpdateOneID ¶ added in v0.1.7
func (c *UserRoleClient) UpdateOneID(id uuid.UUID) *UserRoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserRoleClient) Use ¶ added in v0.1.7
func (c *UserRoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userrole.Hooks(f(g(h())))`.
type UserRoleCreate ¶ added in v0.1.7
type UserRoleCreate struct {
// contains filtered or unexported fields
}
UserRoleCreate is the builder for creating a UserRole entity.
func (*UserRoleCreate) Mutation ¶ added in v0.1.7
func (urc *UserRoleCreate) Mutation() *UserRoleMutation
Mutation returns the UserRoleMutation object of the builder.
func (*UserRoleCreate) Save ¶ added in v0.1.7
func (urc *UserRoleCreate) Save(ctx context.Context) (*UserRole, error)
Save creates the UserRole in the database.
func (*UserRoleCreate) SaveX ¶ added in v0.1.7
func (urc *UserRoleCreate) SaveX(ctx context.Context) *UserRole
SaveX calls Save and panics if Save returns an error.
func (*UserRoleCreate) SetCreatedAt ¶ added in v0.1.7
func (urc *UserRoleCreate) SetCreatedAt(t time.Time) *UserRoleCreate
SetCreatedAt sets the created_at field.
func (*UserRoleCreate) SetID ¶ added in v0.1.7
func (urc *UserRoleCreate) SetID(u uuid.UUID) *UserRoleCreate
SetID sets the id field.
func (*UserRoleCreate) SetMetadata ¶ added in v0.1.7
func (urc *UserRoleCreate) SetMetadata(m map[string]interface{}) *UserRoleCreate
SetMetadata sets the metadata field.
func (*UserRoleCreate) SetName ¶ added in v0.1.7
func (urc *UserRoleCreate) SetName(s string) *UserRoleCreate
SetName sets the name field.
func (*UserRoleCreate) SetNillableCreatedAt ¶ added in v0.1.7
func (urc *UserRoleCreate) SetNillableCreatedAt(t *time.Time) *UserRoleCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*UserRoleCreate) SetNillableUpdatedAt ¶ added in v0.1.7
func (urc *UserRoleCreate) SetNillableUpdatedAt(t *time.Time) *UserRoleCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*UserRoleCreate) SetUpdatedAt ¶ added in v0.1.7
func (urc *UserRoleCreate) SetUpdatedAt(t time.Time) *UserRoleCreate
SetUpdatedAt sets the updated_at field.
func (*UserRoleCreate) SetUserID ¶ added in v0.1.7
func (urc *UserRoleCreate) SetUserID(u uuid.UUID) *UserRoleCreate
SetUserID sets the user_id field.
func (*UserRoleCreate) SetUsers ¶ added in v0.1.7
func (urc *UserRoleCreate) SetUsers(u *User) *UserRoleCreate
SetUsers sets the users edge to User.
func (*UserRoleCreate) SetUsersID ¶ added in v0.1.7
func (urc *UserRoleCreate) SetUsersID(id uuid.UUID) *UserRoleCreate
SetUsersID sets the users edge to User by id.
type UserRoleCreateBulk ¶ added in v0.1.7
type UserRoleCreateBulk struct {
// contains filtered or unexported fields
}
UserRoleCreateBulk is the builder for creating a bulk of UserRole entities.
type UserRoleDelete ¶ added in v0.1.7
type UserRoleDelete struct {
// contains filtered or unexported fields
}
UserRoleDelete is the builder for deleting a UserRole entity.
func (*UserRoleDelete) Exec ¶ added in v0.1.7
func (urd *UserRoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserRoleDelete) ExecX ¶ added in v0.1.7
func (urd *UserRoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserRoleDelete) Where ¶ added in v0.1.7
func (urd *UserRoleDelete) Where(ps ...predicate.UserRole) *UserRoleDelete
Where adds a new predicate to the delete builder.
type UserRoleDeleteOne ¶ added in v0.1.7
type UserRoleDeleteOne struct {
// contains filtered or unexported fields
}
UserRoleDeleteOne is the builder for deleting a single UserRole entity.
func (*UserRoleDeleteOne) Exec ¶ added in v0.1.7
func (urdo *UserRoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserRoleDeleteOne) ExecX ¶ added in v0.1.7
func (urdo *UserRoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserRoleEdges ¶ added in v0.1.7
type UserRoleEdges struct {
// Users holds the value of the users edge.
Users *User
// contains filtered or unexported fields
}
UserRoleEdges holds the relations/edges for other nodes in the graph.
func (UserRoleEdges) UsersOrErr ¶ added in v0.1.7
func (e UserRoleEdges) UsersOrErr() (*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserRoleGroupBy ¶ added in v0.1.7
type UserRoleGroupBy struct {
// contains filtered or unexported fields
}
UserRoleGroupBy is the builder for group-by UserRole entities.
func (*UserRoleGroupBy) Aggregate ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Aggregate(fns ...AggregateFunc) *UserRoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserRoleGroupBy) Bool ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*UserRoleGroupBy) BoolX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserRoleGroupBy) Bools ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) 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 (*UserRoleGroupBy) BoolsX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserRoleGroupBy) Float64 ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*UserRoleGroupBy) Float64X ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserRoleGroupBy) Float64s ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) 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 (*UserRoleGroupBy) Float64sX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserRoleGroupBy) Int ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*UserRoleGroupBy) IntX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserRoleGroupBy) Ints ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) 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 (*UserRoleGroupBy) IntsX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserRoleGroupBy) Scan ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*UserRoleGroupBy) ScanX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserRoleGroupBy) String ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*UserRoleGroupBy) StringX ¶ added in v0.1.7
func (urgb *UserRoleGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserRoleMutation ¶ added in v0.1.7
type UserRoleMutation struct {
// contains filtered or unexported fields
}
UserRoleMutation represents an operation that mutate the UserRoles nodes in the graph.
func (*UserRoleMutation) AddField ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) AddedEdges ¶ added in v0.1.7
func (m *UserRoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserRoleMutation) AddedField ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) AddedFields ¶ added in v0.1.7
func (m *UserRoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*UserRoleMutation) AddedIDs ¶ added in v0.1.7
func (m *UserRoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*UserRoleMutation) ClearEdge ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) ClearField ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) ClearMetadata ¶ added in v0.1.7
func (m *UserRoleMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*UserRoleMutation) ClearUsers ¶ added in v0.1.7
func (m *UserRoleMutation) ClearUsers()
ClearUsers clears the users edge to User.
func (*UserRoleMutation) ClearedEdges ¶ added in v0.1.7
func (m *UserRoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserRoleMutation) ClearedFields ¶ added in v0.1.7
func (m *UserRoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserRoleMutation) Client ¶ added in v0.1.7
func (m UserRoleMutation) 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 (*UserRoleMutation) CreatedAt ¶ added in v0.1.7
func (m *UserRoleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*UserRoleMutation) EdgeCleared ¶ added in v0.1.7
func (m *UserRoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*UserRoleMutation) Field ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) FieldCleared ¶ added in v0.1.7
func (m *UserRoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*UserRoleMutation) Fields ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) ID ¶ added in v0.1.7
func (m *UserRoleMutation) ID() (id uuid.UUID, 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 (*UserRoleMutation) Metadata ¶ added in v0.1.7
func (m *UserRoleMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*UserRoleMutation) MetadataCleared ¶ added in v0.1.7
func (m *UserRoleMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*UserRoleMutation) Name ¶ added in v0.1.7
func (m *UserRoleMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*UserRoleMutation) OldCreatedAt ¶ added in v0.1.7
OldCreatedAt returns the old created_at value of the UserRole. If the UserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserRoleMutation) OldField ¶ added in v0.1.7
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*UserRoleMutation) OldMetadata ¶ added in v0.1.7
func (m *UserRoleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the UserRole. If the UserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserRoleMutation) OldName ¶ added in v0.1.7
func (m *UserRoleMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the UserRole. If the UserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserRoleMutation) OldUpdatedAt ¶ added in v0.1.7
OldUpdatedAt returns the old updated_at value of the UserRole. If the UserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserRoleMutation) OldUserID ¶ added in v0.1.7
OldUserID returns the old user_id value of the UserRole. If the UserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*UserRoleMutation) Op ¶ added in v0.1.7
func (m *UserRoleMutation) Op() Op
Op returns the operation name.
func (*UserRoleMutation) RemovedEdges ¶ added in v0.1.7
func (m *UserRoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserRoleMutation) RemovedIDs ¶ added in v0.1.7
func (m *UserRoleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*UserRoleMutation) ResetCreatedAt ¶ added in v0.1.7
func (m *UserRoleMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*UserRoleMutation) ResetEdge ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) ResetField ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) ResetMetadata ¶ added in v0.1.7
func (m *UserRoleMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*UserRoleMutation) ResetName ¶ added in v0.1.7
func (m *UserRoleMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*UserRoleMutation) ResetUpdatedAt ¶ added in v0.1.7
func (m *UserRoleMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*UserRoleMutation) ResetUserID ¶ added in v0.1.7
func (m *UserRoleMutation) ResetUserID()
ResetUserID reset all changes of the "user_id" field.
func (*UserRoleMutation) ResetUsers ¶ added in v0.1.7
func (m *UserRoleMutation) ResetUsers()
ResetUsers reset all changes of the "users" edge.
func (*UserRoleMutation) SetCreatedAt ¶ added in v0.1.7
func (m *UserRoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*UserRoleMutation) SetField ¶ added in v0.1.7
func (m *UserRoleMutation) 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 (*UserRoleMutation) SetID ¶ added in v0.1.7
func (m *UserRoleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on UserRole creation.
func (*UserRoleMutation) SetMetadata ¶ added in v0.1.7
func (m *UserRoleMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*UserRoleMutation) SetName ¶ added in v0.1.7
func (m *UserRoleMutation) SetName(s string)
SetName sets the name field.
func (*UserRoleMutation) SetUpdatedAt ¶ added in v0.1.7
func (m *UserRoleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*UserRoleMutation) SetUserID ¶ added in v0.1.7
func (m *UserRoleMutation) SetUserID(u uuid.UUID)
SetUserID sets the user_id field.
func (*UserRoleMutation) SetUsersID ¶ added in v0.1.7
func (m *UserRoleMutation) SetUsersID(id uuid.UUID)
SetUsersID sets the users edge to User by id.
func (UserRoleMutation) Tx ¶ added in v0.1.7
func (m UserRoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserRoleMutation) Type ¶ added in v0.1.7
func (m *UserRoleMutation) Type() string
Type returns the node type of this mutation (UserRole).
func (*UserRoleMutation) UpdatedAt ¶ added in v0.1.7
func (m *UserRoleMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*UserRoleMutation) UserID ¶ added in v0.1.7
func (m *UserRoleMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the user_id value in the mutation.
func (*UserRoleMutation) UsersCleared ¶ added in v0.1.7
func (m *UserRoleMutation) UsersCleared() bool
UsersCleared returns if the edge users was cleared.
func (*UserRoleMutation) UsersID ¶ added in v0.1.7
func (m *UserRoleMutation) UsersID() (id uuid.UUID, exists bool)
UsersID returns the users id in the mutation.
func (*UserRoleMutation) UsersIDs ¶ added in v0.1.7
func (m *UserRoleMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the users ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use UsersID instead. It exists only for internal usage by the builders.
type UserRoleQuery ¶ added in v0.1.7
type UserRoleQuery struct {
// contains filtered or unexported fields
}
UserRoleQuery is the builder for querying UserRole entities.
func (*UserRoleQuery) All ¶ added in v0.1.7
func (urq *UserRoleQuery) All(ctx context.Context) ([]*UserRole, error)
All executes the query and returns a list of UserRoles.
func (*UserRoleQuery) AllX ¶ added in v0.1.7
func (urq *UserRoleQuery) AllX(ctx context.Context) []*UserRole
AllX is like All, but panics if an error occurs.
func (*UserRoleQuery) Clone ¶ added in v0.1.7
func (urq *UserRoleQuery) Clone() *UserRoleQuery
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 (*UserRoleQuery) Count ¶ added in v0.1.7
func (urq *UserRoleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserRoleQuery) CountX ¶ added in v0.1.7
func (urq *UserRoleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserRoleQuery) Exist ¶ added in v0.1.7
func (urq *UserRoleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserRoleQuery) ExistX ¶ added in v0.1.7
func (urq *UserRoleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserRoleQuery) First ¶ added in v0.1.7
func (urq *UserRoleQuery) First(ctx context.Context) (*UserRole, error)
First returns the first UserRole entity in the query. Returns *NotFoundError when no userrole was found.
func (*UserRoleQuery) FirstID ¶ added in v0.1.7
FirstID returns the first UserRole id in the query. Returns *NotFoundError when no id was found.
func (*UserRoleQuery) FirstIDX ¶ added in v0.1.7
func (urq *UserRoleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserRoleQuery) FirstX ¶ added in v0.1.7
func (urq *UserRoleQuery) FirstX(ctx context.Context) *UserRole
FirstX is like First, but panics if an error occurs.
func (*UserRoleQuery) GroupBy ¶ added in v0.1.7
func (urq *UserRoleQuery) GroupBy(field string, fields ...string) *UserRoleGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.UserRole.Query().
GroupBy(userrole.FieldName).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*UserRoleQuery) IDs ¶ added in v0.1.7
IDs executes the query and returns a list of UserRole ids.
func (*UserRoleQuery) IDsX ¶ added in v0.1.7
func (urq *UserRoleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*UserRoleQuery) Limit ¶ added in v0.1.7
func (urq *UserRoleQuery) Limit(limit int) *UserRoleQuery
Limit adds a limit step to the query.
func (*UserRoleQuery) Offset ¶ added in v0.1.7
func (urq *UserRoleQuery) Offset(offset int) *UserRoleQuery
Offset adds an offset step to the query.
func (*UserRoleQuery) Only ¶ added in v0.1.7
func (urq *UserRoleQuery) Only(ctx context.Context) (*UserRole, error)
Only returns the only UserRole entity in the query, returns an error if not exactly one entity was returned.
func (*UserRoleQuery) OnlyID ¶ added in v0.1.7
OnlyID returns the only UserRole id in the query, returns an error if not exactly one id was returned.
func (*UserRoleQuery) OnlyIDX ¶ added in v0.1.7
func (urq *UserRoleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserRoleQuery) OnlyX ¶ added in v0.1.7
func (urq *UserRoleQuery) OnlyX(ctx context.Context) *UserRole
OnlyX is like Only, but panics if an error occurs.
func (*UserRoleQuery) Order ¶ added in v0.1.7
func (urq *UserRoleQuery) Order(o ...OrderFunc) *UserRoleQuery
Order adds an order step to the query.
func (*UserRoleQuery) QueryUsers ¶ added in v0.1.7
func (urq *UserRoleQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the users edge.
func (*UserRoleQuery) Select ¶ added in v0.1.7
func (urq *UserRoleQuery) Select(field string, fields ...string) *UserRoleSelect
Select one or more fields from the given query.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.UserRole.Query().
Select(userrole.FieldName).
Scan(ctx, &v)
func (*UserRoleQuery) Where ¶ added in v0.1.7
func (urq *UserRoleQuery) Where(ps ...predicate.UserRole) *UserRoleQuery
Where adds a new predicate for the builder.
func (*UserRoleQuery) WithUsers ¶ added in v0.1.7
func (urq *UserRoleQuery) WithUsers(opts ...func(*UserQuery)) *UserRoleQuery
WithUsers tells the query-builder to eager-loads the nodes that are connected to
the "users" edge. The optional arguments used to configure the query builder of the edge.
type UserRoleSelect ¶ added in v0.1.7
type UserRoleSelect struct {
// contains filtered or unexported fields
}
UserRoleSelect is the builder for select fields of UserRole entities.
func (*UserRoleSelect) Bool ¶ added in v0.1.7
func (urs *UserRoleSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) BoolX ¶ added in v0.1.7
func (urs *UserRoleSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserRoleSelect) Bools ¶ added in v0.1.7
func (urs *UserRoleSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) BoolsX ¶ added in v0.1.7
func (urs *UserRoleSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserRoleSelect) Float64 ¶ added in v0.1.7
func (urs *UserRoleSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) Float64X ¶ added in v0.1.7
func (urs *UserRoleSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserRoleSelect) Float64s ¶ added in v0.1.7
func (urs *UserRoleSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) Float64sX ¶ added in v0.1.7
func (urs *UserRoleSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserRoleSelect) Int ¶ added in v0.1.7
func (urs *UserRoleSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) IntX ¶ added in v0.1.7
func (urs *UserRoleSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserRoleSelect) Ints ¶ added in v0.1.7
func (urs *UserRoleSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) IntsX ¶ added in v0.1.7
func (urs *UserRoleSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserRoleSelect) Scan ¶ added in v0.1.7
func (urs *UserRoleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*UserRoleSelect) ScanX ¶ added in v0.1.7
func (urs *UserRoleSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserRoleSelect) String ¶ added in v0.1.7
func (urs *UserRoleSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*UserRoleSelect) StringX ¶ added in v0.1.7
func (urs *UserRoleSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserRoleUpdate ¶ added in v0.1.7
type UserRoleUpdate struct {
// contains filtered or unexported fields
}
UserRoleUpdate is the builder for updating UserRole entities.
func (*UserRoleUpdate) ClearMetadata ¶ added in v0.1.7
func (uru *UserRoleUpdate) ClearMetadata() *UserRoleUpdate
ClearMetadata clears the value of metadata.
func (*UserRoleUpdate) ClearUsers ¶ added in v0.1.7
func (uru *UserRoleUpdate) ClearUsers() *UserRoleUpdate
ClearUsers clears the "users" edge to type User.
func (*UserRoleUpdate) Exec ¶ added in v0.1.7
func (uru *UserRoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserRoleUpdate) ExecX ¶ added in v0.1.7
func (uru *UserRoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserRoleUpdate) Mutation ¶ added in v0.1.7
func (uru *UserRoleUpdate) Mutation() *UserRoleMutation
Mutation returns the UserRoleMutation object of the builder.
func (*UserRoleUpdate) Save ¶ added in v0.1.7
func (uru *UserRoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserRoleUpdate) SaveX ¶ added in v0.1.7
func (uru *UserRoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserRoleUpdate) SetMetadata ¶ added in v0.1.7
func (uru *UserRoleUpdate) SetMetadata(m map[string]interface{}) *UserRoleUpdate
SetMetadata sets the metadata field.
func (*UserRoleUpdate) SetName ¶ added in v0.1.7
func (uru *UserRoleUpdate) SetName(s string) *UserRoleUpdate
SetName sets the name field.
func (*UserRoleUpdate) SetUpdatedAt ¶ added in v0.1.7
func (uru *UserRoleUpdate) SetUpdatedAt(t time.Time) *UserRoleUpdate
SetUpdatedAt sets the updated_at field.
func (*UserRoleUpdate) SetUserID ¶ added in v0.1.7
func (uru *UserRoleUpdate) SetUserID(u uuid.UUID) *UserRoleUpdate
SetUserID sets the user_id field.
func (*UserRoleUpdate) SetUsers ¶ added in v0.1.7
func (uru *UserRoleUpdate) SetUsers(u *User) *UserRoleUpdate
SetUsers sets the users edge to User.
func (*UserRoleUpdate) SetUsersID ¶ added in v0.1.7
func (uru *UserRoleUpdate) SetUsersID(id uuid.UUID) *UserRoleUpdate
SetUsersID sets the users edge to User by id.
func (*UserRoleUpdate) Where ¶ added in v0.1.7
func (uru *UserRoleUpdate) Where(ps ...predicate.UserRole) *UserRoleUpdate
Where adds a new predicate for the builder.
type UserRoleUpdateOne ¶ added in v0.1.7
type UserRoleUpdateOne struct {
// contains filtered or unexported fields
}
UserRoleUpdateOne is the builder for updating a single UserRole entity.
func (*UserRoleUpdateOne) ClearMetadata ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) ClearMetadata() *UserRoleUpdateOne
ClearMetadata clears the value of metadata.
func (*UserRoleUpdateOne) ClearUsers ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) ClearUsers() *UserRoleUpdateOne
ClearUsers clears the "users" edge to type User.
func (*UserRoleUpdateOne) Exec ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserRoleUpdateOne) ExecX ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserRoleUpdateOne) Mutation ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) Mutation() *UserRoleMutation
Mutation returns the UserRoleMutation object of the builder.
func (*UserRoleUpdateOne) Save ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) Save(ctx context.Context) (*UserRole, error)
Save executes the query and returns the updated entity.
func (*UserRoleUpdateOne) SaveX ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SaveX(ctx context.Context) *UserRole
SaveX is like Save, but panics if an error occurs.
func (*UserRoleUpdateOne) SetMetadata ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SetMetadata(m map[string]interface{}) *UserRoleUpdateOne
SetMetadata sets the metadata field.
func (*UserRoleUpdateOne) SetName ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SetName(s string) *UserRoleUpdateOne
SetName sets the name field.
func (*UserRoleUpdateOne) SetUpdatedAt ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SetUpdatedAt(t time.Time) *UserRoleUpdateOne
SetUpdatedAt sets the updated_at field.
func (*UserRoleUpdateOne) SetUserID ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SetUserID(u uuid.UUID) *UserRoleUpdateOne
SetUserID sets the user_id field.
func (*UserRoleUpdateOne) SetUsers ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SetUsers(u *User) *UserRoleUpdateOne
SetUsers sets the users edge to User.
func (*UserRoleUpdateOne) SetUsersID ¶ added in v0.1.7
func (uruo *UserRoleUpdateOne) SetUsersID(id uuid.UUID) *UserRoleUpdateOne
SetUsersID sets the users edge to User by id.
type UserRoles ¶ added in v0.1.7
type UserRoles []*UserRole
UserRoles is a parsable slice of UserRole.
type UserSelect ¶
type UserSelect struct {
// contains filtered or unexported fields
}
UserSelect is the builder for select fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
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) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, 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) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, 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.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, 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) AddGroupRoleIDs ¶ added in v0.1.7
func (uu *UserUpdate) AddGroupRoleIDs(ids ...uuid.UUID) *UserUpdate
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*UserUpdate) AddGroupRoles ¶ added in v0.1.7
func (uu *UserUpdate) AddGroupRoles(g ...*GroupRole) *UserUpdate
AddGroupRoles adds the group_roles edges to GroupRole.
func (*UserUpdate) AddUserRoleIDs ¶ added in v0.1.7
func (uu *UserUpdate) AddUserRoleIDs(ids ...uuid.UUID) *UserUpdate
AddUserRoleIDs adds the user_roles edge to UserRole by ids.
func (*UserUpdate) AddUserRoles ¶ added in v0.1.7
func (uu *UserUpdate) AddUserRoles(u ...*UserRole) *UserUpdate
AddUserRoles adds the user_roles edges to UserRole.
func (*UserUpdate) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (uu *UserUpdate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdate
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*UserUpdate) AddWorkspaceRoles ¶ added in v0.1.7
func (uu *UserUpdate) AddWorkspaceRoles(w ...*WorkspaceRole) *UserUpdate
AddWorkspaceRoles adds the workspace_roles edges to WorkspaceRole.
func (*UserUpdate) ClearAPIKey ¶
func (uu *UserUpdate) ClearAPIKey() *UserUpdate
ClearAPIKey clears the value of api_key.
func (*UserUpdate) ClearBillingID ¶ added in v0.1.2
func (uu *UserUpdate) ClearBillingID() *UserUpdate
ClearBillingID clears the value of billing_id.
func (*UserUpdate) ClearConfirmationSentAt ¶
func (uu *UserUpdate) ClearConfirmationSentAt() *UserUpdate
ClearConfirmationSentAt clears the value of confirmation_sent_at.
func (*UserUpdate) ClearConfirmationToken ¶
func (uu *UserUpdate) ClearConfirmationToken() *UserUpdate
ClearConfirmationToken clears the value of confirmation_token.
func (*UserUpdate) ClearConfirmed ¶
func (uu *UserUpdate) ClearConfirmed() *UserUpdate
ClearConfirmed clears the value of confirmed.
func (*UserUpdate) ClearEmailChange ¶
func (uu *UserUpdate) ClearEmailChange() *UserUpdate
ClearEmailChange clears the value of email_change.
func (*UserUpdate) ClearEmailChangeSentAt ¶
func (uu *UserUpdate) ClearEmailChangeSentAt() *UserUpdate
ClearEmailChangeSentAt clears the value of email_change_sent_at.
func (*UserUpdate) ClearEmailChangeToken ¶
func (uu *UserUpdate) ClearEmailChangeToken() *UserUpdate
ClearEmailChangeToken clears the value of email_change_token.
func (*UserUpdate) ClearGroupRoles ¶ added in v0.1.7
func (uu *UserUpdate) ClearGroupRoles() *UserUpdate
ClearGroupRoles clears all "group_roles" edges to type GroupRole.
func (*UserUpdate) ClearLastSigninAt ¶
func (uu *UserUpdate) ClearLastSigninAt() *UserUpdate
ClearLastSigninAt clears the value of last_signin_at.
func (*UserUpdate) ClearOtp ¶
func (uu *UserUpdate) ClearOtp() *UserUpdate
ClearOtp clears the value of otp.
func (*UserUpdate) ClearOtpSentAt ¶
func (uu *UserUpdate) ClearOtpSentAt() *UserUpdate
ClearOtpSentAt clears the value of otp_sent_at.
func (*UserUpdate) ClearRecoverySentAt ¶
func (uu *UserUpdate) ClearRecoverySentAt() *UserUpdate
ClearRecoverySentAt clears the value of recovery_sent_at.
func (*UserUpdate) ClearRecoveryToken ¶
func (uu *UserUpdate) ClearRecoveryToken() *UserUpdate
ClearRecoveryToken clears the value of recovery_token.
func (*UserUpdate) ClearRoles ¶ added in v0.1.5
func (uu *UserUpdate) ClearRoles() *UserUpdate
ClearRoles clears the value of roles.
func (*UserUpdate) ClearTeams ¶ added in v0.1.7
func (uu *UserUpdate) ClearTeams() *UserUpdate
ClearTeams clears the value of teams.
func (*UserUpdate) ClearUserRoles ¶ added in v0.1.7
func (uu *UserUpdate) ClearUserRoles() *UserUpdate
ClearUserRoles clears all "user_roles" edges to type UserRole.
func (*UserUpdate) ClearWorkspace ¶ added in v0.1.7
func (uu *UserUpdate) ClearWorkspace() *UserUpdate
ClearWorkspace clears the "workspace" edge to type Workspace.
func (*UserUpdate) ClearWorkspaceRoles ¶ added in v0.1.7
func (uu *UserUpdate) ClearWorkspaceRoles() *UserUpdate
ClearWorkspaceRoles clears all "workspace_roles" edges to type WorkspaceRole.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveGroupRoleIDs ¶ added in v0.1.7
func (uu *UserUpdate) RemoveGroupRoleIDs(ids ...uuid.UUID) *UserUpdate
RemoveGroupRoleIDs removes the group_roles edge to GroupRole by ids.
func (*UserUpdate) RemoveGroupRoles ¶ added in v0.1.7
func (uu *UserUpdate) RemoveGroupRoles(g ...*GroupRole) *UserUpdate
RemoveGroupRoles removes group_roles edges to GroupRole.
func (*UserUpdate) RemoveUserRoleIDs ¶ added in v0.1.7
func (uu *UserUpdate) RemoveUserRoleIDs(ids ...uuid.UUID) *UserUpdate
RemoveUserRoleIDs removes the user_roles edge to UserRole by ids.
func (*UserUpdate) RemoveUserRoles ¶ added in v0.1.7
func (uu *UserUpdate) RemoveUserRoles(u ...*UserRole) *UserUpdate
RemoveUserRoles removes user_roles edges to UserRole.
func (*UserUpdate) RemoveWorkspaceRoleIDs ¶ added in v0.1.7
func (uu *UserUpdate) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdate
RemoveWorkspaceRoleIDs removes the workspace_roles edge to WorkspaceRole by ids.
func (*UserUpdate) RemoveWorkspaceRoles ¶ added in v0.1.7
func (uu *UserUpdate) RemoveWorkspaceRoles(w ...*WorkspaceRole) *UserUpdate
RemoveWorkspaceRoles removes workspace_roles edges to WorkspaceRole.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAPIKey ¶
func (uu *UserUpdate) SetAPIKey(s string) *UserUpdate
SetAPIKey sets the api_key field.
func (*UserUpdate) SetBillingID ¶ added in v0.1.2
func (uu *UserUpdate) SetBillingID(s string) *UserUpdate
SetBillingID sets the billing_id field.
func (*UserUpdate) SetConfirmationSentAt ¶
func (uu *UserUpdate) SetConfirmationSentAt(t time.Time) *UserUpdate
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserUpdate) SetConfirmationToken ¶
func (uu *UserUpdate) SetConfirmationToken(s string) *UserUpdate
SetConfirmationToken sets the confirmation_token field.
func (*UserUpdate) SetConfirmed ¶
func (uu *UserUpdate) SetConfirmed(b bool) *UserUpdate
SetConfirmed sets the confirmed field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the email field.
func (*UserUpdate) SetEmailChange ¶
func (uu *UserUpdate) SetEmailChange(s string) *UserUpdate
SetEmailChange sets the email_change field.
func (*UserUpdate) SetEmailChangeSentAt ¶
func (uu *UserUpdate) SetEmailChangeSentAt(t time.Time) *UserUpdate
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserUpdate) SetEmailChangeToken ¶
func (uu *UserUpdate) SetEmailChangeToken(s string) *UserUpdate
SetEmailChangeToken sets the email_change_token field.
func (*UserUpdate) SetLastSigninAt ¶
func (uu *UserUpdate) SetLastSigninAt(t time.Time) *UserUpdate
SetLastSigninAt sets the last_signin_at field.
func (*UserUpdate) SetMetadata ¶
func (uu *UserUpdate) SetMetadata(m map[string]interface{}) *UserUpdate
SetMetadata sets the metadata field.
func (*UserUpdate) SetNillableAPIKey ¶
func (uu *UserUpdate) SetNillableAPIKey(s *string) *UserUpdate
SetNillableAPIKey sets the api_key field if the given value is not nil.
func (*UserUpdate) SetNillableBillingID ¶ added in v0.1.2
func (uu *UserUpdate) SetNillableBillingID(s *string) *UserUpdate
SetNillableBillingID sets the billing_id field if the given value is not nil.
func (*UserUpdate) SetNillableConfirmationSentAt ¶
func (uu *UserUpdate) SetNillableConfirmationSentAt(t *time.Time) *UserUpdate
SetNillableConfirmationSentAt sets the confirmation_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableConfirmationToken ¶
func (uu *UserUpdate) SetNillableConfirmationToken(s *string) *UserUpdate
SetNillableConfirmationToken sets the confirmation_token field if the given value is not nil.
func (*UserUpdate) SetNillableConfirmed ¶
func (uu *UserUpdate) SetNillableConfirmed(b *bool) *UserUpdate
SetNillableConfirmed sets the confirmed field if the given value is not nil.
func (*UserUpdate) SetNillableEmailChange ¶
func (uu *UserUpdate) SetNillableEmailChange(s *string) *UserUpdate
SetNillableEmailChange sets the email_change field if the given value is not nil.
func (*UserUpdate) SetNillableEmailChangeSentAt ¶
func (uu *UserUpdate) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdate
SetNillableEmailChangeSentAt sets the email_change_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableEmailChangeToken ¶
func (uu *UserUpdate) SetNillableEmailChangeToken(s *string) *UserUpdate
SetNillableEmailChangeToken sets the email_change_token field if the given value is not nil.
func (*UserUpdate) SetNillableLastSigninAt ¶
func (uu *UserUpdate) SetNillableLastSigninAt(t *time.Time) *UserUpdate
SetNillableLastSigninAt sets the last_signin_at field if the given value is not nil.
func (*UserUpdate) SetNillableOtp ¶
func (uu *UserUpdate) SetNillableOtp(s *string) *UserUpdate
SetNillableOtp sets the otp field if the given value is not nil.
func (*UserUpdate) SetNillableOtpSentAt ¶
func (uu *UserUpdate) SetNillableOtpSentAt(t *time.Time) *UserUpdate
SetNillableOtpSentAt sets the otp_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableRecoverySentAt ¶
func (uu *UserUpdate) SetNillableRecoverySentAt(t *time.Time) *UserUpdate
SetNillableRecoverySentAt sets the recovery_sent_at field if the given value is not nil.
func (*UserUpdate) SetNillableRecoveryToken ¶
func (uu *UserUpdate) SetNillableRecoveryToken(s *string) *UserUpdate
SetNillableRecoveryToken sets the recovery_token field if the given value is not nil.
func (*UserUpdate) SetNillableWorkspaceID ¶ added in v0.1.7
func (uu *UserUpdate) SetNillableWorkspaceID(id *uuid.UUID) *UserUpdate
SetNillableWorkspaceID sets the workspace edge to Workspace by id if the given value is not nil.
func (*UserUpdate) SetOtp ¶
func (uu *UserUpdate) SetOtp(s string) *UserUpdate
SetOtp sets the otp field.
func (*UserUpdate) SetOtpSentAt ¶
func (uu *UserUpdate) SetOtpSentAt(t time.Time) *UserUpdate
SetOtpSentAt sets the otp_sent_at field.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the password field.
func (*UserUpdate) SetProvider ¶
func (uu *UserUpdate) SetProvider(s string) *UserUpdate
SetProvider sets the provider field.
func (*UserUpdate) SetRecoverySentAt ¶
func (uu *UserUpdate) SetRecoverySentAt(t time.Time) *UserUpdate
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserUpdate) SetRecoveryToken ¶
func (uu *UserUpdate) SetRecoveryToken(s string) *UserUpdate
SetRecoveryToken sets the recovery_token field.
func (*UserUpdate) SetRoles ¶ added in v0.1.5
func (uu *UserUpdate) SetRoles(s []string) *UserUpdate
SetRoles sets the roles field.
func (*UserUpdate) SetTeams ¶ added in v0.1.7
func (uu *UserUpdate) SetTeams(m map[string]string) *UserUpdate
SetTeams sets the teams field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the updated_at field.
func (*UserUpdate) SetWorkspace ¶ added in v0.1.7
func (uu *UserUpdate) SetWorkspace(w *Workspace) *UserUpdate
SetWorkspace sets the workspace edge to Workspace.
func (*UserUpdate) SetWorkspaceID ¶ added in v0.1.7
func (uu *UserUpdate) SetWorkspaceID(id uuid.UUID) *UserUpdate
SetWorkspaceID sets the workspace edge to Workspace by id.
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) AddGroupRoleIDs ¶ added in v0.1.7
func (uuo *UserUpdateOne) AddGroupRoleIDs(ids ...uuid.UUID) *UserUpdateOne
AddGroupRoleIDs adds the group_roles edge to GroupRole by ids.
func (*UserUpdateOne) AddGroupRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) AddGroupRoles(g ...*GroupRole) *UserUpdateOne
AddGroupRoles adds the group_roles edges to GroupRole.
func (*UserUpdateOne) AddUserRoleIDs ¶ added in v0.1.7
func (uuo *UserUpdateOne) AddUserRoleIDs(ids ...uuid.UUID) *UserUpdateOne
AddUserRoleIDs adds the user_roles edge to UserRole by ids.
func (*UserUpdateOne) AddUserRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) AddUserRoles(u ...*UserRole) *UserUpdateOne
AddUserRoles adds the user_roles edges to UserRole.
func (*UserUpdateOne) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (uuo *UserUpdateOne) AddWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdateOne
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*UserUpdateOne) AddWorkspaceRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) AddWorkspaceRoles(w ...*WorkspaceRole) *UserUpdateOne
AddWorkspaceRoles adds the workspace_roles edges to WorkspaceRole.
func (*UserUpdateOne) ClearAPIKey ¶
func (uuo *UserUpdateOne) ClearAPIKey() *UserUpdateOne
ClearAPIKey clears the value of api_key.
func (*UserUpdateOne) ClearBillingID ¶ added in v0.1.2
func (uuo *UserUpdateOne) ClearBillingID() *UserUpdateOne
ClearBillingID clears the value of billing_id.
func (*UserUpdateOne) ClearConfirmationSentAt ¶
func (uuo *UserUpdateOne) ClearConfirmationSentAt() *UserUpdateOne
ClearConfirmationSentAt clears the value of confirmation_sent_at.
func (*UserUpdateOne) ClearConfirmationToken ¶
func (uuo *UserUpdateOne) ClearConfirmationToken() *UserUpdateOne
ClearConfirmationToken clears the value of confirmation_token.
func (*UserUpdateOne) ClearConfirmed ¶
func (uuo *UserUpdateOne) ClearConfirmed() *UserUpdateOne
ClearConfirmed clears the value of confirmed.
func (*UserUpdateOne) ClearEmailChange ¶
func (uuo *UserUpdateOne) ClearEmailChange() *UserUpdateOne
ClearEmailChange clears the value of email_change.
func (*UserUpdateOne) ClearEmailChangeSentAt ¶
func (uuo *UserUpdateOne) ClearEmailChangeSentAt() *UserUpdateOne
ClearEmailChangeSentAt clears the value of email_change_sent_at.
func (*UserUpdateOne) ClearEmailChangeToken ¶
func (uuo *UserUpdateOne) ClearEmailChangeToken() *UserUpdateOne
ClearEmailChangeToken clears the value of email_change_token.
func (*UserUpdateOne) ClearGroupRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) ClearGroupRoles() *UserUpdateOne
ClearGroupRoles clears all "group_roles" edges to type GroupRole.
func (*UserUpdateOne) ClearLastSigninAt ¶
func (uuo *UserUpdateOne) ClearLastSigninAt() *UserUpdateOne
ClearLastSigninAt clears the value of last_signin_at.
func (*UserUpdateOne) ClearOtp ¶
func (uuo *UserUpdateOne) ClearOtp() *UserUpdateOne
ClearOtp clears the value of otp.
func (*UserUpdateOne) ClearOtpSentAt ¶
func (uuo *UserUpdateOne) ClearOtpSentAt() *UserUpdateOne
ClearOtpSentAt clears the value of otp_sent_at.
func (*UserUpdateOne) ClearRecoverySentAt ¶
func (uuo *UserUpdateOne) ClearRecoverySentAt() *UserUpdateOne
ClearRecoverySentAt clears the value of recovery_sent_at.
func (*UserUpdateOne) ClearRecoveryToken ¶
func (uuo *UserUpdateOne) ClearRecoveryToken() *UserUpdateOne
ClearRecoveryToken clears the value of recovery_token.
func (*UserUpdateOne) ClearRoles ¶ added in v0.1.5
func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
ClearRoles clears the value of roles.
func (*UserUpdateOne) ClearTeams ¶ added in v0.1.7
func (uuo *UserUpdateOne) ClearTeams() *UserUpdateOne
ClearTeams clears the value of teams.
func (*UserUpdateOne) ClearUserRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) ClearUserRoles() *UserUpdateOne
ClearUserRoles clears all "user_roles" edges to type UserRole.
func (*UserUpdateOne) ClearWorkspace ¶ added in v0.1.7
func (uuo *UserUpdateOne) ClearWorkspace() *UserUpdateOne
ClearWorkspace clears the "workspace" edge to type Workspace.
func (*UserUpdateOne) ClearWorkspaceRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) ClearWorkspaceRoles() *UserUpdateOne
ClearWorkspaceRoles clears all "workspace_roles" edges to type WorkspaceRole.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveGroupRoleIDs ¶ added in v0.1.7
func (uuo *UserUpdateOne) RemoveGroupRoleIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveGroupRoleIDs removes the group_roles edge to GroupRole by ids.
func (*UserUpdateOne) RemoveGroupRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) RemoveGroupRoles(g ...*GroupRole) *UserUpdateOne
RemoveGroupRoles removes group_roles edges to GroupRole.
func (*UserUpdateOne) RemoveUserRoleIDs ¶ added in v0.1.7
func (uuo *UserUpdateOne) RemoveUserRoleIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveUserRoleIDs removes the user_roles edge to UserRole by ids.
func (*UserUpdateOne) RemoveUserRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) RemoveUserRoles(u ...*UserRole) *UserUpdateOne
RemoveUserRoles removes user_roles edges to UserRole.
func (*UserUpdateOne) RemoveWorkspaceRoleIDs ¶ added in v0.1.7
func (uuo *UserUpdateOne) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveWorkspaceRoleIDs removes the workspace_roles edge to WorkspaceRole by ids.
func (*UserUpdateOne) RemoveWorkspaceRoles ¶ added in v0.1.7
func (uuo *UserUpdateOne) RemoveWorkspaceRoles(w ...*WorkspaceRole) *UserUpdateOne
RemoveWorkspaceRoles removes workspace_roles edges to WorkspaceRole.
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) SetAPIKey ¶
func (uuo *UserUpdateOne) SetAPIKey(s string) *UserUpdateOne
SetAPIKey sets the api_key field.
func (*UserUpdateOne) SetBillingID ¶ added in v0.1.2
func (uuo *UserUpdateOne) SetBillingID(s string) *UserUpdateOne
SetBillingID sets the billing_id field.
func (*UserUpdateOne) SetConfirmationSentAt ¶
func (uuo *UserUpdateOne) SetConfirmationSentAt(t time.Time) *UserUpdateOne
SetConfirmationSentAt sets the confirmation_sent_at field.
func (*UserUpdateOne) SetConfirmationToken ¶
func (uuo *UserUpdateOne) SetConfirmationToken(s string) *UserUpdateOne
SetConfirmationToken sets the confirmation_token field.
func (*UserUpdateOne) SetConfirmed ¶
func (uuo *UserUpdateOne) SetConfirmed(b bool) *UserUpdateOne
SetConfirmed sets the confirmed field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the email field.
func (*UserUpdateOne) SetEmailChange ¶
func (uuo *UserUpdateOne) SetEmailChange(s string) *UserUpdateOne
SetEmailChange sets the email_change field.
func (*UserUpdateOne) SetEmailChangeSentAt ¶
func (uuo *UserUpdateOne) SetEmailChangeSentAt(t time.Time) *UserUpdateOne
SetEmailChangeSentAt sets the email_change_sent_at field.
func (*UserUpdateOne) SetEmailChangeToken ¶
func (uuo *UserUpdateOne) SetEmailChangeToken(s string) *UserUpdateOne
SetEmailChangeToken sets the email_change_token field.
func (*UserUpdateOne) SetLastSigninAt ¶
func (uuo *UserUpdateOne) SetLastSigninAt(t time.Time) *UserUpdateOne
SetLastSigninAt sets the last_signin_at field.
func (*UserUpdateOne) SetMetadata ¶
func (uuo *UserUpdateOne) SetMetadata(m map[string]interface{}) *UserUpdateOne
SetMetadata sets the metadata field.
func (*UserUpdateOne) SetNillableAPIKey ¶
func (uuo *UserUpdateOne) SetNillableAPIKey(s *string) *UserUpdateOne
SetNillableAPIKey sets the api_key field if the given value is not nil.
func (*UserUpdateOne) SetNillableBillingID ¶ added in v0.1.2
func (uuo *UserUpdateOne) SetNillableBillingID(s *string) *UserUpdateOne
SetNillableBillingID sets the billing_id field if the given value is not nil.
func (*UserUpdateOne) SetNillableConfirmationSentAt ¶
func (uuo *UserUpdateOne) SetNillableConfirmationSentAt(t *time.Time) *UserUpdateOne
SetNillableConfirmationSentAt sets the confirmation_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableConfirmationToken ¶
func (uuo *UserUpdateOne) SetNillableConfirmationToken(s *string) *UserUpdateOne
SetNillableConfirmationToken sets the confirmation_token field if the given value is not nil.
func (*UserUpdateOne) SetNillableConfirmed ¶
func (uuo *UserUpdateOne) SetNillableConfirmed(b *bool) *UserUpdateOne
SetNillableConfirmed sets the confirmed field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailChange ¶
func (uuo *UserUpdateOne) SetNillableEmailChange(s *string) *UserUpdateOne
SetNillableEmailChange sets the email_change field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailChangeSentAt ¶
func (uuo *UserUpdateOne) SetNillableEmailChangeSentAt(t *time.Time) *UserUpdateOne
SetNillableEmailChangeSentAt sets the email_change_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailChangeToken ¶
func (uuo *UserUpdateOne) SetNillableEmailChangeToken(s *string) *UserUpdateOne
SetNillableEmailChangeToken sets the email_change_token field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastSigninAt ¶
func (uuo *UserUpdateOne) SetNillableLastSigninAt(t *time.Time) *UserUpdateOne
SetNillableLastSigninAt sets the last_signin_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableOtp ¶
func (uuo *UserUpdateOne) SetNillableOtp(s *string) *UserUpdateOne
SetNillableOtp sets the otp field if the given value is not nil.
func (*UserUpdateOne) SetNillableOtpSentAt ¶
func (uuo *UserUpdateOne) SetNillableOtpSentAt(t *time.Time) *UserUpdateOne
SetNillableOtpSentAt sets the otp_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableRecoverySentAt ¶
func (uuo *UserUpdateOne) SetNillableRecoverySentAt(t *time.Time) *UserUpdateOne
SetNillableRecoverySentAt sets the recovery_sent_at field if the given value is not nil.
func (*UserUpdateOne) SetNillableRecoveryToken ¶
func (uuo *UserUpdateOne) SetNillableRecoveryToken(s *string) *UserUpdateOne
SetNillableRecoveryToken sets the recovery_token field if the given value is not nil.
func (*UserUpdateOne) SetNillableWorkspaceID ¶ added in v0.1.7
func (uuo *UserUpdateOne) SetNillableWorkspaceID(id *uuid.UUID) *UserUpdateOne
SetNillableWorkspaceID sets the workspace edge to Workspace by id if the given value is not nil.
func (*UserUpdateOne) SetOtp ¶
func (uuo *UserUpdateOne) SetOtp(s string) *UserUpdateOne
SetOtp sets the otp field.
func (*UserUpdateOne) SetOtpSentAt ¶
func (uuo *UserUpdateOne) SetOtpSentAt(t time.Time) *UserUpdateOne
SetOtpSentAt sets the otp_sent_at field.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the password field.
func (*UserUpdateOne) SetProvider ¶
func (uuo *UserUpdateOne) SetProvider(s string) *UserUpdateOne
SetProvider sets the provider field.
func (*UserUpdateOne) SetRecoverySentAt ¶
func (uuo *UserUpdateOne) SetRecoverySentAt(t time.Time) *UserUpdateOne
SetRecoverySentAt sets the recovery_sent_at field.
func (*UserUpdateOne) SetRecoveryToken ¶
func (uuo *UserUpdateOne) SetRecoveryToken(s string) *UserUpdateOne
SetRecoveryToken sets the recovery_token field.
func (*UserUpdateOne) SetRoles ¶ added in v0.1.5
func (uuo *UserUpdateOne) SetRoles(s []string) *UserUpdateOne
SetRoles sets the roles field.
func (*UserUpdateOne) SetTeams ¶ added in v0.1.7
func (uuo *UserUpdateOne) SetTeams(m map[string]string) *UserUpdateOne
SetTeams sets the teams field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the updated_at field.
func (*UserUpdateOne) SetWorkspace ¶ added in v0.1.7
func (uuo *UserUpdateOne) SetWorkspace(w *Workspace) *UserUpdateOne
SetWorkspace sets the workspace edge to Workspace.
func (*UserUpdateOne) SetWorkspaceID ¶ added in v0.1.7
func (uuo *UserUpdateOne) SetWorkspaceID(id uuid.UUID) *UserUpdateOne
SetWorkspaceID sets the workspace edge to Workspace by id.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Workspace ¶ added in v0.1.7
type Workspace struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// Plan holds the value of the "plan" field.
Plan string `json:"plan,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,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 WorkspaceQuery when eager-loading is set.
Edges WorkspaceEdges `json:"edges"`
// contains filtered or unexported fields
}
Workspace is the model entity for the Workspace schema.
func (*Workspace) QueryGroups ¶ added in v0.1.7
func (w *Workspace) QueryGroups() *GroupQuery
QueryGroups queries the groups edge of the Workspace.
func (*Workspace) QueryOwner ¶ added in v0.1.7
QueryOwner queries the owner edge of the Workspace.
func (*Workspace) QueryWorkspaceRoles ¶ added in v0.1.7
func (w *Workspace) QueryWorkspaceRoles() *WorkspaceRoleQuery
QueryWorkspaceRoles queries the workspace_roles edge of the Workspace.
func (*Workspace) Unwrap ¶ added in v0.1.7
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 (*Workspace) Update ¶ added in v0.1.7
func (w *Workspace) Update() *WorkspaceUpdateOne
Update returns a builder for updating this Workspace. Note that, you need to call Workspace.Unwrap() before calling this method, if this Workspace was returned from a transaction, and the transaction was committed or rolled back.
type WorkspaceClient ¶ added in v0.1.7
type WorkspaceClient struct {
// contains filtered or unexported fields
}
WorkspaceClient is a client for the Workspace schema.
func NewWorkspaceClient ¶ added in v0.1.7
func NewWorkspaceClient(c config) *WorkspaceClient
NewWorkspaceClient returns a client for the Workspace from the given config.
func (*WorkspaceClient) Create ¶ added in v0.1.7
func (c *WorkspaceClient) Create() *WorkspaceCreate
Create returns a create builder for Workspace.
func (*WorkspaceClient) CreateBulk ¶ added in v0.1.7
func (c *WorkspaceClient) CreateBulk(builders ...*WorkspaceCreate) *WorkspaceCreateBulk
CreateBulk returns a builder for creating a bulk of Workspace entities.
func (*WorkspaceClient) Delete ¶ added in v0.1.7
func (c *WorkspaceClient) Delete() *WorkspaceDelete
Delete returns a delete builder for Workspace.
func (*WorkspaceClient) DeleteOne ¶ added in v0.1.7
func (c *WorkspaceClient) DeleteOne(w *Workspace) *WorkspaceDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*WorkspaceClient) DeleteOneID ¶ added in v0.1.7
func (c *WorkspaceClient) DeleteOneID(id uuid.UUID) *WorkspaceDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*WorkspaceClient) Hooks ¶ added in v0.1.7
func (c *WorkspaceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkspaceClient) Query ¶ added in v0.1.7
func (c *WorkspaceClient) Query() *WorkspaceQuery
Query returns a query builder for Workspace.
func (*WorkspaceClient) QueryGroups ¶ added in v0.1.7
func (c *WorkspaceClient) QueryGroups(w *Workspace) *GroupQuery
QueryGroups queries the groups edge of a Workspace.
func (*WorkspaceClient) QueryOwner ¶ added in v0.1.7
func (c *WorkspaceClient) QueryOwner(w *Workspace) *UserQuery
QueryOwner queries the owner edge of a Workspace.
func (*WorkspaceClient) QueryWorkspaceRoles ¶ added in v0.1.7
func (c *WorkspaceClient) QueryWorkspaceRoles(w *Workspace) *WorkspaceRoleQuery
QueryWorkspaceRoles queries the workspace_roles edge of a Workspace.
func (*WorkspaceClient) Update ¶ added in v0.1.7
func (c *WorkspaceClient) Update() *WorkspaceUpdate
Update returns an update builder for Workspace.
func (*WorkspaceClient) UpdateOne ¶ added in v0.1.7
func (c *WorkspaceClient) UpdateOne(w *Workspace) *WorkspaceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkspaceClient) UpdateOneID ¶ added in v0.1.7
func (c *WorkspaceClient) UpdateOneID(id uuid.UUID) *WorkspaceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkspaceClient) Use ¶ added in v0.1.7
func (c *WorkspaceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workspace.Hooks(f(g(h())))`.
type WorkspaceCreate ¶ added in v0.1.7
type WorkspaceCreate struct {
// contains filtered or unexported fields
}
WorkspaceCreate is the builder for creating a Workspace entity.
func (*WorkspaceCreate) AddGroupIDs ¶ added in v0.1.7
func (wc *WorkspaceCreate) AddGroupIDs(ids ...uuid.UUID) *WorkspaceCreate
AddGroupIDs adds the groups edge to Group by ids.
func (*WorkspaceCreate) AddGroups ¶ added in v0.1.7
func (wc *WorkspaceCreate) AddGroups(g ...*Group) *WorkspaceCreate
AddGroups adds the groups edges to Group.
func (*WorkspaceCreate) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (wc *WorkspaceCreate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceCreate
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceCreate) AddWorkspaceRoles ¶ added in v0.1.7
func (wc *WorkspaceCreate) AddWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceCreate
AddWorkspaceRoles adds the workspace_roles edges to WorkspaceRole.
func (*WorkspaceCreate) Mutation ¶ added in v0.1.7
func (wc *WorkspaceCreate) Mutation() *WorkspaceMutation
Mutation returns the WorkspaceMutation object of the builder.
func (*WorkspaceCreate) Save ¶ added in v0.1.7
func (wc *WorkspaceCreate) Save(ctx context.Context) (*Workspace, error)
Save creates the Workspace in the database.
func (*WorkspaceCreate) SaveX ¶ added in v0.1.7
func (wc *WorkspaceCreate) SaveX(ctx context.Context) *Workspace
SaveX calls Save and panics if Save returns an error.
func (*WorkspaceCreate) SetCreatedAt ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetCreatedAt(t time.Time) *WorkspaceCreate
SetCreatedAt sets the created_at field.
func (*WorkspaceCreate) SetDescription ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetDescription(s string) *WorkspaceCreate
SetDescription sets the description field.
func (*WorkspaceCreate) SetID ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetID(u uuid.UUID) *WorkspaceCreate
SetID sets the id field.
func (*WorkspaceCreate) SetMetadata ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetMetadata(m map[string]interface{}) *WorkspaceCreate
SetMetadata sets the metadata field.
func (*WorkspaceCreate) SetName ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetName(s string) *WorkspaceCreate
SetName sets the name field.
func (*WorkspaceCreate) SetNillableCreatedAt ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetNillableCreatedAt(t *time.Time) *WorkspaceCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*WorkspaceCreate) SetNillableDescription ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetNillableDescription(s *string) *WorkspaceCreate
SetNillableDescription sets the description field if the given value is not nil.
func (*WorkspaceCreate) SetNillableUpdatedAt ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetNillableUpdatedAt(t *time.Time) *WorkspaceCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*WorkspaceCreate) SetOwner ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetOwner(u *User) *WorkspaceCreate
SetOwner sets the owner edge to User.
func (*WorkspaceCreate) SetOwnerID ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetOwnerID(id uuid.UUID) *WorkspaceCreate
SetOwnerID sets the owner edge to User by id.
func (*WorkspaceCreate) SetPlan ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetPlan(s string) *WorkspaceCreate
SetPlan sets the plan field.
func (*WorkspaceCreate) SetUpdatedAt ¶ added in v0.1.7
func (wc *WorkspaceCreate) SetUpdatedAt(t time.Time) *WorkspaceCreate
SetUpdatedAt sets the updated_at field.
type WorkspaceCreateBulk ¶ added in v0.1.7
type WorkspaceCreateBulk struct {
// contains filtered or unexported fields
}
WorkspaceCreateBulk is the builder for creating a bulk of Workspace entities.
type WorkspaceDelete ¶ added in v0.1.7
type WorkspaceDelete struct {
// contains filtered or unexported fields
}
WorkspaceDelete is the builder for deleting a Workspace entity.
func (*WorkspaceDelete) Exec ¶ added in v0.1.7
func (wd *WorkspaceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkspaceDelete) ExecX ¶ added in v0.1.7
func (wd *WorkspaceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkspaceDelete) Where ¶ added in v0.1.7
func (wd *WorkspaceDelete) Where(ps ...predicate.Workspace) *WorkspaceDelete
Where adds a new predicate to the delete builder.
type WorkspaceDeleteOne ¶ added in v0.1.7
type WorkspaceDeleteOne struct {
// contains filtered or unexported fields
}
WorkspaceDeleteOne is the builder for deleting a single Workspace entity.
func (*WorkspaceDeleteOne) Exec ¶ added in v0.1.7
func (wdo *WorkspaceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkspaceDeleteOne) ExecX ¶ added in v0.1.7
func (wdo *WorkspaceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WorkspaceEdges ¶ added in v0.1.7
type WorkspaceEdges struct {
// Owner holds the value of the owner edge.
Owner *User
// WorkspaceRoles holds the value of the workspace_roles edge.
WorkspaceRoles []*WorkspaceRole
// Groups holds the value of the groups edge.
Groups []*Group
// contains filtered or unexported fields
}
WorkspaceEdges holds the relations/edges for other nodes in the graph.
func (WorkspaceEdges) GroupsOrErr ¶ added in v0.1.7
func (e WorkspaceEdges) GroupsOrErr() ([]*Group, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (WorkspaceEdges) OwnerOrErr ¶ added in v0.1.7
func (e WorkspaceEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (WorkspaceEdges) WorkspaceRolesOrErr ¶ added in v0.1.7
func (e WorkspaceEdges) WorkspaceRolesOrErr() ([]*WorkspaceRole, error)
WorkspaceRolesOrErr returns the WorkspaceRoles value or an error if the edge was not loaded in eager-loading.
type WorkspaceGroupBy ¶ added in v0.1.7
type WorkspaceGroupBy struct {
// contains filtered or unexported fields
}
WorkspaceGroupBy is the builder for group-by Workspace entities.
func (*WorkspaceGroupBy) Aggregate ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Aggregate(fns ...AggregateFunc) *WorkspaceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkspaceGroupBy) Bool ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceGroupBy) BoolX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*WorkspaceGroupBy) Bools ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) 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 (*WorkspaceGroupBy) BoolsX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*WorkspaceGroupBy) Float64 ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceGroupBy) Float64X ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*WorkspaceGroupBy) Float64s ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) 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 (*WorkspaceGroupBy) Float64sX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkspaceGroupBy) Int ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceGroupBy) IntX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*WorkspaceGroupBy) Ints ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) 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 (*WorkspaceGroupBy) IntsX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*WorkspaceGroupBy) Scan ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*WorkspaceGroupBy) ScanX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*WorkspaceGroupBy) String ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceGroupBy) StringX ¶ added in v0.1.7
func (wgb *WorkspaceGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type WorkspaceMutation ¶ added in v0.1.7
type WorkspaceMutation struct {
// contains filtered or unexported fields
}
WorkspaceMutation represents an operation that mutate the Workspaces nodes in the graph.
func (*WorkspaceMutation) AddField ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) AddGroupIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) AddGroupIDs(ids ...uuid.UUID)
AddGroupIDs adds the groups edge to Group by ids.
func (*WorkspaceMutation) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) AddWorkspaceRoleIDs(ids ...uuid.UUID)
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceMutation) AddedEdges ¶ added in v0.1.7
func (m *WorkspaceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkspaceMutation) AddedField ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) AddedFields ¶ added in v0.1.7
func (m *WorkspaceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*WorkspaceMutation) AddedIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*WorkspaceMutation) ClearDescription ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearDescription()
ClearDescription clears the value of description.
func (*WorkspaceMutation) ClearEdge ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) ClearField ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) ClearGroups ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearGroups()
ClearGroups clears the groups edge to Group.
func (*WorkspaceMutation) ClearMetadata ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*WorkspaceMutation) ClearOwner ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearOwner()
ClearOwner clears the owner edge to User.
func (*WorkspaceMutation) ClearWorkspaceRoles ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearWorkspaceRoles()
ClearWorkspaceRoles clears the workspace_roles edge to WorkspaceRole.
func (*WorkspaceMutation) ClearedEdges ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkspaceMutation) ClearedFields ¶ added in v0.1.7
func (m *WorkspaceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkspaceMutation) Client ¶ added in v0.1.7
func (m WorkspaceMutation) 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 (*WorkspaceMutation) CreatedAt ¶ added in v0.1.7
func (m *WorkspaceMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*WorkspaceMutation) Description ¶ added in v0.1.7
func (m *WorkspaceMutation) Description() (r string, exists bool)
Description returns the description value in the mutation.
func (*WorkspaceMutation) DescriptionCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) DescriptionCleared() bool
DescriptionCleared returns if the field description was cleared in this mutation.
func (*WorkspaceMutation) EdgeCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*WorkspaceMutation) Field ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) FieldCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*WorkspaceMutation) Fields ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) GroupsCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) GroupsCleared() bool
GroupsCleared returns if the edge groups was cleared.
func (*WorkspaceMutation) GroupsIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) GroupsIDs() (ids []uuid.UUID)
GroupsIDs returns the groups ids in the mutation.
func (*WorkspaceMutation) ID ¶ added in v0.1.7
func (m *WorkspaceMutation) ID() (id uuid.UUID, 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 (*WorkspaceMutation) Metadata ¶ added in v0.1.7
func (m *WorkspaceMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*WorkspaceMutation) MetadataCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*WorkspaceMutation) Name ¶ added in v0.1.7
func (m *WorkspaceMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*WorkspaceMutation) OldCreatedAt ¶ added in v0.1.7
OldCreatedAt returns the old created_at value of the Workspace. If the Workspace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceMutation) OldDescription ¶ added in v0.1.7
func (m *WorkspaceMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old description value of the Workspace. If the Workspace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceMutation) OldField ¶ added in v0.1.7
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*WorkspaceMutation) OldMetadata ¶ added in v0.1.7
func (m *WorkspaceMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the Workspace. If the Workspace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceMutation) OldName ¶ added in v0.1.7
func (m *WorkspaceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the Workspace. If the Workspace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceMutation) OldPlan ¶ added in v0.1.7
func (m *WorkspaceMutation) OldPlan(ctx context.Context) (v string, err error)
OldPlan returns the old plan value of the Workspace. If the Workspace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceMutation) OldUpdatedAt ¶ added in v0.1.7
OldUpdatedAt returns the old updated_at value of the Workspace. If the Workspace object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceMutation) Op ¶ added in v0.1.7
func (m *WorkspaceMutation) Op() Op
Op returns the operation name.
func (*WorkspaceMutation) OwnerCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) OwnerCleared() bool
OwnerCleared returns if the edge owner was cleared.
func (*WorkspaceMutation) OwnerID ¶ added in v0.1.7
func (m *WorkspaceMutation) OwnerID() (id uuid.UUID, exists bool)
OwnerID returns the owner id in the mutation.
func (*WorkspaceMutation) OwnerIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) OwnerIDs() (ids []uuid.UUID)
OwnerIDs returns the owner ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*WorkspaceMutation) Plan ¶ added in v0.1.7
func (m *WorkspaceMutation) Plan() (r string, exists bool)
Plan returns the plan value in the mutation.
func (*WorkspaceMutation) RemoveGroupIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) RemoveGroupIDs(ids ...uuid.UUID)
RemoveGroupIDs removes the groups edge to Group by ids.
func (*WorkspaceMutation) RemoveWorkspaceRoleIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) RemoveWorkspaceRoleIDs(ids ...uuid.UUID)
RemoveWorkspaceRoleIDs removes the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceMutation) RemovedEdges ¶ added in v0.1.7
func (m *WorkspaceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkspaceMutation) RemovedGroupsIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) RemovedGroupsIDs() (ids []uuid.UUID)
RemovedGroups returns the removed ids of groups.
func (*WorkspaceMutation) RemovedIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*WorkspaceMutation) RemovedWorkspaceRolesIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) RemovedWorkspaceRolesIDs() (ids []uuid.UUID)
RemovedWorkspaceRoles returns the removed ids of workspace_roles.
func (*WorkspaceMutation) ResetCreatedAt ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*WorkspaceMutation) ResetDescription ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetDescription()
ResetDescription reset all changes of the "description" field.
func (*WorkspaceMutation) ResetEdge ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) ResetField ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) ResetGroups ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetGroups()
ResetGroups reset all changes of the "groups" edge.
func (*WorkspaceMutation) ResetMetadata ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*WorkspaceMutation) ResetName ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*WorkspaceMutation) ResetOwner ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetOwner()
ResetOwner reset all changes of the "owner" edge.
func (*WorkspaceMutation) ResetPlan ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetPlan()
ResetPlan reset all changes of the "plan" field.
func (*WorkspaceMutation) ResetUpdatedAt ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*WorkspaceMutation) ResetWorkspaceRoles ¶ added in v0.1.7
func (m *WorkspaceMutation) ResetWorkspaceRoles()
ResetWorkspaceRoles reset all changes of the "workspace_roles" edge.
func (*WorkspaceMutation) SetCreatedAt ¶ added in v0.1.7
func (m *WorkspaceMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*WorkspaceMutation) SetDescription ¶ added in v0.1.7
func (m *WorkspaceMutation) SetDescription(s string)
SetDescription sets the description field.
func (*WorkspaceMutation) SetField ¶ added in v0.1.7
func (m *WorkspaceMutation) 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 (*WorkspaceMutation) SetID ¶ added in v0.1.7
func (m *WorkspaceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on Workspace creation.
func (*WorkspaceMutation) SetMetadata ¶ added in v0.1.7
func (m *WorkspaceMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*WorkspaceMutation) SetName ¶ added in v0.1.7
func (m *WorkspaceMutation) SetName(s string)
SetName sets the name field.
func (*WorkspaceMutation) SetOwnerID ¶ added in v0.1.7
func (m *WorkspaceMutation) SetOwnerID(id uuid.UUID)
SetOwnerID sets the owner edge to User by id.
func (*WorkspaceMutation) SetPlan ¶ added in v0.1.7
func (m *WorkspaceMutation) SetPlan(s string)
SetPlan sets the plan field.
func (*WorkspaceMutation) SetUpdatedAt ¶ added in v0.1.7
func (m *WorkspaceMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (WorkspaceMutation) Tx ¶ added in v0.1.7
func (m WorkspaceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkspaceMutation) Type ¶ added in v0.1.7
func (m *WorkspaceMutation) Type() string
Type returns the node type of this mutation (Workspace).
func (*WorkspaceMutation) UpdatedAt ¶ added in v0.1.7
func (m *WorkspaceMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*WorkspaceMutation) WorkspaceRolesCleared ¶ added in v0.1.7
func (m *WorkspaceMutation) WorkspaceRolesCleared() bool
WorkspaceRolesCleared returns if the edge workspace_roles was cleared.
func (*WorkspaceMutation) WorkspaceRolesIDs ¶ added in v0.1.7
func (m *WorkspaceMutation) WorkspaceRolesIDs() (ids []uuid.UUID)
WorkspaceRolesIDs returns the workspace_roles ids in the mutation.
type WorkspaceQuery ¶ added in v0.1.7
type WorkspaceQuery struct {
// contains filtered or unexported fields
}
WorkspaceQuery is the builder for querying Workspace entities.
func (*WorkspaceQuery) All ¶ added in v0.1.7
func (wq *WorkspaceQuery) All(ctx context.Context) ([]*Workspace, error)
All executes the query and returns a list of Workspaces.
func (*WorkspaceQuery) AllX ¶ added in v0.1.7
func (wq *WorkspaceQuery) AllX(ctx context.Context) []*Workspace
AllX is like All, but panics if an error occurs.
func (*WorkspaceQuery) Clone ¶ added in v0.1.7
func (wq *WorkspaceQuery) Clone() *WorkspaceQuery
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 (*WorkspaceQuery) Count ¶ added in v0.1.7
func (wq *WorkspaceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkspaceQuery) CountX ¶ added in v0.1.7
func (wq *WorkspaceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkspaceQuery) Exist ¶ added in v0.1.7
func (wq *WorkspaceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkspaceQuery) ExistX ¶ added in v0.1.7
func (wq *WorkspaceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkspaceQuery) First ¶ added in v0.1.7
func (wq *WorkspaceQuery) First(ctx context.Context) (*Workspace, error)
First returns the first Workspace entity in the query. Returns *NotFoundError when no workspace was found.
func (*WorkspaceQuery) FirstID ¶ added in v0.1.7
FirstID returns the first Workspace id in the query. Returns *NotFoundError when no id was found.
func (*WorkspaceQuery) FirstIDX ¶ added in v0.1.7
func (wq *WorkspaceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkspaceQuery) FirstX ¶ added in v0.1.7
func (wq *WorkspaceQuery) FirstX(ctx context.Context) *Workspace
FirstX is like First, but panics if an error occurs.
func (*WorkspaceQuery) GroupBy ¶ added in v0.1.7
func (wq *WorkspaceQuery) GroupBy(field string, fields ...string) *WorkspaceGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.Workspace.Query().
GroupBy(workspace.FieldName).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*WorkspaceQuery) IDs ¶ added in v0.1.7
IDs executes the query and returns a list of Workspace ids.
func (*WorkspaceQuery) IDsX ¶ added in v0.1.7
func (wq *WorkspaceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*WorkspaceQuery) Limit ¶ added in v0.1.7
func (wq *WorkspaceQuery) Limit(limit int) *WorkspaceQuery
Limit adds a limit step to the query.
func (*WorkspaceQuery) Offset ¶ added in v0.1.7
func (wq *WorkspaceQuery) Offset(offset int) *WorkspaceQuery
Offset adds an offset step to the query.
func (*WorkspaceQuery) Only ¶ added in v0.1.7
func (wq *WorkspaceQuery) Only(ctx context.Context) (*Workspace, error)
Only returns the only Workspace entity in the query, returns an error if not exactly one entity was returned.
func (*WorkspaceQuery) OnlyID ¶ added in v0.1.7
OnlyID returns the only Workspace id in the query, returns an error if not exactly one id was returned.
func (*WorkspaceQuery) OnlyIDX ¶ added in v0.1.7
func (wq *WorkspaceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkspaceQuery) OnlyX ¶ added in v0.1.7
func (wq *WorkspaceQuery) OnlyX(ctx context.Context) *Workspace
OnlyX is like Only, but panics if an error occurs.
func (*WorkspaceQuery) Order ¶ added in v0.1.7
func (wq *WorkspaceQuery) Order(o ...OrderFunc) *WorkspaceQuery
Order adds an order step to the query.
func (*WorkspaceQuery) QueryGroups ¶ added in v0.1.7
func (wq *WorkspaceQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the groups edge.
func (*WorkspaceQuery) QueryOwner ¶ added in v0.1.7
func (wq *WorkspaceQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the owner edge.
func (*WorkspaceQuery) QueryWorkspaceRoles ¶ added in v0.1.7
func (wq *WorkspaceQuery) QueryWorkspaceRoles() *WorkspaceRoleQuery
QueryWorkspaceRoles chains the current query on the workspace_roles edge.
func (*WorkspaceQuery) Select ¶ added in v0.1.7
func (wq *WorkspaceQuery) Select(field string, fields ...string) *WorkspaceSelect
Select one or more fields from the given query.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.Workspace.Query().
Select(workspace.FieldName).
Scan(ctx, &v)
func (*WorkspaceQuery) Where ¶ added in v0.1.7
func (wq *WorkspaceQuery) Where(ps ...predicate.Workspace) *WorkspaceQuery
Where adds a new predicate for the builder.
func (*WorkspaceQuery) WithGroups ¶ added in v0.1.7
func (wq *WorkspaceQuery) WithGroups(opts ...func(*GroupQuery)) *WorkspaceQuery
WithGroups tells the query-builder to eager-loads the nodes that are connected to
the "groups" edge. The optional arguments used to configure the query builder of the edge.
func (*WorkspaceQuery) WithOwner ¶ added in v0.1.7
func (wq *WorkspaceQuery) WithOwner(opts ...func(*UserQuery)) *WorkspaceQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to
the "owner" edge. The optional arguments used to configure the query builder of the edge.
func (*WorkspaceQuery) WithWorkspaceRoles ¶ added in v0.1.7
func (wq *WorkspaceQuery) WithWorkspaceRoles(opts ...func(*WorkspaceRoleQuery)) *WorkspaceQuery
WithWorkspaceRoles tells the query-builder to eager-loads the nodes that are connected to
the "workspace_roles" edge. The optional arguments used to configure the query builder of the edge.
type WorkspaceRole ¶ added in v0.1.7
type WorkspaceRole struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Name holds the value of the "name" field.
Name string `json:"name,omitempty"`
// WorkspaceID holds the value of the "workspace_id" field.
WorkspaceID uuid.UUID `json:"workspace_id,omitempty"`
// UserID holds the value of the "user_id" field.
UserID uuid.UUID `json:"user_id,omitempty"`
// Metadata holds the value of the "metadata" field.
Metadata map[string]interface{} `json:"metadata,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 WorkspaceRoleQuery when eager-loading is set.
Edges WorkspaceRoleEdges `json:"edges"`
// contains filtered or unexported fields
}
WorkspaceRole is the model entity for the WorkspaceRole schema.
func (*WorkspaceRole) QueryUsers ¶ added in v0.1.7
func (wr *WorkspaceRole) QueryUsers() *UserQuery
QueryUsers queries the users edge of the WorkspaceRole.
func (*WorkspaceRole) QueryWorkspaces ¶ added in v0.1.7
func (wr *WorkspaceRole) QueryWorkspaces() *WorkspaceQuery
QueryWorkspaces queries the workspaces edge of the WorkspaceRole.
func (*WorkspaceRole) String ¶ added in v0.1.7
func (wr *WorkspaceRole) String() string
String implements the fmt.Stringer.
func (*WorkspaceRole) Unwrap ¶ added in v0.1.7
func (wr *WorkspaceRole) Unwrap() *WorkspaceRole
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 (*WorkspaceRole) Update ¶ added in v0.1.7
func (wr *WorkspaceRole) Update() *WorkspaceRoleUpdateOne
Update returns a builder for updating this WorkspaceRole. Note that, you need to call WorkspaceRole.Unwrap() before calling this method, if this WorkspaceRole was returned from a transaction, and the transaction was committed or rolled back.
type WorkspaceRoleClient ¶ added in v0.1.7
type WorkspaceRoleClient struct {
// contains filtered or unexported fields
}
WorkspaceRoleClient is a client for the WorkspaceRole schema.
func NewWorkspaceRoleClient ¶ added in v0.1.7
func NewWorkspaceRoleClient(c config) *WorkspaceRoleClient
NewWorkspaceRoleClient returns a client for the WorkspaceRole from the given config.
func (*WorkspaceRoleClient) Create ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Create() *WorkspaceRoleCreate
Create returns a create builder for WorkspaceRole.
func (*WorkspaceRoleClient) CreateBulk ¶ added in v0.1.7
func (c *WorkspaceRoleClient) CreateBulk(builders ...*WorkspaceRoleCreate) *WorkspaceRoleCreateBulk
CreateBulk returns a builder for creating a bulk of WorkspaceRole entities.
func (*WorkspaceRoleClient) Delete ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Delete() *WorkspaceRoleDelete
Delete returns a delete builder for WorkspaceRole.
func (*WorkspaceRoleClient) DeleteOne ¶ added in v0.1.7
func (c *WorkspaceRoleClient) DeleteOne(wr *WorkspaceRole) *WorkspaceRoleDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*WorkspaceRoleClient) DeleteOneID ¶ added in v0.1.7
func (c *WorkspaceRoleClient) DeleteOneID(id uuid.UUID) *WorkspaceRoleDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*WorkspaceRoleClient) Get ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Get(ctx context.Context, id uuid.UUID) (*WorkspaceRole, error)
Get returns a WorkspaceRole entity by its id.
func (*WorkspaceRoleClient) GetX ¶ added in v0.1.7
func (c *WorkspaceRoleClient) GetX(ctx context.Context, id uuid.UUID) *WorkspaceRole
GetX is like Get, but panics if an error occurs.
func (*WorkspaceRoleClient) Hooks ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkspaceRoleClient) Query ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Query() *WorkspaceRoleQuery
Query returns a query builder for WorkspaceRole.
func (*WorkspaceRoleClient) QueryUsers ¶ added in v0.1.7
func (c *WorkspaceRoleClient) QueryUsers(wr *WorkspaceRole) *UserQuery
QueryUsers queries the users edge of a WorkspaceRole.
func (*WorkspaceRoleClient) QueryWorkspaces ¶ added in v0.1.7
func (c *WorkspaceRoleClient) QueryWorkspaces(wr *WorkspaceRole) *WorkspaceQuery
QueryWorkspaces queries the workspaces edge of a WorkspaceRole.
func (*WorkspaceRoleClient) Update ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Update() *WorkspaceRoleUpdate
Update returns an update builder for WorkspaceRole.
func (*WorkspaceRoleClient) UpdateOne ¶ added in v0.1.7
func (c *WorkspaceRoleClient) UpdateOne(wr *WorkspaceRole) *WorkspaceRoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkspaceRoleClient) UpdateOneID ¶ added in v0.1.7
func (c *WorkspaceRoleClient) UpdateOneID(id uuid.UUID) *WorkspaceRoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkspaceRoleClient) Use ¶ added in v0.1.7
func (c *WorkspaceRoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workspacerole.Hooks(f(g(h())))`.
type WorkspaceRoleCreate ¶ added in v0.1.7
type WorkspaceRoleCreate struct {
// contains filtered or unexported fields
}
WorkspaceRoleCreate is the builder for creating a WorkspaceRole entity.
func (*WorkspaceRoleCreate) Mutation ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) Mutation() *WorkspaceRoleMutation
Mutation returns the WorkspaceRoleMutation object of the builder.
func (*WorkspaceRoleCreate) Save ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) Save(ctx context.Context) (*WorkspaceRole, error)
Save creates the WorkspaceRole in the database.
func (*WorkspaceRoleCreate) SaveX ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SaveX(ctx context.Context) *WorkspaceRole
SaveX calls Save and panics if Save returns an error.
func (*WorkspaceRoleCreate) SetCreatedAt ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetCreatedAt(t time.Time) *WorkspaceRoleCreate
SetCreatedAt sets the created_at field.
func (*WorkspaceRoleCreate) SetID ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetID(u uuid.UUID) *WorkspaceRoleCreate
SetID sets the id field.
func (*WorkspaceRoleCreate) SetMetadata ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetMetadata(m map[string]interface{}) *WorkspaceRoleCreate
SetMetadata sets the metadata field.
func (*WorkspaceRoleCreate) SetName ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetName(s string) *WorkspaceRoleCreate
SetName sets the name field.
func (*WorkspaceRoleCreate) SetNillableCreatedAt ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetNillableCreatedAt(t *time.Time) *WorkspaceRoleCreate
SetNillableCreatedAt sets the created_at field if the given value is not nil.
func (*WorkspaceRoleCreate) SetNillableUpdatedAt ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetNillableUpdatedAt(t *time.Time) *WorkspaceRoleCreate
SetNillableUpdatedAt sets the updated_at field if the given value is not nil.
func (*WorkspaceRoleCreate) SetUpdatedAt ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetUpdatedAt(t time.Time) *WorkspaceRoleCreate
SetUpdatedAt sets the updated_at field.
func (*WorkspaceRoleCreate) SetUserID ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetUserID(u uuid.UUID) *WorkspaceRoleCreate
SetUserID sets the user_id field.
func (*WorkspaceRoleCreate) SetUsers ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetUsers(u *User) *WorkspaceRoleCreate
SetUsers sets the users edge to User.
func (*WorkspaceRoleCreate) SetUsersID ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetUsersID(id uuid.UUID) *WorkspaceRoleCreate
SetUsersID sets the users edge to User by id.
func (*WorkspaceRoleCreate) SetWorkspaceID ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetWorkspaceID(u uuid.UUID) *WorkspaceRoleCreate
SetWorkspaceID sets the workspace_id field.
func (*WorkspaceRoleCreate) SetWorkspaces ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetWorkspaces(w *Workspace) *WorkspaceRoleCreate
SetWorkspaces sets the workspaces edge to Workspace.
func (*WorkspaceRoleCreate) SetWorkspacesID ¶ added in v0.1.7
func (wrc *WorkspaceRoleCreate) SetWorkspacesID(id uuid.UUID) *WorkspaceRoleCreate
SetWorkspacesID sets the workspaces edge to Workspace by id.
type WorkspaceRoleCreateBulk ¶ added in v0.1.7
type WorkspaceRoleCreateBulk struct {
// contains filtered or unexported fields
}
WorkspaceRoleCreateBulk is the builder for creating a bulk of WorkspaceRole entities.
func (*WorkspaceRoleCreateBulk) Save ¶ added in v0.1.7
func (wrcb *WorkspaceRoleCreateBulk) Save(ctx context.Context) ([]*WorkspaceRole, error)
Save creates the WorkspaceRole entities in the database.
func (*WorkspaceRoleCreateBulk) SaveX ¶ added in v0.1.7
func (wrcb *WorkspaceRoleCreateBulk) SaveX(ctx context.Context) []*WorkspaceRole
SaveX calls Save and panics if Save returns an error.
type WorkspaceRoleDelete ¶ added in v0.1.7
type WorkspaceRoleDelete struct {
// contains filtered or unexported fields
}
WorkspaceRoleDelete is the builder for deleting a WorkspaceRole entity.
func (*WorkspaceRoleDelete) Exec ¶ added in v0.1.7
func (wrd *WorkspaceRoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkspaceRoleDelete) ExecX ¶ added in v0.1.7
func (wrd *WorkspaceRoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkspaceRoleDelete) Where ¶ added in v0.1.7
func (wrd *WorkspaceRoleDelete) Where(ps ...predicate.WorkspaceRole) *WorkspaceRoleDelete
Where adds a new predicate to the delete builder.
type WorkspaceRoleDeleteOne ¶ added in v0.1.7
type WorkspaceRoleDeleteOne struct {
// contains filtered or unexported fields
}
WorkspaceRoleDeleteOne is the builder for deleting a single WorkspaceRole entity.
func (*WorkspaceRoleDeleteOne) Exec ¶ added in v0.1.7
func (wrdo *WorkspaceRoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkspaceRoleDeleteOne) ExecX ¶ added in v0.1.7
func (wrdo *WorkspaceRoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type WorkspaceRoleEdges ¶ added in v0.1.7
type WorkspaceRoleEdges struct {
// Workspaces holds the value of the workspaces edge.
Workspaces *Workspace
// Users holds the value of the users edge.
Users *User
// contains filtered or unexported fields
}
WorkspaceRoleEdges holds the relations/edges for other nodes in the graph.
func (WorkspaceRoleEdges) UsersOrErr ¶ added in v0.1.7
func (e WorkspaceRoleEdges) UsersOrErr() (*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (WorkspaceRoleEdges) WorkspacesOrErr ¶ added in v0.1.7
func (e WorkspaceRoleEdges) WorkspacesOrErr() (*Workspace, error)
WorkspacesOrErr returns the Workspaces value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type WorkspaceRoleGroupBy ¶ added in v0.1.7
type WorkspaceRoleGroupBy struct {
// contains filtered or unexported fields
}
WorkspaceRoleGroupBy is the builder for group-by WorkspaceRole entities.
func (*WorkspaceRoleGroupBy) Aggregate ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Aggregate(fns ...AggregateFunc) *WorkspaceRoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkspaceRoleGroupBy) Bool ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceRoleGroupBy) BoolX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) Bools ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) 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 (*WorkspaceRoleGroupBy) BoolsX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) Float64 ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceRoleGroupBy) Float64X ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) Float64s ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) 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 (*WorkspaceRoleGroupBy) Float64sX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) Int ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceRoleGroupBy) IntX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) Ints ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) 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 (*WorkspaceRoleGroupBy) IntsX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) Scan ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*WorkspaceRoleGroupBy) ScanX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*WorkspaceRoleGroupBy) String ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from group-by. It is only allowed when querying group-by with one field.
func (*WorkspaceRoleGroupBy) StringX ¶ added in v0.1.7
func (wrgb *WorkspaceRoleGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type WorkspaceRoleMutation ¶ added in v0.1.7
type WorkspaceRoleMutation struct {
// contains filtered or unexported fields
}
WorkspaceRoleMutation represents an operation that mutate the WorkspaceRoles nodes in the graph.
func (*WorkspaceRoleMutation) AddField ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) AddedEdges ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkspaceRoleMutation) AddedField ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) AddedFields ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented or decremented during this mutation.
func (*WorkspaceRoleMutation) AddedIDs ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all ids (to other nodes) that were added for the given edge name.
func (*WorkspaceRoleMutation) ClearEdge ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) ClearField ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) ClearMetadata ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ClearMetadata()
ClearMetadata clears the value of metadata.
func (*WorkspaceRoleMutation) ClearUsers ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ClearUsers()
ClearUsers clears the users edge to User.
func (*WorkspaceRoleMutation) ClearWorkspaces ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ClearWorkspaces()
ClearWorkspaces clears the workspaces edge to Workspace.
func (*WorkspaceRoleMutation) ClearedEdges ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkspaceRoleMutation) ClearedFields ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkspaceRoleMutation) Client ¶ added in v0.1.7
func (m WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) CreatedAt ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the created_at value in the mutation.
func (*WorkspaceRoleMutation) EdgeCleared ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean indicates if this edge was cleared in this mutation.
func (*WorkspaceRoleMutation) Field ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) FieldCleared ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicates if this field was cleared in this mutation.
func (*WorkspaceRoleMutation) Fields ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) ID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ID() (id uuid.UUID, 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 (*WorkspaceRoleMutation) Metadata ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) Metadata() (r map[string]interface{}, exists bool)
Metadata returns the metadata value in the mutation.
func (*WorkspaceRoleMutation) MetadataCleared ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) MetadataCleared() bool
MetadataCleared returns if the field metadata was cleared in this mutation.
func (*WorkspaceRoleMutation) Name ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) Name() (r string, exists bool)
Name returns the name value in the mutation.
func (*WorkspaceRoleMutation) OldCreatedAt ¶ added in v0.1.7
OldCreatedAt returns the old created_at value of the WorkspaceRole. If the WorkspaceRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceRoleMutation) OldField ¶ added in v0.1.7
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database was failed.
func (*WorkspaceRoleMutation) OldMetadata ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) OldMetadata(ctx context.Context) (v map[string]interface{}, err error)
OldMetadata returns the old metadata value of the WorkspaceRole. If the WorkspaceRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceRoleMutation) OldName ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old name value of the WorkspaceRole. If the WorkspaceRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceRoleMutation) OldUpdatedAt ¶ added in v0.1.7
OldUpdatedAt returns the old updated_at value of the WorkspaceRole. If the WorkspaceRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceRoleMutation) OldUserID ¶ added in v0.1.7
OldUserID returns the old user_id value of the WorkspaceRole. If the WorkspaceRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceRoleMutation) OldWorkspaceID ¶ added in v0.1.7
OldWorkspaceID returns the old workspace_id value of the WorkspaceRole. If the WorkspaceRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or database query fails.
func (*WorkspaceRoleMutation) Op ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) Op() Op
Op returns the operation name.
func (*WorkspaceRoleMutation) RemovedEdges ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkspaceRoleMutation) RemovedIDs ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all ids (to other nodes) that were removed for the given edge name.
func (*WorkspaceRoleMutation) ResetCreatedAt ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetCreatedAt()
ResetCreatedAt reset all changes of the "created_at" field.
func (*WorkspaceRoleMutation) ResetEdge ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) ResetField ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) ResetMetadata ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetMetadata()
ResetMetadata reset all changes of the "metadata" field.
func (*WorkspaceRoleMutation) ResetName ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetName()
ResetName reset all changes of the "name" field.
func (*WorkspaceRoleMutation) ResetUpdatedAt ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetUpdatedAt()
ResetUpdatedAt reset all changes of the "updated_at" field.
func (*WorkspaceRoleMutation) ResetUserID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetUserID()
ResetUserID reset all changes of the "user_id" field.
func (*WorkspaceRoleMutation) ResetUsers ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetUsers()
ResetUsers reset all changes of the "users" edge.
func (*WorkspaceRoleMutation) ResetWorkspaceID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetWorkspaceID()
ResetWorkspaceID reset all changes of the "workspace_id" field.
func (*WorkspaceRoleMutation) ResetWorkspaces ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) ResetWorkspaces()
ResetWorkspaces reset all changes of the "workspaces" edge.
func (*WorkspaceRoleMutation) SetCreatedAt ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the created_at field.
func (*WorkspaceRoleMutation) SetField ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) 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 (*WorkspaceRoleMutation) SetID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that, this operation is accepted only on WorkspaceRole creation.
func (*WorkspaceRoleMutation) SetMetadata ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetMetadata(value map[string]interface{})
SetMetadata sets the metadata field.
func (*WorkspaceRoleMutation) SetName ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetName(s string)
SetName sets the name field.
func (*WorkspaceRoleMutation) SetUpdatedAt ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the updated_at field.
func (*WorkspaceRoleMutation) SetUserID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetUserID(u uuid.UUID)
SetUserID sets the user_id field.
func (*WorkspaceRoleMutation) SetUsersID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetUsersID(id uuid.UUID)
SetUsersID sets the users edge to User by id.
func (*WorkspaceRoleMutation) SetWorkspaceID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetWorkspaceID(u uuid.UUID)
SetWorkspaceID sets the workspace_id field.
func (*WorkspaceRoleMutation) SetWorkspacesID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) SetWorkspacesID(id uuid.UUID)
SetWorkspacesID sets the workspaces edge to Workspace by id.
func (WorkspaceRoleMutation) Tx ¶ added in v0.1.7
func (m WorkspaceRoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkspaceRoleMutation) Type ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) Type() string
Type returns the node type of this mutation (WorkspaceRole).
func (*WorkspaceRoleMutation) UpdatedAt ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the updated_at value in the mutation.
func (*WorkspaceRoleMutation) UserID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the user_id value in the mutation.
func (*WorkspaceRoleMutation) UsersCleared ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) UsersCleared() bool
UsersCleared returns if the edge users was cleared.
func (*WorkspaceRoleMutation) UsersID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) UsersID() (id uuid.UUID, exists bool)
UsersID returns the users id in the mutation.
func (*WorkspaceRoleMutation) UsersIDs ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the users ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use UsersID instead. It exists only for internal usage by the builders.
func (*WorkspaceRoleMutation) WorkspaceID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) WorkspaceID() (r uuid.UUID, exists bool)
WorkspaceID returns the workspace_id value in the mutation.
func (*WorkspaceRoleMutation) WorkspacesCleared ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) WorkspacesCleared() bool
WorkspacesCleared returns if the edge workspaces was cleared.
func (*WorkspaceRoleMutation) WorkspacesID ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) WorkspacesID() (id uuid.UUID, exists bool)
WorkspacesID returns the workspaces id in the mutation.
func (*WorkspaceRoleMutation) WorkspacesIDs ¶ added in v0.1.7
func (m *WorkspaceRoleMutation) WorkspacesIDs() (ids []uuid.UUID)
WorkspacesIDs returns the workspaces ids in the mutation. Note that ids always returns len(ids) <= 1 for unique edges, and you should use WorkspacesID instead. It exists only for internal usage by the builders.
type WorkspaceRoleQuery ¶ added in v0.1.7
type WorkspaceRoleQuery struct {
// contains filtered or unexported fields
}
WorkspaceRoleQuery is the builder for querying WorkspaceRole entities.
func (*WorkspaceRoleQuery) All ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) All(ctx context.Context) ([]*WorkspaceRole, error)
All executes the query and returns a list of WorkspaceRoles.
func (*WorkspaceRoleQuery) AllX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) AllX(ctx context.Context) []*WorkspaceRole
AllX is like All, but panics if an error occurs.
func (*WorkspaceRoleQuery) Clone ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Clone() *WorkspaceRoleQuery
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 (*WorkspaceRoleQuery) Count ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkspaceRoleQuery) CountX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkspaceRoleQuery) Exist ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkspaceRoleQuery) ExistX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkspaceRoleQuery) First ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) First(ctx context.Context) (*WorkspaceRole, error)
First returns the first WorkspaceRole entity in the query. Returns *NotFoundError when no workspacerole was found.
func (*WorkspaceRoleQuery) FirstID ¶ added in v0.1.7
FirstID returns the first WorkspaceRole id in the query. Returns *NotFoundError when no id was found.
func (*WorkspaceRoleQuery) FirstIDX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkspaceRoleQuery) FirstX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) FirstX(ctx context.Context) *WorkspaceRole
FirstX is like First, but panics if an error occurs.
func (*WorkspaceRoleQuery) GroupBy ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) GroupBy(field string, fields ...string) *WorkspaceRoleGroupBy
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 {
Name string `json:"name,omitempty"`
Count int `json:"count,omitempty"`
}
client.WorkspaceRole.Query().
GroupBy(workspacerole.FieldName).
Aggregate(models.Count()).
Scan(ctx, &v)
func (*WorkspaceRoleQuery) IDs ¶ added in v0.1.7
IDs executes the query and returns a list of WorkspaceRole ids.
func (*WorkspaceRoleQuery) IDsX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*WorkspaceRoleQuery) Limit ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Limit(limit int) *WorkspaceRoleQuery
Limit adds a limit step to the query.
func (*WorkspaceRoleQuery) Offset ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Offset(offset int) *WorkspaceRoleQuery
Offset adds an offset step to the query.
func (*WorkspaceRoleQuery) Only ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Only(ctx context.Context) (*WorkspaceRole, error)
Only returns the only WorkspaceRole entity in the query, returns an error if not exactly one entity was returned.
func (*WorkspaceRoleQuery) OnlyID ¶ added in v0.1.7
OnlyID returns the only WorkspaceRole id in the query, returns an error if not exactly one id was returned.
func (*WorkspaceRoleQuery) OnlyIDX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkspaceRoleQuery) OnlyX ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) OnlyX(ctx context.Context) *WorkspaceRole
OnlyX is like Only, but panics if an error occurs.
func (*WorkspaceRoleQuery) Order ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Order(o ...OrderFunc) *WorkspaceRoleQuery
Order adds an order step to the query.
func (*WorkspaceRoleQuery) QueryUsers ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the users edge.
func (*WorkspaceRoleQuery) QueryWorkspaces ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) QueryWorkspaces() *WorkspaceQuery
QueryWorkspaces chains the current query on the workspaces edge.
func (*WorkspaceRoleQuery) Select ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Select(field string, fields ...string) *WorkspaceRoleSelect
Select one or more fields from the given query.
Example:
var v []struct {
Name string `json:"name,omitempty"`
}
client.WorkspaceRole.Query().
Select(workspacerole.FieldName).
Scan(ctx, &v)
func (*WorkspaceRoleQuery) Where ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) Where(ps ...predicate.WorkspaceRole) *WorkspaceRoleQuery
Where adds a new predicate for the builder.
func (*WorkspaceRoleQuery) WithUsers ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) WithUsers(opts ...func(*UserQuery)) *WorkspaceRoleQuery
WithUsers tells the query-builder to eager-loads the nodes that are connected to
the "users" edge. The optional arguments used to configure the query builder of the edge.
func (*WorkspaceRoleQuery) WithWorkspaces ¶ added in v0.1.7
func (wrq *WorkspaceRoleQuery) WithWorkspaces(opts ...func(*WorkspaceQuery)) *WorkspaceRoleQuery
WithWorkspaces tells the query-builder to eager-loads the nodes that are connected to
the "workspaces" edge. The optional arguments used to configure the query builder of the edge.
type WorkspaceRoleSelect ¶ added in v0.1.7
type WorkspaceRoleSelect struct {
// contains filtered or unexported fields
}
WorkspaceRoleSelect is the builder for select fields of WorkspaceRole entities.
func (*WorkspaceRoleSelect) Bool ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) BoolX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*WorkspaceRoleSelect) Bools ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) BoolsX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*WorkspaceRoleSelect) Float64 ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) Float64X ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*WorkspaceRoleSelect) Float64s ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) Float64sX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkspaceRoleSelect) Int ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) IntX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*WorkspaceRoleSelect) Ints ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) IntsX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*WorkspaceRoleSelect) Scan ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*WorkspaceRoleSelect) ScanX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*WorkspaceRoleSelect) String ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*WorkspaceRoleSelect) StringX ¶ added in v0.1.7
func (wrs *WorkspaceRoleSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type WorkspaceRoleUpdate ¶ added in v0.1.7
type WorkspaceRoleUpdate struct {
// contains filtered or unexported fields
}
WorkspaceRoleUpdate is the builder for updating WorkspaceRole entities.
func (*WorkspaceRoleUpdate) ClearMetadata ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) ClearMetadata() *WorkspaceRoleUpdate
ClearMetadata clears the value of metadata.
func (*WorkspaceRoleUpdate) ClearUsers ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) ClearUsers() *WorkspaceRoleUpdate
ClearUsers clears the "users" edge to type User.
func (*WorkspaceRoleUpdate) ClearWorkspaces ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) ClearWorkspaces() *WorkspaceRoleUpdate
ClearWorkspaces clears the "workspaces" edge to type Workspace.
func (*WorkspaceRoleUpdate) Exec ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkspaceRoleUpdate) ExecX ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkspaceRoleUpdate) Mutation ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) Mutation() *WorkspaceRoleMutation
Mutation returns the WorkspaceRoleMutation object of the builder.
func (*WorkspaceRoleUpdate) Save ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkspaceRoleUpdate) SaveX ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkspaceRoleUpdate) SetMetadata ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetMetadata(m map[string]interface{}) *WorkspaceRoleUpdate
SetMetadata sets the metadata field.
func (*WorkspaceRoleUpdate) SetName ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetName(s string) *WorkspaceRoleUpdate
SetName sets the name field.
func (*WorkspaceRoleUpdate) SetUpdatedAt ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetUpdatedAt(t time.Time) *WorkspaceRoleUpdate
SetUpdatedAt sets the updated_at field.
func (*WorkspaceRoleUpdate) SetUserID ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetUserID(u uuid.UUID) *WorkspaceRoleUpdate
SetUserID sets the user_id field.
func (*WorkspaceRoleUpdate) SetUsers ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetUsers(u *User) *WorkspaceRoleUpdate
SetUsers sets the users edge to User.
func (*WorkspaceRoleUpdate) SetUsersID ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetUsersID(id uuid.UUID) *WorkspaceRoleUpdate
SetUsersID sets the users edge to User by id.
func (*WorkspaceRoleUpdate) SetWorkspaceID ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetWorkspaceID(u uuid.UUID) *WorkspaceRoleUpdate
SetWorkspaceID sets the workspace_id field.
func (*WorkspaceRoleUpdate) SetWorkspaces ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetWorkspaces(w *Workspace) *WorkspaceRoleUpdate
SetWorkspaces sets the workspaces edge to Workspace.
func (*WorkspaceRoleUpdate) SetWorkspacesID ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) SetWorkspacesID(id uuid.UUID) *WorkspaceRoleUpdate
SetWorkspacesID sets the workspaces edge to Workspace by id.
func (*WorkspaceRoleUpdate) Where ¶ added in v0.1.7
func (wru *WorkspaceRoleUpdate) Where(ps ...predicate.WorkspaceRole) *WorkspaceRoleUpdate
Where adds a new predicate for the builder.
type WorkspaceRoleUpdateOne ¶ added in v0.1.7
type WorkspaceRoleUpdateOne struct {
// contains filtered or unexported fields
}
WorkspaceRoleUpdateOne is the builder for updating a single WorkspaceRole entity.
func (*WorkspaceRoleUpdateOne) ClearMetadata ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) ClearMetadata() *WorkspaceRoleUpdateOne
ClearMetadata clears the value of metadata.
func (*WorkspaceRoleUpdateOne) ClearUsers ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) ClearUsers() *WorkspaceRoleUpdateOne
ClearUsers clears the "users" edge to type User.
func (*WorkspaceRoleUpdateOne) ClearWorkspaces ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) ClearWorkspaces() *WorkspaceRoleUpdateOne
ClearWorkspaces clears the "workspaces" edge to type Workspace.
func (*WorkspaceRoleUpdateOne) Exec ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkspaceRoleUpdateOne) ExecX ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkspaceRoleUpdateOne) Mutation ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) Mutation() *WorkspaceRoleMutation
Mutation returns the WorkspaceRoleMutation object of the builder.
func (*WorkspaceRoleUpdateOne) Save ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) Save(ctx context.Context) (*WorkspaceRole, error)
Save executes the query and returns the updated entity.
func (*WorkspaceRoleUpdateOne) SaveX ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SaveX(ctx context.Context) *WorkspaceRole
SaveX is like Save, but panics if an error occurs.
func (*WorkspaceRoleUpdateOne) SetMetadata ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetMetadata(m map[string]interface{}) *WorkspaceRoleUpdateOne
SetMetadata sets the metadata field.
func (*WorkspaceRoleUpdateOne) SetName ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetName(s string) *WorkspaceRoleUpdateOne
SetName sets the name field.
func (*WorkspaceRoleUpdateOne) SetUpdatedAt ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetUpdatedAt(t time.Time) *WorkspaceRoleUpdateOne
SetUpdatedAt sets the updated_at field.
func (*WorkspaceRoleUpdateOne) SetUserID ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetUserID(u uuid.UUID) *WorkspaceRoleUpdateOne
SetUserID sets the user_id field.
func (*WorkspaceRoleUpdateOne) SetUsers ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetUsers(u *User) *WorkspaceRoleUpdateOne
SetUsers sets the users edge to User.
func (*WorkspaceRoleUpdateOne) SetUsersID ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetUsersID(id uuid.UUID) *WorkspaceRoleUpdateOne
SetUsersID sets the users edge to User by id.
func (*WorkspaceRoleUpdateOne) SetWorkspaceID ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetWorkspaceID(u uuid.UUID) *WorkspaceRoleUpdateOne
SetWorkspaceID sets the workspace_id field.
func (*WorkspaceRoleUpdateOne) SetWorkspaces ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetWorkspaces(w *Workspace) *WorkspaceRoleUpdateOne
SetWorkspaces sets the workspaces edge to Workspace.
func (*WorkspaceRoleUpdateOne) SetWorkspacesID ¶ added in v0.1.7
func (wruo *WorkspaceRoleUpdateOne) SetWorkspacesID(id uuid.UUID) *WorkspaceRoleUpdateOne
SetWorkspacesID sets the workspaces edge to Workspace by id.
type WorkspaceRoles ¶ added in v0.1.7
type WorkspaceRoles []*WorkspaceRole
WorkspaceRoles is a parsable slice of WorkspaceRole.
type WorkspaceSelect ¶ added in v0.1.7
type WorkspaceSelect struct {
// contains filtered or unexported fields
}
WorkspaceSelect is the builder for select fields of Workspace entities.
func (*WorkspaceSelect) Bool ¶ added in v0.1.7
func (ws *WorkspaceSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) BoolX ¶ added in v0.1.7
func (ws *WorkspaceSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*WorkspaceSelect) Bools ¶ added in v0.1.7
func (ws *WorkspaceSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) BoolsX ¶ added in v0.1.7
func (ws *WorkspaceSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*WorkspaceSelect) Float64 ¶ added in v0.1.7
func (ws *WorkspaceSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) Float64X ¶ added in v0.1.7
func (ws *WorkspaceSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*WorkspaceSelect) Float64s ¶ added in v0.1.7
func (ws *WorkspaceSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) Float64sX ¶ added in v0.1.7
func (ws *WorkspaceSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*WorkspaceSelect) Int ¶ added in v0.1.7
func (ws *WorkspaceSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) IntX ¶ added in v0.1.7
func (ws *WorkspaceSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*WorkspaceSelect) Ints ¶ added in v0.1.7
func (ws *WorkspaceSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) IntsX ¶ added in v0.1.7
func (ws *WorkspaceSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*WorkspaceSelect) Scan ¶ added in v0.1.7
func (ws *WorkspaceSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*WorkspaceSelect) ScanX ¶ added in v0.1.7
func (ws *WorkspaceSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*WorkspaceSelect) String ¶ added in v0.1.7
func (ws *WorkspaceSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from selector. It is only allowed when selecting one field.
func (*WorkspaceSelect) StringX ¶ added in v0.1.7
func (ws *WorkspaceSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type WorkspaceUpdate ¶ added in v0.1.7
type WorkspaceUpdate struct {
// contains filtered or unexported fields
}
WorkspaceUpdate is the builder for updating Workspace entities.
func (*WorkspaceUpdate) AddGroupIDs ¶ added in v0.1.7
func (wu *WorkspaceUpdate) AddGroupIDs(ids ...uuid.UUID) *WorkspaceUpdate
AddGroupIDs adds the groups edge to Group by ids.
func (*WorkspaceUpdate) AddGroups ¶ added in v0.1.7
func (wu *WorkspaceUpdate) AddGroups(g ...*Group) *WorkspaceUpdate
AddGroups adds the groups edges to Group.
func (*WorkspaceUpdate) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (wu *WorkspaceUpdate) AddWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdate
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceUpdate) AddWorkspaceRoles ¶ added in v0.1.7
func (wu *WorkspaceUpdate) AddWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdate
AddWorkspaceRoles adds the workspace_roles edges to WorkspaceRole.
func (*WorkspaceUpdate) ClearDescription ¶ added in v0.1.7
func (wu *WorkspaceUpdate) ClearDescription() *WorkspaceUpdate
ClearDescription clears the value of description.
func (*WorkspaceUpdate) ClearGroups ¶ added in v0.1.7
func (wu *WorkspaceUpdate) ClearGroups() *WorkspaceUpdate
ClearGroups clears all "groups" edges to type Group.
func (*WorkspaceUpdate) ClearMetadata ¶ added in v0.1.7
func (wu *WorkspaceUpdate) ClearMetadata() *WorkspaceUpdate
ClearMetadata clears the value of metadata.
func (*WorkspaceUpdate) ClearOwner ¶ added in v0.1.7
func (wu *WorkspaceUpdate) ClearOwner() *WorkspaceUpdate
ClearOwner clears the "owner" edge to type User.
func (*WorkspaceUpdate) ClearWorkspaceRoles ¶ added in v0.1.7
func (wu *WorkspaceUpdate) ClearWorkspaceRoles() *WorkspaceUpdate
ClearWorkspaceRoles clears all "workspace_roles" edges to type WorkspaceRole.
func (*WorkspaceUpdate) Exec ¶ added in v0.1.7
func (wu *WorkspaceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkspaceUpdate) ExecX ¶ added in v0.1.7
func (wu *WorkspaceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkspaceUpdate) Mutation ¶ added in v0.1.7
func (wu *WorkspaceUpdate) Mutation() *WorkspaceMutation
Mutation returns the WorkspaceMutation object of the builder.
func (*WorkspaceUpdate) RemoveGroupIDs ¶ added in v0.1.7
func (wu *WorkspaceUpdate) RemoveGroupIDs(ids ...uuid.UUID) *WorkspaceUpdate
RemoveGroupIDs removes the groups edge to Group by ids.
func (*WorkspaceUpdate) RemoveGroups ¶ added in v0.1.7
func (wu *WorkspaceUpdate) RemoveGroups(g ...*Group) *WorkspaceUpdate
RemoveGroups removes groups edges to Group.
func (*WorkspaceUpdate) RemoveWorkspaceRoleIDs ¶ added in v0.1.7
func (wu *WorkspaceUpdate) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdate
RemoveWorkspaceRoleIDs removes the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceUpdate) RemoveWorkspaceRoles ¶ added in v0.1.7
func (wu *WorkspaceUpdate) RemoveWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdate
RemoveWorkspaceRoles removes workspace_roles edges to WorkspaceRole.
func (*WorkspaceUpdate) Save ¶ added in v0.1.7
func (wu *WorkspaceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkspaceUpdate) SaveX ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkspaceUpdate) SetDescription ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetDescription(s string) *WorkspaceUpdate
SetDescription sets the description field.
func (*WorkspaceUpdate) SetMetadata ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetMetadata(m map[string]interface{}) *WorkspaceUpdate
SetMetadata sets the metadata field.
func (*WorkspaceUpdate) SetName ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetName(s string) *WorkspaceUpdate
SetName sets the name field.
func (*WorkspaceUpdate) SetNillableDescription ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetNillableDescription(s *string) *WorkspaceUpdate
SetNillableDescription sets the description field if the given value is not nil.
func (*WorkspaceUpdate) SetOwner ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetOwner(u *User) *WorkspaceUpdate
SetOwner sets the owner edge to User.
func (*WorkspaceUpdate) SetOwnerID ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetOwnerID(id uuid.UUID) *WorkspaceUpdate
SetOwnerID sets the owner edge to User by id.
func (*WorkspaceUpdate) SetPlan ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetPlan(s string) *WorkspaceUpdate
SetPlan sets the plan field.
func (*WorkspaceUpdate) SetUpdatedAt ¶ added in v0.1.7
func (wu *WorkspaceUpdate) SetUpdatedAt(t time.Time) *WorkspaceUpdate
SetUpdatedAt sets the updated_at field.
func (*WorkspaceUpdate) Where ¶ added in v0.1.7
func (wu *WorkspaceUpdate) Where(ps ...predicate.Workspace) *WorkspaceUpdate
Where adds a new predicate for the builder.
type WorkspaceUpdateOne ¶ added in v0.1.7
type WorkspaceUpdateOne struct {
// contains filtered or unexported fields
}
WorkspaceUpdateOne is the builder for updating a single Workspace entity.
func (*WorkspaceUpdateOne) AddGroupIDs ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) AddGroupIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
AddGroupIDs adds the groups edge to Group by ids.
func (*WorkspaceUpdateOne) AddGroups ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) AddGroups(g ...*Group) *WorkspaceUpdateOne
AddGroups adds the groups edges to Group.
func (*WorkspaceUpdateOne) AddWorkspaceRoleIDs ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) AddWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
AddWorkspaceRoleIDs adds the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceUpdateOne) AddWorkspaceRoles ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) AddWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdateOne
AddWorkspaceRoles adds the workspace_roles edges to WorkspaceRole.
func (*WorkspaceUpdateOne) ClearDescription ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) ClearDescription() *WorkspaceUpdateOne
ClearDescription clears the value of description.
func (*WorkspaceUpdateOne) ClearGroups ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) ClearGroups() *WorkspaceUpdateOne
ClearGroups clears all "groups" edges to type Group.
func (*WorkspaceUpdateOne) ClearMetadata ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) ClearMetadata() *WorkspaceUpdateOne
ClearMetadata clears the value of metadata.
func (*WorkspaceUpdateOne) ClearOwner ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) ClearOwner() *WorkspaceUpdateOne
ClearOwner clears the "owner" edge to type User.
func (*WorkspaceUpdateOne) ClearWorkspaceRoles ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) ClearWorkspaceRoles() *WorkspaceUpdateOne
ClearWorkspaceRoles clears all "workspace_roles" edges to type WorkspaceRole.
func (*WorkspaceUpdateOne) Exec ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkspaceUpdateOne) ExecX ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkspaceUpdateOne) Mutation ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) Mutation() *WorkspaceMutation
Mutation returns the WorkspaceMutation object of the builder.
func (*WorkspaceUpdateOne) RemoveGroupIDs ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) RemoveGroupIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
RemoveGroupIDs removes the groups edge to Group by ids.
func (*WorkspaceUpdateOne) RemoveGroups ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) RemoveGroups(g ...*Group) *WorkspaceUpdateOne
RemoveGroups removes groups edges to Group.
func (*WorkspaceUpdateOne) RemoveWorkspaceRoleIDs ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) RemoveWorkspaceRoleIDs(ids ...uuid.UUID) *WorkspaceUpdateOne
RemoveWorkspaceRoleIDs removes the workspace_roles edge to WorkspaceRole by ids.
func (*WorkspaceUpdateOne) RemoveWorkspaceRoles ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) RemoveWorkspaceRoles(w ...*WorkspaceRole) *WorkspaceUpdateOne
RemoveWorkspaceRoles removes workspace_roles edges to WorkspaceRole.
func (*WorkspaceUpdateOne) Save ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) Save(ctx context.Context) (*Workspace, error)
Save executes the query and returns the updated entity.
func (*WorkspaceUpdateOne) SaveX ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SaveX(ctx context.Context) *Workspace
SaveX is like Save, but panics if an error occurs.
func (*WorkspaceUpdateOne) SetDescription ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetDescription(s string) *WorkspaceUpdateOne
SetDescription sets the description field.
func (*WorkspaceUpdateOne) SetMetadata ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetMetadata(m map[string]interface{}) *WorkspaceUpdateOne
SetMetadata sets the metadata field.
func (*WorkspaceUpdateOne) SetName ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetName(s string) *WorkspaceUpdateOne
SetName sets the name field.
func (*WorkspaceUpdateOne) SetNillableDescription ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetNillableDescription(s *string) *WorkspaceUpdateOne
SetNillableDescription sets the description field if the given value is not nil.
func (*WorkspaceUpdateOne) SetOwner ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetOwner(u *User) *WorkspaceUpdateOne
SetOwner sets the owner edge to User.
func (*WorkspaceUpdateOne) SetOwnerID ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetOwnerID(id uuid.UUID) *WorkspaceUpdateOne
SetOwnerID sets the owner edge to User by id.
func (*WorkspaceUpdateOne) SetPlan ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetPlan(s string) *WorkspaceUpdateOne
SetPlan sets the plan field.
func (*WorkspaceUpdateOne) SetUpdatedAt ¶ added in v0.1.7
func (wuo *WorkspaceUpdateOne) SetUpdatedAt(t time.Time) *WorkspaceUpdateOne
SetUpdatedAt sets the updated_at field.
type Workspaces ¶ added in v0.1.7
type Workspaces []*Workspace
Workspaces is a parsable slice of Workspace.
Source Files
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- grouprole.go
- grouprole_create.go
- grouprole_delete.go
- grouprole_query.go
- grouprole_update.go
- mutation.go
- permission.go
- permission_create.go
- permission_delete.go
- permission_query.go
- permission_update.go
- runtime.go
- session.go
- session_create.go
- session_delete.go
- session_query.go
- session_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userrole.go
- userrole_create.go
- userrole_delete.go
- userrole_query.go
- userrole_update.go
- workspace.go
- workspace_create.go
- workspace_delete.go
- workspace_query.go
- workspace_update.go
- workspacerole.go
- workspacerole_create.go
- workspacerole_delete.go
- workspacerole_query.go
- workspacerole_update.go