common

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDisplayName

func EnsureDisplayName(usr *models.User)

func Timing

func Timing(ctx context.Context, name string, fn func() error) error

Types

type Service

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

func New

func New(repo *repo.Repo, cfg config.Config, cache cache.Cache) *Service

func (*Service) AddEmailAddressToUser

func (svc *Service) AddEmailAddressToUser(ctx context.Context, mailModel models.EMail) (*models.EMail, []models.EMail, error)

func (*Service) AddUserAddress

func (svc *Service) AddUserAddress(ctx context.Context, model models.Address) ([]models.Address, error)

func (*Service) DeleteEmailAddressFromUser

func (svc *Service) DeleteEmailAddressFromUser(ctx context.Context, userID string, mailID string) ([]models.EMail, error)

func (*Service) DeleteUserAddress

func (svc *Service) DeleteUserAddress(ctx context.Context, userID string, addressID string) ([]models.Address, error)

func (*Service) GeneratePasswordResetToken

func (c *Service) GeneratePasswordResetToken(ctx context.Context, userID string) (string, string, error)

func (*Service) MarkEmailAsPrimary

func (svc *Service) MarkEmailAsPrimary(ctx context.Context, userID string, mailID string) error

func (*Service) UpdateUserAddress

func (svc *Service) UpdateUserAddress(ctx context.Context, updateModel models.Address, paths []string) ([]models.Address, error)

Jump to

Keyboard shortcuts

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