Documentation ¶
Index ¶
- type AccountService
- func (s *AccountService) CreateAccount(account domain.Account) error
- func (s *AccountService) DeleteAccount(accountPublicId uuid.UUID) error
- func (s *AccountService) GenerateTokenByCreds(email, password string) (string, error)
- func (s *AccountService) ParseToken(token string) (string, error)
- func (s *AccountService) UpdateAccountInfo(input domain.UpdateAccountInput) error
- func (s *AccountService) UpdateAccountRole(input domain.UpdateAccountRoleInput) error
- type Accounter
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountService ¶
type AccountService struct {
// contains filtered or unexported fields
}
AccountService - service
func NewAccountService ¶
func NewAccountService(repo repository.Accounter, config *config.Auth) *AccountService
NewAccountService - constructor
func (*AccountService) CreateAccount ¶
func (s *AccountService) CreateAccount(account domain.Account) error
func (*AccountService) DeleteAccount ¶
func (s *AccountService) DeleteAccount(accountPublicId uuid.UUID) error
func (*AccountService) GenerateTokenByCreds ¶
func (s *AccountService) GenerateTokenByCreds(email, password string) (string, error)
func (*AccountService) ParseToken ¶
func (s *AccountService) ParseToken(token string) (string, error)
func (*AccountService) UpdateAccountInfo ¶
func (s *AccountService) UpdateAccountInfo(input domain.UpdateAccountInput) error
func (*AccountService) UpdateAccountRole ¶
func (s *AccountService) UpdateAccountRole(input domain.UpdateAccountRoleInput) error
type Accounter ¶
type Accounter interface { CreateAccount(account domain.Account) error UpdateAccountInfo(input domain.UpdateAccountInput) error UpdateAccountRole(input domain.UpdateAccountRoleInput) error DeleteAccount(accountPublicId uuid.UUID) error GenerateTokenByCreds(email, password string) (string, error) ParseToken(token string) (string, error) }
type Service ¶
type Service struct {
Accounter
}
Service - just service
func NewService ¶
func NewService(repos *repository.Repository, config *config.Auth) *Service
NewService - constructor
Click to show internal directories.
Click to hide internal directories.