account

package
v0.0.0-...-8cb3723 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents the account application service

func NewAccountService

func NewAccountService(userRepo model.UserRepo, accountRepo model.AccountRepo, rbac model.RBACService, secret secret.Service) *Service

NewAccountService creates a new account application service

func (*Service) ChangePassword

func (s *Service) ChangePassword(c *gin.Context, oldPass, newPass string, id int) error

ChangePassword changes user's password

func (*Service) Create

func (s *Service) Create(c *gin.Context, u *model.User) error

Create creates a new user account

func (*Service) GetProfile

func (s *Service) GetProfile(c *gin.Context, id int) *model.User

GetProfile gets user's profile

func (*Service) UpdateAvatar

func (s *Service) UpdateAvatar(c *gin.Context, newAvatar string, id int) error

UpdateAvatar changes user's avatar

func (*Service) UpdateProfile

func (s *Service) UpdateProfile(c *gin.Context, update *request.Update) (*model.User, error)

UpdateProfile updated user's profile

Jump to

Keyboard shortcuts

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