Documentation
¶
Index ¶
- type AccountService
- func (s *AccountService) CreateAccount(account domain.Account) error
- func (s *AccountService) DeleteAccount(accountPublicId string) error
- func (s *AccountService) GenerateTokenByCreds(email, password string) (string, error)
- func (s *AccountService) GetAccount(publicId string) (domain.Account, error)
- func (s *AccountService) ParseToken(accessToken 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
CreateAccount
func (*AccountService) DeleteAccount ¶
func (s *AccountService) DeleteAccount(accountPublicId string) error
DeleteAccount
func (*AccountService) GenerateTokenByCreds ¶
func (s *AccountService) GenerateTokenByCreds(email, password string) (string, error)
GenerateTokenByCreds
func (*AccountService) GetAccount ¶
func (s *AccountService) GetAccount(publicId string) (domain.Account, error)
GetAccount
func (*AccountService) ParseToken ¶
func (s *AccountService) ParseToken(accessToken string) (string, error)
ParseToken
func (*AccountService) UpdateAccountInfo ¶
func (s *AccountService) UpdateAccountInfo(input domain.UpdateAccountInput) error
UpdateAccountInfo
func (*AccountService) UpdateAccountRole ¶
func (s *AccountService) UpdateAccountRole(input domain.UpdateAccountRoleInput) error
UpdateAccountRole
type Accounter ¶
type Accounter interface { CreateAccount(account domain.Account) error GetAccount(publicId string) (domain.Account, error) UpdateAccountInfo(input domain.UpdateAccountInput) error UpdateAccountRole(input domain.UpdateAccountRoleInput) error DeleteAccount(accountPublicId string) error GenerateTokenByCreds(email, password string) (string, error) ParseToken(token string) (string, error) }
Accounter - service interface
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.