Documentation ¶
Index ¶
- func Init(r *accountrepo.Container) error
- func New(ctx context.Context, mc *mongo.Client, databaseName string, ...) (*accountrepo.Container, error)
- func NewUser(client *mongox.Client) accountrepo.User
- func NewUserWithHost(client *mongox.Client, host string) accountrepo.User
- func NewWithDB(ctx context.Context, db *mongo.Database, useTransaction, needCompat bool, ...) (*accountrepo.Container, error)
- func NewWorkspace(client *mongox.Client) accountrepo.Workspace
- func NewWorkspaceCompat(client *mongox.Client) accountrepo.Workspace
- type User
- func (r *User) Create(ctx context.Context, user *user.User) error
- func (r *User) FindByEmail(ctx context.Context, email string) (*user.User, error)
- func (r *User) FindByID(ctx context.Context, id2 user.ID) (*user.User, error)
- func (r *User) FindByIDs(ctx context.Context, ids user.IDList) (user.List, error)
- func (r *User) FindByName(ctx context.Context, name string) (*user.User, error)
- func (r *User) FindByNameOrEmail(ctx context.Context, nameOrEmail string) (*user.User, error)
- func (r *User) FindByPasswordResetRequest(ctx context.Context, pwdResetToken string) (*user.User, error)
- func (r *User) FindBySub(ctx context.Context, auth0sub string) (*user.User, error)
- func (r *User) FindBySubOrCreate(ctx context.Context, u *user.User, sub string) (*user.User, error)
- func (r *User) FindByVerification(ctx context.Context, code string) (*user.User, error)
- func (r *User) Init() error
- func (r *User) Remove(ctx context.Context, user user.ID) error
- func (r *User) Save(ctx context.Context, user *user.User) error
- type Workspace
- func (r *Workspace) Create(ctx context.Context, workspace *workspace.Workspace) error
- func (r *Workspace) Filtered(f accountrepo.WorkspaceFilter) accountrepo.Workspace
- func (r *Workspace) FindByID(ctx context.Context, id accountdomain.WorkspaceID) (*workspace.Workspace, error)
- func (r *Workspace) FindByIDs(ctx context.Context, ids accountdomain.WorkspaceIDList) (workspace.List, error)
- func (r *Workspace) FindByIntegration(ctx context.Context, id workspace.IntegrationID) (workspace.List, error)
- func (r *Workspace) FindByUser(ctx context.Context, id user.ID) (workspace.List, error)
- func (r *Workspace) Init() error
- func (r *Workspace) Remove(ctx context.Context, id accountdomain.WorkspaceID) error
- func (r *Workspace) RemoveAll(ctx context.Context, ids accountdomain.WorkspaceIDList) error
- func (r *Workspace) Save(ctx context.Context, workspace *workspace.Workspace) error
- func (r *Workspace) SaveAll(ctx context.Context, workspaces workspace.List) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(r *accountrepo.Container) error
func NewUserWithHost ¶
func NewUserWithHost(client *mongox.Client, host string) accountrepo.User
func NewWithDB ¶
func NewWithDB(ctx context.Context, db *mongo.Database, useTransaction, needCompat bool, users []accountrepo.User) (*accountrepo.Container, error)
func NewWorkspace ¶
func NewWorkspace(client *mongox.Client) accountrepo.Workspace
func NewWorkspaceCompat ¶
func NewWorkspaceCompat(client *mongox.Client) accountrepo.Workspace
Types ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) FindByEmail ¶
func (*User) FindByName ¶
func (*User) FindByNameOrEmail ¶
func (*User) FindByPasswordResetRequest ¶
func (*User) FindBySubOrCreate ¶
func (*User) FindByVerification ¶
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
func (*Workspace) Filtered ¶
func (r *Workspace) Filtered(f accountrepo.WorkspaceFilter) accountrepo.Workspace
func (*Workspace) FindByID ¶
func (r *Workspace) FindByID(ctx context.Context, id accountdomain.WorkspaceID) (*workspace.Workspace, error)
func (*Workspace) FindByIDs ¶
func (r *Workspace) FindByIDs(ctx context.Context, ids accountdomain.WorkspaceIDList) (workspace.List, error)
func (*Workspace) FindByIntegration ¶
func (*Workspace) FindByUser ¶
func (*Workspace) Remove ¶
func (r *Workspace) Remove(ctx context.Context, id accountdomain.WorkspaceID) error
func (*Workspace) RemoveAll ¶
func (r *Workspace) RemoveAll(ctx context.Context, ids accountdomain.WorkspaceIDList) error
Click to show internal directories.
Click to hide internal directories.