domain

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Domain

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

func New

func New(st store.Store) *Domain

func (*Domain) CacheReadToken added in v0.24.0

func (domain *Domain) CacheReadToken(ctx context.Context, token string) (string, error)

func (*Domain) CacheToken added in v0.24.0

func (domain *Domain) CacheToken(ctx context.Context, token, email string, ttl int) error

func (*Domain) Create

func (domain *Domain) Create(ctx context.Context, user *user.Account, salt string, password string) error

func (*Domain) CreateSession

func (domain *Domain) CreateSession(ctx context.Context, sess *user.Session) error

func (*Domain) CreateToken

func (domain *Domain) CreateToken(ctx context.Context, email, token string) error

CreateToken returns the created and saved token

func (*Domain) Delete

func (domain *Domain) Delete(ctx context.Context, userId string) error

func (*Domain) DeleteAllSessions added in v0.26.0

func (domain *Domain) DeleteAllSessions(ctx context.Context, userID string) error

func (*Domain) DeletePasswordResetCode added in v0.24.0

func (domain *Domain) DeletePasswordResetCode(ctx context.Context, userId, code string) error

func (*Domain) DeleteSession

func (domain *Domain) DeleteSession(ctx context.Context, id string) error

func (*Domain) DeleteTenantData added in v0.25.0

func (domain *Domain) DeleteTenantData(tenantID string) error

func (*Domain) List added in v0.23.0

func (domain *Domain) List(ctx context.Context, o, l uint32) (result []*user.Account, err error)

func (*Domain) MarkVerified added in v0.25.0

func (domain *Domain) MarkVerified(ctx context.Context, id, email string) error

func (*Domain) Read

func (domain *Domain) Read(ctx context.Context, userId string) (*user.Account, error)

func (*Domain) ReadPasswordResetCode added in v0.23.0

func (domain *Domain) ReadPasswordResetCode(ctx context.Context, userId, code string) (*passwordResetCode, error)

ReadPasswordResetCode returns the user reset code

func (*Domain) ReadSession

func (domain *Domain) ReadSession(ctx context.Context, id string) (*user.Session, error)

func (*Domain) ReadToken

func (domain *Domain) ReadToken(ctx context.Context, token string) (string, string, error)

ReadToken returns the user id

func (*Domain) ReadUserByKey added in v0.25.0

func (domain *Domain) ReadUserByKey(ctx context.Context, key string) (*user.Account, error)

ReadUserByKey read user account in store by key

func (*Domain) SaltAndPassword

func (domain *Domain) SaltAndPassword(ctx context.Context, userId string) (string, string, error)

func (*Domain) SavePasswordResetCode added in v0.23.0

func (domain *Domain) SavePasswordResetCode(ctx context.Context, userId, code string, expiry time.Duration) (*passwordResetCode, error)

func (*Domain) Search

func (domain *Domain) Search(ctx context.Context, username, email string) ([]*user.Account, error)

func (*Domain) SearchByEmail added in v0.25.0

func (domain *Domain) SearchByEmail(ctx context.Context, email string) (*user.Account, error)

func (*Domain) SearchByUserId added in v0.26.0

func (domain *Domain) SearchByUserId(ctx context.Context, userId string) (*user.Account, error)

func (*Domain) SearchByUsername added in v0.25.0

func (domain *Domain) SearchByUsername(ctx context.Context, username string) (*user.Account, error)

func (*Domain) SendEmail

func (domain *Domain) SendEmail(fromName, toAddress, toUsername, subject, textContent, token, redirctUrl, failureRedirectUrl string) error

func (*Domain) SendMLE added in v0.24.0

func (domain *Domain) SendMLE(fromName, toAddress, toUsername, subject, textContent, token, address, endpoint string) error

func (*Domain) SendPasswordResetEmail added in v0.23.0

func (domain *Domain) SendPasswordResetEmail(ctx context.Context, userId, codeStr, fromName, toAddress, toUsername, subject, textContent string) error

func (*Domain) Update

func (domain *Domain) Update(ctx context.Context, user *user.Account) error

func (*Domain) UpdatePassword

func (domain *Domain) UpdatePassword(ctx context.Context, userId string, salt string, password string) error

Jump to

Keyboard shortcuts

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