account

package
v0.0.0-...-46e61fc Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func (*Controller) ChangePassword

func (c *Controller) ChangePassword(data *accountEntities.ChangePasswordData) error

func (*Controller) CheckExistingEmailOrUsername

func (c *Controller) CheckExistingEmailOrUsername(data *accountEntities.CheckEmailAndUsername) error

func (*Controller) CheckResetPasswordCode

func (c *Controller) CheckResetPasswordCode(data *accountEntities.ResetCodeData) (string, error)

func (*Controller) CreateAccountHorusec

func (c *Controller) CreateAccountHorusec(data *accountEntities.Data) (*accountEntities.Response, error)

func (*Controller) CreateAccountKeycloak

func (c *Controller) CreateAccountKeycloak(token string) (*accountEntities.Response, error)

func (*Controller) DeleteAccount

func (c *Controller) DeleteAccount(accountID uuid.UUID) error

func (*Controller) GetAccountID

func (c *Controller) GetAccountID(token string) (uuid.UUID, error)

func (*Controller) Logout

func (c *Controller) Logout(refreshToken string)

func (*Controller) RefreshToken

func (c *Controller) RefreshToken(refreshToken string) (*authEntities.LoginResponse, error)

func (*Controller) SendResetPasswordCode

func (c *Controller) SendResetPasswordCode(email string) error

func (*Controller) UpdateAccount

func (*Controller) ValidateAccountEmail

func (c *Controller) ValidateAccountEmail(accountID uuid.UUID) error

type IController

type IController interface {
	CreateAccountKeycloak(token string) (*accountEntities.Response, error)
	CreateAccountHorusec(data *accountEntities.Data) (*accountEntities.Response, error)
	ValidateAccountEmail(accountID uuid.UUID) error
	SendResetPasswordCode(email string) error
	CheckResetPasswordCode(data *accountEntities.ResetCodeData) (string, error)
	ChangePassword(data *accountEntities.ChangePasswordData) error
	RefreshToken(refreshToken string) (*authEntities.LoginResponse, error)
	Logout(refreshToken string)
	CheckExistingEmailOrUsername(data *accountEntities.CheckEmailAndUsername) error
	DeleteAccount(accountID uuid.UUID) error
	GetAccountID(token string) (uuid.UUID, error)
	UpdateAccount(data *accountEntities.UpdateAccount) (*accountEntities.Response, error)
}

func NewAccountController

func NewAccountController(repositoryAccount accountRepository.IRepository, keycloakAuth keycloak.IService,
	useCasesAccount accountUseCases.IUseCases, appConfig app.IConfig, brokerLib broker.IBroker,
	cacheLib cache.ICache) IController

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ChangePassword

func (m *Mock) ChangePassword(_ *accountEntities.ChangePasswordData) error

func (*Mock) CheckExistingEmailOrUsername

func (m *Mock) CheckExistingEmailOrUsername(_ *accountEntities.CheckEmailAndUsername) error

func (*Mock) CheckResetPasswordCode

func (m *Mock) CheckResetPasswordCode(_ *accountEntities.ResetCodeData) (string, error)

func (*Mock) CreateAccountHorusec

func (m *Mock) CreateAccountHorusec(_ *accountEntities.Data) (*accountEntities.Response, error)

func (*Mock) CreateAccountKeycloak

func (m *Mock) CreateAccountKeycloak(_ string) (*accountEntities.Response, error)

func (*Mock) DeleteAccount

func (m *Mock) DeleteAccount(_ uuid.UUID) error

func (*Mock) GetAccountID

func (m *Mock) GetAccountID(_ string) (uuid.UUID, error)

func (*Mock) Logout

func (m *Mock) Logout(_ string)

func (*Mock) RefreshToken

func (m *Mock) RefreshToken(_ string) (*authEntities.LoginResponse, error)

func (*Mock) SendResetPasswordCode

func (m *Mock) SendResetPasswordCode(_ string) error

func (*Mock) UpdateAccount

func (*Mock) ValidateAccountEmail

func (m *Mock) ValidateAccountEmail(_ uuid.UUID) error

Jump to

Keyboard shortcuts

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