accounts

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

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SigningMethod jwt signing method
	SigningMethod *jwt.SigningMethodHMAC = jwt.SigningMethodHS256

	// TokenExpires token expires duration
	TokenExpires time.Duration = time.Minute * 15

	// UnlockTokenKey unlock token key
	UnlockTokenKey = "__unlock_token__"

	// ResetPasswordTokenKey reset password token key
	ResetPasswordTokenKey = "__reset_password_token__"
)

Functions

This section is empty.

Types

type Service

type Service interface {
	CreateAccount(ctx context.Context, params *params.CreateAccount) (account *models.Account, err error)
	DescribeAccounts(ctx context.Context, params *params.DescribeAccounts) (pagination *database.Pagination[*models.Account], err error)
	DescribeAccount(ctx context.Context, params *params.DescribeAccount) (account *models.Account, err error)
	AuthenticateAccount(ctx context.Context, params *params.AuthenticateAccount) (account *models.Account, err error)
	UpdateAccount(ctx context.Context, params *params.UpdateAccount) (account *models.Account, err error)

	CreateUnlockToken(ctx context.Context, params *params.CreateUnlockToken) (token string, err error)
	Unlock(ctx context.Context, params *params.Unlock) (err error)

	UpdatePassword(ctx context.Context, params *params.UpdatePassword) (err error)

	CreateResetPasswordToken(ctx context.Context, params *params.CreateResetPasswordToken) (token string, err error)
	ResetPassword(ctx context.Context, params *params.ResetPassword) (err error)
}

Service for account interface

func NewService

func NewService(database *database.Database) (Service, error)

NewService return default implement spaces service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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