Documentation ¶
Index ¶
- Variables
- type Container
- type MultiUser
- func (u MultiUser) Create(ctx context.Context, user *user.User) error
- func (u MultiUser) FindAll(ctx context.Context) (user.List, error)
- func (u MultiUser) FindByEmail(ctx context.Context, email string) (*user.User, error)
- func (u MultiUser) FindByID(ctx context.Context, id user.ID) (*user.User, error)
- func (u MultiUser) FindByIDs(ctx context.Context, ids user.IDList) (user.List, error)
- func (u MultiUser) FindByName(ctx context.Context, name string) (*user.User, error)
- func (u MultiUser) FindByNameOrEmail(ctx context.Context, nameOrEmail string) (*user.User, error)
- func (u MultiUser) FindByPasswordResetRequest(ctx context.Context, p string) (*user.User, error)
- func (u MultiUser) FindBySub(ctx context.Context, sub string) (*user.User, error)
- func (u MultiUser) FindBySubOrCreate(ctx context.Context, v *user.User, s string) (*user.User, error)
- func (u MultiUser) FindByVerification(ctx context.Context, v string) (*user.User, error)
- func (u MultiUser) Remove(ctx context.Context, id user.ID) error
- func (u MultiUser) Save(ctx context.Context, user *user.User) error
- func (u MultiUser) SearchByKeyword(ctx context.Context, keyword string) (user.List, error)
- type User
- type UserQuery
- type Workspace
- type WorkspaceFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicatedUser = rerror.NewE(i18n.T("duplicated user"))
View Source
var (
ErrOperationDenied = rerror.NewE(i18n.T("operation denied"))
)
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { User User Workspace Workspace Transaction usecasex.Transaction Users []User }
func (*Container) Filtered ¶
func (c *Container) Filtered(workspace WorkspaceFilter) *Container
type MultiUser ¶
type MultiUser []User
func NewMultiUser ¶
func (MultiUser) FindByEmail ¶
func (MultiUser) FindByName ¶
func (MultiUser) FindByNameOrEmail ¶
func (MultiUser) FindByPasswordResetRequest ¶
func (MultiUser) FindBySubOrCreate ¶
func (MultiUser) FindByVerification ¶
type User ¶
type User interface { UserQuery FindByVerification(context.Context, string) (*user.User, error) FindByPasswordResetRequest(context.Context, string) (*user.User, error) FindBySubOrCreate(context.Context, *user.User, string) (*user.User, error) Create(context.Context, *user.User) error Save(context.Context, *user.User) error Remove(context.Context, user.ID) error }
type UserQuery ¶
type UserQuery interface { FindAll(context.Context) (user.List, error) FindByID(context.Context, user.ID) (*user.User, error) FindByIDs(context.Context, user.IDList) (user.List, error) FindBySub(context.Context, string) (*user.User, error) FindByEmail(context.Context, string) (*user.User, error) FindByName(context.Context, string) (*user.User, error) FindByNameOrEmail(context.Context, string) (*user.User, error) SearchByKeyword(context.Context, string) (user.List, error) }
type Workspace ¶
type Workspace interface { Filtered(WorkspaceFilter) Workspace FindByID(context.Context, workspace.ID) (*workspace.Workspace, error) FindByIDs(context.Context, workspace.IDList) (workspace.List, error) FindByUser(context.Context, user.ID) (workspace.List, error) FindByIntegration(context.Context, workspace.IntegrationID) (workspace.List, error) Create(context.Context, *workspace.Workspace) error Save(context.Context, *workspace.Workspace) error SaveAll(context.Context, workspace.List) error Remove(context.Context, workspace.ID) error RemoveAll(context.Context, workspace.IDList) error }
type WorkspaceFilter ¶
type WorkspaceFilter struct { Readable accountdomain.WorkspaceIDList Writable accountdomain.WorkspaceIDList }
func WorkspaceFilterFromOperator ¶
func WorkspaceFilterFromOperator(o *accountusecase.Operator) WorkspaceFilter
func (WorkspaceFilter) CanRead ¶
func (f WorkspaceFilter) CanRead(id accountdomain.WorkspaceID) bool
func (WorkspaceFilter) CanWrite ¶
func (f WorkspaceFilter) CanWrite(id accountdomain.WorkspaceID) bool
func (WorkspaceFilter) Clone ¶
func (f WorkspaceFilter) Clone() WorkspaceFilter
func (WorkspaceFilter) Filter ¶
func (f WorkspaceFilter) Filter(q any) any
func (WorkspaceFilter) Merge ¶
func (f WorkspaceFilter) Merge(g WorkspaceFilter) WorkspaceFilter
Click to show internal directories.
Click to hide internal directories.