user

package
v0.0.0-...-6c8972c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Svc

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

func New

func New(rs UserStore, logger *logrus.Entry) *Svc

func (*Svc) CreateUser

func (s *Svc) CreateUser(ctx context.Context, user storage.User) (string, error)

func (*Svc) DeleteUser

func (s *Svc) DeleteUser(ctx context.Context, user storage.User) error

func (*Svc) DeleteUserInformation

func (s *Svc) DeleteUserInformation(ctx context.Context, userID, deletedBy string) error

func (*Svc) GetUserByEmail

func (s *Svc) GetUserByEmail(ctx context.Context, email string) (*storage.User, error)

func (*Svc) GetUserByID

func (s *Svc) GetUserByID(ctx context.Context, id string) (*storage.User, error)

func (*Svc) GetUserByUsername

func (s *Svc) GetUserByUsername(ctx context.Context, username string) (*storage.User, error)

func (*Svc) GetUserInformationByUserID

func (s *Svc) GetUserInformationByUserID(ctx context.Context, id string) (*storage.UserInformation, error)

func (*Svc) ListUsers

func (s *Svc) ListUsers(ctx context.Context, p storage.FilterUser) ([]storage.User, error)

func (*Svc) UpdateUser

func (s *Svc) UpdateUser(ctx context.Context, user storage.User) (*storage.User, error)

func (*Svc) UpdateUserInformationByUserID

func (s *Svc) UpdateUserInformationByUserID(ctx context.Context, profile storage.UserInformation) (*storage.UserInformation, error)

type UserStore

type UserStore interface {
	CreateUser(context.Context, storage.User) (string, error)
	UpdateUser(context.Context, storage.User) (*storage.User, error)
	DeleteUser(context.Context, storage.User) error
	GetUserByEmail(context.Context, string) (*storage.User, error)
	GetUserByID(context.Context, string) (*storage.User, error)
	GetUserByUsername(context.Context, string) (*storage.User, error)
	ListUsers(context.Context, storage.FilterUser) ([]storage.User, error)
	CreateUserInformation(context.Context, storage.UserInformation) (string, error)
	GetUserInformation(context.Context, string) (*storage.UserInformation, error)
	UpdateUserInformation(context.Context, storage.UserInformation) (*storage.UserInformation, error)
	DeleteUserInformation(context.Context, string, string) error
}

Jump to

Keyboard shortcuts

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