accountmongo

package
v0.0.0-...-5cbc45b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(r *accountrepo.Container) error

func New

func New(ctx context.Context, mc *mongo.Client, databaseName string, useTransaction, needCompat bool, users []accountrepo.User) (*accountrepo.Container, error)

func NewUser

func NewUser(client *mongox.Client) accountrepo.User

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) Create

func (r *User) Create(ctx context.Context, user *user.User) error

func (*User) FindByEmail

func (r *User) FindByEmail(ctx context.Context, email string) (*user.User, error)

func (*User) FindByID

func (r *User) FindByID(ctx context.Context, id2 user.ID) (*user.User, error)

func (*User) FindByIDs

func (r *User) FindByIDs(ctx context.Context, ids user.IDList) (user.List, error)

func (*User) FindByName

func (r *User) FindByName(ctx context.Context, name string) (*user.User, error)

func (*User) FindByNameOrEmail

func (r *User) FindByNameOrEmail(ctx context.Context, nameOrEmail string) (*user.User, error)

func (*User) FindByPasswordResetRequest

func (r *User) FindByPasswordResetRequest(ctx context.Context, pwdResetToken string) (*user.User, error)

func (*User) FindBySub

func (r *User) FindBySub(ctx context.Context, auth0sub string) (*user.User, error)

func (*User) FindBySubOrCreate

func (r *User) FindBySubOrCreate(ctx context.Context, u *user.User, sub string) (*user.User, error)

func (*User) FindByVerification

func (r *User) FindByVerification(ctx context.Context, code string) (*user.User, error)

func (*User) Init

func (r *User) Init() error

func (*User) Remove

func (r *User) Remove(ctx context.Context, user user.ID) error

func (*User) Save

func (r *User) Save(ctx context.Context, user *user.User) error

type Workspace

type Workspace struct {
	// contains filtered or unexported fields
}

func (*Workspace) Create

func (r *Workspace) Create(ctx context.Context, workspace *workspace.Workspace) error

func (*Workspace) Filtered

func (*Workspace) FindByID

func (*Workspace) FindByIDs

func (*Workspace) FindByIntegration

func (r *Workspace) FindByIntegration(ctx context.Context, id workspace.IntegrationID) (workspace.List, error)

func (*Workspace) FindByUser

func (r *Workspace) FindByUser(ctx context.Context, id user.ID) (workspace.List, error)

func (*Workspace) Init

func (r *Workspace) Init() error

func (*Workspace) Remove

func (*Workspace) RemoveAll

func (*Workspace) Save

func (r *Workspace) Save(ctx context.Context, workspace *workspace.Workspace) error

func (*Workspace) SaveAll

func (r *Workspace) SaveAll(ctx context.Context, workspaces workspace.List) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL