account

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

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

func (*Account) ChangePassword added in v1.3.0

func (a *Account) ChangePassword(accountID uuid.UUID, password string) error

func (*Account) CreateAccount added in v1.3.0

func (a *Account) CreateAccount(account *authEntities.Account) error

func (*Account) CreateAccountFromKeycloak

func (a *Account) CreateAccountFromKeycloak(
	keyCloakToken *dto.KeycloakToken) (*dto.CreateAccountFromKeycloakResponse, error)

func (*Account) DeleteAccount added in v1.3.0

func (a *Account) DeleteAccount(accountID uuid.UUID) error

func (*Account) GetAccountID added in v1.3.0

func (a *Account) GetAccountID(token string) (uuid.UUID, error)

func (*Account) GetAccountIDByEmail added in v1.3.0

func (a *Account) GetAccountIDByEmail(email string) (uuid.UUID, error)

func (*Account) Logout added in v1.3.0

func (a *Account) Logout(accountID uuid.UUID) error

func (*Account) RenewToken added in v1.3.0

func (a *Account) RenewToken(refreshToken, accessToken string) (*dto.LoginResponse, error)

func (*Account) SendResetPasswordCode added in v1.3.0

func (a *Account) SendResetPasswordCode(email string) error

func (*Account) UpdateAccount added in v1.3.0

func (a *Account) UpdateAccount(accountUpdate *authEntities.Account) error

func (*Account) ValidateEmail added in v1.3.0

func (a *Account) ValidateEmail(accountID uuid.UUID) error

func (*Account) VerifyAlreadyInUse added in v1.3.0

func (a *Account) VerifyAlreadyInUse(validateUnique *dto.ValidateUnique) error

func (*Account) VerifyResetPasswordCode added in v1.3.0

func (a *Account) VerifyResetPasswordCode(data *dto.ResetCodeData) (string, error)

type IAccount

type IAccount interface {
	CreateAccountFromKeycloak(
		keyCloakToken *dto.KeycloakToken) (*dto.CreateAccountFromKeycloakResponse, error)
	CreateAccount(account *authEntities.Account) error
	ValidateEmail(accountID uuid.UUID) error
	SendResetPasswordCode(email string) error
	VerifyResetPasswordCode(data *dto.ResetCodeData) (string, error)
	ChangePassword(accountID uuid.UUID, password string) error
	RenewToken(refreshToken, accessToken string) (*dto.LoginResponse, error)
	Logout(accountID uuid.UUID) error
	VerifyAlreadyInUse(validateUnique *dto.ValidateUnique) error
	DeleteAccount(accountID uuid.UUID) error
	GetAccountIDByEmail(email string) (uuid.UUID, error)
	GetAccountID(token string) (uuid.UUID, error)
	UpdateAccount(account *authEntities.Account) error
}

func NewAccountController

func NewAccountController(broker brokerLib.IBroker, databaseRead SQL.InterfaceRead,
	databaseWrite SQL.InterfaceWrite, cacheRepository cache.Interface, appConfig *app.Config) IAccount

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ChangePassword added in v1.3.0

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

func (*Mock) CreateAccount added in v1.3.0

func (m *Mock) CreateAccount(_ *authEntities.Account) error

func (*Mock) CreateAccountFromKeycloak

func (m *Mock) CreateAccountFromKeycloak(_ *dto.KeycloakToken) (*dto.CreateAccountFromKeycloakResponse, error)

func (*Mock) DeleteAccount added in v1.3.0

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

func (*Mock) GetAccountID added in v1.3.0

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

func (*Mock) GetAccountIDByEmail added in v1.3.0

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

func (*Mock) Login added in v1.3.0

func (m *Mock) Login(_ *dto.LoginData) (*dto.LoginResponse, error)

func (*Mock) Logout added in v1.3.0

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

func (*Mock) RenewToken added in v1.3.0

func (m *Mock) RenewToken(_, _ string) (*dto.LoginResponse, error)

func (*Mock) SendResetPasswordCode added in v1.3.0

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

func (*Mock) UpdateAccount added in v1.3.0

func (m *Mock) UpdateAccount(account *authEntities.Account) error

func (*Mock) ValidateEmail added in v1.3.0

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

func (*Mock) VerifyAlreadyInUse added in v1.3.0

func (m *Mock) VerifyAlreadyInUse(_ *dto.ValidateUnique) error

func (*Mock) VerifyResetPasswordCode added in v1.3.0

func (m *Mock) VerifyResetPasswordCode(_ *dto.ResetCodeData) (string, error)

Jump to

Keyboard shortcuts

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