common

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFeatureDisabled = connect.NewError(connect.CodeUnavailable, fmt.Errorf("the requested feature has been disabled by an administrator"))
)

Functions

func EnsureDisplayName

func EnsureDisplayName(usr *repo.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.Queries, cfg config.Config, cache cache.Cache) *Service

func (*Service) AddEmailAddressToUser

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

func (*Service) AddUserAddress

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

func (*Service) DeleteEmailAddressFromUser

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

func (*Service) DeleteUserAddress

func (svc *Service) DeleteUserAddress(ctx context.Context, userID string, addressID string) ([]repo.UserAddress, 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 repo.UserAddress, paths []string) ([]repo.UserAddress, error)

Jump to

Keyboard shortcuts

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